Salome HOME
Updating copyright date information
[modules/adao.git] / doc / en / ref_algorithm_Blue.rst
1 ..
2    Copyright (C) 2008-2016 EDF R&D
3
4    This file is part of SALOME ADAO module.
5
6    This library is free software; you can redistribute it and/or
7    modify it under the terms of the GNU Lesser General Public
8    License as published by the Free Software Foundation; either
9    version 2.1 of the License, or (at your option) any later version.
10
11    This library is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14    Lesser General Public License for more details.
15
16    You should have received a copy of the GNU Lesser General Public
17    License along with this library; if not, write to the Free Software
18    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19
20    See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21
22    Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D
23
24 .. index:: single: Blue
25 .. _section_ref_algorithm_Blue:
26
27 Calculation algorithm "*Blue*"
28 ------------------------------
29
30 Description
31 +++++++++++
32
33 This algorithm realizes a BLUE (Best Linear Unbiased Estimator) type estimation
34 of the state of a system. More precisely, it is an Aitken estimator.
35
36 This algorithm is always the fastest of all the assimilation algorithms of ADAO.
37 It is theoretically reserved for observation operator cases which are linear,
38 even if it sometimes works in "slightly" non-linear cases. One can verify the
39 linearity of the observation operator with the help of the
40 :ref:`section_ref_algorithm_LinearityTest`.
41
42 In case of non-linearity, even slightly marked, it will be easily prefered the
43 :ref:`section_ref_algorithm_ExtendedBlue` or the
44 :ref:`section_ref_algorithm_3DVAR`.
45
46 Optional and required commands
47 ++++++++++++++++++++++++++++++
48
49 .. index:: single: AlgorithmParameters
50 .. index:: single: Background
51 .. index:: single: BackgroundError
52 .. index:: single: Observation
53 .. index:: single: ObservationError
54 .. index:: single: ObservationOperator
55 .. index:: single: StoreSupplementaryCalculations
56 .. index:: single: Quantiles
57 .. index:: single: SetSeed
58 .. index:: single: NumberOfSamplesForQuantiles
59 .. index:: single: SimulationForQuantiles
60
61 The general required commands, available in the editing user interface, are the
62 following:
63
64   Background
65     *Required command*. This indicates the background or initial vector used,
66     previously noted as :math:`\mathbf{x}^b`. Its value is defined as a
67     "*Vector*" or a *VectorSerie*" type object.
68
69   BackgroundError
70     *Required command*. This indicates the background error covariance matrix,
71     previously noted as :math:`\mathbf{B}`. Its value is defined as a "*Matrix*"
72     type object, a "*ScalarSparseMatrix*" type object, or a
73     "*DiagonalSparseMatrix*" type object.
74
75   Observation
76     *Required command*. This indicates the observation vector used for data
77     assimilation or optimization, previously noted as :math:`\mathbf{y}^o`. It
78     is defined as a "*Vector*" or a *VectorSerie* type object.
79
80   ObservationError
81     *Required command*. This indicates the observation error covariance matrix,
82     previously noted as :math:`\mathbf{R}`. It is defined as a "*Matrix*" type
83     object, a "*ScalarSparseMatrix*" type object, or a "*DiagonalSparseMatrix*"
84     type object.
85
86   ObservationOperator
87     *Required command*. This indicates the observation operator, previously
88     noted :math:`H`, which transforms the input parameters :math:`\mathbf{x}` to
89     results :math:`\mathbf{y}` to be compared to observations
90     :math:`\mathbf{y}^o`. Its value is defined as a "*Function*" type object or
91     a "*Matrix*" type one. In the case of "*Function*" type, different
92     functional forms can be used, as described in the section
93     :ref:`section_ref_operator_requirements`. If there is some control :math:`U`
94     included in the observation, the operator has to be applied to a pair
95     :math:`(X,U)`.
96
97 The general optional commands, available in the editing user interface, are
98 indicated in :ref:`section_ref_assimilation_keywords`. Moreover, the parameters
99 of the command "*AlgorithmParameters*" allows to choose the specific options,
100 described hereafter, of the algorithm. See
101 :ref:`section_ref_options_Algorithm_Parameters` for the good use of this
102 command.
103
104 The options of the algorithm are the following:
105
106   StoreSupplementaryCalculations
107     This list indicates the names of the supplementary variables that can be
108     available at the end of the algorithm. It involves potentially costly
109     calculations or memory consumptions. The default is a void list, none of
110     these variables being calculated and stored by default. The possible names
111     are in the following list: ["APosterioriCorrelations",
112     "APosterioriCovariance", "APosterioriStandardDeviations",
113     "APosterioriVariances", "BMA", "OMA", "OMB", "CurrentState",
114     "CostFunctionJ", "Innovation", "SigmaBck2", "SigmaObs2",
115     "MahalanobisConsistency", "SimulationQuantiles",
116     "SimulatedObservationAtBackground", "SimulatedObservationAtCurrentState",
117     "SimulatedObservationAtOptimum"].
118
119     Example : ``{"StoreSupplementaryCalculations":["BMA", "Innovation"]}``
120
121   Quantiles
122     This list indicates the values of quantile, between 0 and 1, to be estimated
123     by simulation around the optimal state. The sampling uses a multivariate
124     gaussian random sampling, directed by the *a posteriori* covariance matrix.
125     This option is useful only if the supplementary calculation
126     "SimulationQuantiles" has been chosen. The default is a void list.
127
128     Example : ``{"Quantiles":[0.1,0.9]}``
129
130   SetSeed
131     This key allow to give an integer in order to fix the seed of the random
132     generator used to generate the ensemble. A convenient value is for example
133     1000. By default, the seed is left uninitialized, and so use the default
134     initialization from the computer.
135
136     Example : ``{"SetSeed":1000}``
137
138   NumberOfSamplesForQuantiles
139     This key indicates the number of simulation to be done in order to estimate
140     the quantiles. This option is useful only if the supplementary calculation
141     "SimulationQuantiles" has been chosen. The default is 100, which is often
142     sufficient for correct estimation of common quantiles at 5%, 10%, 90% or
143     95%.
144
145     Example : ``{"NumberOfSamplesForQuantiles":100}``
146
147   SimulationForQuantiles
148     This key indicates the type of simulation, linear (with the tangent
149     observation operator applied to perturbation increments around the optimal
150     state) or non-linear (with standard observation operator applied to
151     perturbated states), one want to do for each perturbation. It changes mainly
152     the time of each elementary calculation, usually longer in non-linear than
153     in linear. This option is useful only if the supplementary calculation
154     "SimulationQuantiles" has been chosen. The default value is "Linear", and
155     the possible choices are "Linear" and "NonLinear".
156
157     Example : ``{"SimulationForQuantiles":"Linear"}``
158
159 Information and variables available at the end of the algorithm
160 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
161
162 At the output, after executing the algorithm, there are variables and
163 information originating from the calculation. The description of
164 :ref:`section_ref_output_variables` show the way to obtain them by the method
165 named ``get`` of the variable "*ADD*" of the post-processing. The input
166 variables, available to the user at the output in order to facilitate the
167 writing of post-processing procedures, are described in the
168 :ref:`subsection_r_o_v_Inventaire`.
169
170 The unconditional outputs of the algorithm are the following:
171
172   Analysis
173     *List of vectors*. Each element is an optimal state :math:`\mathbf{x}*` in
174     optimization or an analysis :math:`\mathbf{x}^a` in data assimilation.
175
176     Example : ``Xa = ADD.get("Analysis")[-1]``
177
178 The conditional outputs of the algorithm are the following:
179
180   APosterioriCorrelations
181     *List of matrices*. Each element is an *a posteriori* error correlation
182     matrix of the optimal state.
183
184     Example : ``C = ADD.get("APosterioriCorrelations")[-1]``
185
186   APosterioriCovariance
187     *List of matrices*. Each element is an *a posteriori* error covariance
188     matrix :math:`\mathbf{A}*` of the optimal state.
189
190     Example : ``A = ADD.get("APosterioriCovariance")[-1]``
191
192   APosterioriStandardDeviations
193     *List of matrices*. Each element is an *a posteriori* error standard
194     deviation matrix of the optimal state.
195
196     Example : ``E = ADD.get("APosterioriStandardDeviations")[-1]``
197
198   APosterioriVariances
199     *List of matrices*. Each element is an *a posteriori* error variance matrix
200     of the optimal state.
201
202     Example : ``V = ADD.get("APosterioriVariances")[-1]``
203
204   BMA
205     *List of vectors*. Each element is a vector of difference between the
206     background and the optimal state.
207
208     Example : ``bma = ADD.get("BMA")[-1]``
209
210   CostFunctionJ
211     *List of values*. Each element is a value of the error function :math:`J`.
212
213     Example : ``J = ADD.get("CostFunctionJ")[:]``
214
215   CostFunctionJb
216     *List of values*. Each element is a value of the error function :math:`J^b`,
217     that is of the background difference part.
218
219     Example : ``Jb = ADD.get("CostFunctionJb")[:]``
220
221   CostFunctionJo
222     *List of values*. Each element is a value of the error function :math:`J^o`,
223     that is of the observation difference part.
224
225     Example : ``Jo = ADD.get("CostFunctionJo")[:]``
226
227   Innovation
228     *List of vectors*. Each element is an innovation vector, which is in static
229     the difference between the optimal and the background, and in dynamic the
230     evolution increment.
231
232     Example : ``d = ADD.get("Innovation")[-1]``
233
234   MahalanobisConsistency
235     *List of values*. Each element is a value of the Mahalanobis quality
236     indicator.
237
238     Example : ``m = ADD.get("MahalanobisConsistency")[-1]``
239
240   OMA
241     *List of vectors*. Each element is a vector of difference between the
242     observation and the optimal state in the observation space.
243
244     Example : ``oma = ADD.get("OMA")[-1]``
245
246   OMB
247     *List of vectors*. Each element is a vector of difference between the
248     observation and the background state in the observation space.
249
250     Example : ``omb = ADD.get("OMB")[-1]``
251
252   SigmaBck2
253     *List of values*. Each element is a value of the quality indicator
254     :math:`(\sigma^b)^2` of the background part.
255
256     Example : ``sb2 = ADD.get("SigmaBck")[-1]``
257
258   SigmaObs2
259     *List of values*. Each element is a value of the quality indicator
260     :math:`(\sigma^o)^2` of the observation part.
261
262     Example : ``so2 = ADD.get("SigmaObs")[-1]``
263
264   SimulatedObservationAtBackground
265     *List of vectors*. Each element is a vector of observation simulated from
266     the background :math:`\mathbf{x}^b`.
267
268     Example : ``hxb = ADD.get("SimulatedObservationAtBackground")[-1]``
269
270   SimulatedObservationAtOptimum
271     *List of vectors*. Each element is a vector of observation simulated from
272     the analysis or optimal state :math:`\mathbf{x}^a`.
273
274     Example : ``hxa = ADD.get("SimulatedObservationAtOptimum")[-1]``
275
276   SimulationQuantiles
277     *List of vectors*. Each element is a vector corresponding to the observed
278     state which realize the required quantile, in the same order than the
279     quantiles required by the user.
280
281     Example : ``sQuantiles = ADD.get("SimulationQuantiles")[:]``
282
283 See also
284 ++++++++
285
286 References to other sections:
287   - :ref:`section_ref_algorithm_ExtendedBlue`
288   - :ref:`section_ref_algorithm_3DVAR`
289   - :ref:`section_ref_algorithm_LinearityTest`
290
291 Bibliographical references:
292   - [Bouttier99]_