Salome HOME
Documentation minor corrections
[modules/adao.git] / doc / en / ref_algorithm_ExtendedBlue.rst
1 ..
2    Copyright (C) 2008-2015 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: ExtendedBlue
25 .. _section_ref_algorithm_ExtendedBlue:
26
27 Calculation algorithm "*ExtendedBlue*"
28 --------------------------------------
29
30 Description
31 +++++++++++
32
33 This algorithm realizes an extended BLUE (Best Linear Unbiased Estimator) type
34 estimation of the state of a system.
35
36 This algorithm is a partially non-linear generalization of the
37 :ref:`section_ref_algorithm_Blue`. It is equivalent for a linear observation
38 operator. One can verify the linearity of the observation operator with the help
39 of the :ref:`section_ref_algorithm_LinearityTest`.
40
41 In case of non-linearity, it is close to the :ref:`section_ref_algorithm_3DVAR`,
42 without being entirely equivalent.
43
44 Optional and required commands
45 ++++++++++++++++++++++++++++++
46
47 .. index:: single: AlgorithmParameters
48 .. index:: single: Background
49 .. index:: single: BackgroundError
50 .. index:: single: Observation
51 .. index:: single: ObservationError
52 .. index:: single: ObservationOperator
53 .. index:: single: StoreSupplementaryCalculations
54 .. index:: single: Quantiles
55 .. index:: single: SetSeed
56 .. index:: single: NumberOfSamplesForQuantiles
57 .. index:: single: SimulationForQuantiles
58
59 The general required commands, available in the editing user interface, are the
60 following:
61
62   Background
63     *Required command*. This indicates the background or initial vector used,
64     previously noted as :math:`\mathbf{x}^b`. Its value is defined as a
65     "*Vector*" or a *VectorSerie*" type object.
66
67   BackgroundError
68     *Required command*. This indicates the background error covariance matrix,
69     previously noted as :math:`\mathbf{B}`. Its value is defined as a "*Matrix*"
70     type object, a "*ScalarSparseMatrix*" type object, or a
71     "*DiagonalSparseMatrix*" type object.
72
73   Observation
74     *Required command*. This indicates the observation vector used for data
75     assimilation or optimization, previously noted as :math:`\mathbf{y}^o`. It
76     is defined as a "*Vector*" or a *VectorSerie* type object.
77
78   ObservationError
79     *Required command*. This indicates the observation error covariance matrix,
80     previously noted as :math:`\mathbf{R}`. It is defined as a "*Matrix*" type
81     object, a "*ScalarSparseMatrix*" type object, or a "*DiagonalSparseMatrix*"
82     type object.
83
84   ObservationOperator
85     *Required command*. This indicates the observation operator, previously
86     noted :math:`H`, which transforms the input parameters :math:`\mathbf{x}` to
87     results :math:`\mathbf{y}` to be compared to observations
88     :math:`\mathbf{y}^o`. Its value is defined as a "*Function*" type object or
89     a "*Matrix*" type one. In the case of "*Function*" type, different
90     functional forms can be used, as described in the section
91     :ref:`section_ref_operator_requirements`. If there is some control :math:`U`
92     included in the observation, the operator has to be applied to a pair
93     :math:`(X,U)`.
94
95 The general optional commands, available in the editing user interface, are
96 indicated in :ref:`section_ref_assimilation_keywords`. Moreover, the parameters
97 of the command "*AlgorithmParameters*" allows to choose the specific options,
98 described hereafter, of the algorithm. See
99 :ref:`section_ref_options_Algorithm_Parameters` for the good use of this
100 command.
101
102 The options of the algorithm are the following:
103
104   StoreSupplementaryCalculations
105     This list indicates the names of the supplementary variables that can be
106     available at the end of the algorithm. It involves potentially costly
107     calculations or memory consumptions. The default is a void list, none of
108     these variables being calculated and stored by default. The possible names
109     are in the following list: ["APosterioriCorrelations",
110     "APosterioriCovariance", "APosterioriStandardDeviations",
111     "APosterioriVariances", "BMA", "OMA", "OMB", "CurrentState",
112     "CostFunctionJ", "Innovation", "SigmaBck2", "SigmaObs2",
113     "MahalanobisConsistency", "SimulationQuantiles",
114     "SimulatedObservationAtBackground", "SimulatedObservationAtCurrentState",
115     "SimulatedObservationAtOptimum"].
116
117     Example : ``{"StoreSupplementaryCalculations":["BMA", "Innovation"]}``
118
119   Quantiles
120     This list indicates the values of quantile, between 0 and 1, to be estimated
121     by simulation around the optimal state. The sampling uses a multivariate
122     gaussian random sampling, directed by the *a posteriori* covariance matrix.
123     This option is useful only if the supplementary calculation
124     "SimulationQuantiles" has been chosen. The default is a void list.
125
126     Example : ``{"Quantiles":[0.1,0.9]}``
127
128   SetSeed
129     This key allow to give an integer in order to fix the seed of the random
130     generator used to generate the ensemble. A convenient value is for example
131     1000. By default, the seed is left uninitialized, and so use the default
132     initialization from the computer.
133
134     Example : ``{"SetSeed":1000}``
135
136   NumberOfSamplesForQuantiles
137     This key indicates the number of simulation to be done in order to estimate
138     the quantiles. This option is useful only if the supplementary calculation
139     "SimulationQuantiles" has been chosen. The default is 100, which is often
140     sufficient for correct estimation of common quantiles at 5%, 10%, 90% or
141     95%.
142
143     Example : ``{"NumberOfSamplesForQuantiles":100}``
144
145   SimulationForQuantiles
146     This key indicates the type of simulation, linear (with the tangent
147     observation operator applied to perturbation increments around the optimal
148     state) or non-linear (with standard observation operator applied to
149     perturbated states), one want to do for each perturbation. It changes mainly
150     the time of each elementary calculation, usually longer in non-linear than
151     in linear. This option is useful only if the supplementary calculation
152     "SimulationQuantiles" has been chosen. The default value is "Linear", and
153     the possible choices are "Linear" and "NonLinear".
154
155     Example : ``{"SimulationForQuantiles":"Linear"}``
156
157 Information and variables available at the end of the algorithm
158 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
159
160 At the output, after executing the algorithm, there are variables and
161 information originating from the calculation. The description of
162 :ref:`section_ref_output_variables` show the way to obtain them by the method
163 named ``get`` of the variable "*ADD*" of the post-processing. The input
164 variables, available to the user at the output in order to facilitate the
165 writing of post-processing procedures, are described in the
166 :ref:`subsection_r_o_v_Inventaire`.
167
168 The unconditional outputs of the algorithm are the following:
169
170   Analysis
171     *List of vectors*. Each element is an optimal state :math:`\mathbf{x}*` in
172     optimization or an analysis :math:`\mathbf{x}^a` in data assimilation.
173
174     Example : ``Xa = ADD.get("Analysis")[-1]``
175
176 The conditional outputs of the algorithm are the following:
177
178   APosterioriCorrelations
179     *List of matrices*. Each element is an *a posteriori* error correlation
180     matrix of the optimal state.
181
182     Example : ``C = ADD.get("APosterioriCorrelations")[-1]``
183
184   APosterioriCovariance
185     *List of matrices*. Each element is an *a posteriori* error covariance
186     matrix :math:`\mathbf{A}*` of the optimal state.
187
188     Example : ``A = ADD.get("APosterioriCovariance")[-1]``
189
190   APosterioriStandardDeviations
191     *List of matrices*. Each element is an *a posteriori* error standard
192     deviation matrix of the optimal state.
193
194     Example : ``E = ADD.get("APosterioriStandardDeviations")[-1]``
195
196   APosterioriVariances
197     *List of matrices*. Each element is an *a posteriori* error variance matrix
198     of the optimal state.
199
200     Example : ``V = ADD.get("APosterioriVariances")[-1]``
201
202   BMA
203     *List of vectors*. Each element is a vector of difference between the
204     background and the optimal state.
205
206     Example : ``bma = ADD.get("BMA")[-1]``
207
208   CostFunctionJ
209     *List of values*. Each element is a value of the error function :math:`J`.
210
211     Example : ``J = ADD.get("CostFunctionJ")[:]``
212
213   CostFunctionJb
214     *List of values*. Each element is a value of the error function :math:`J^b`,
215     that is of the background difference part.
216
217     Example : ``Jb = ADD.get("CostFunctionJb")[:]``
218
219   CostFunctionJo
220     *List of values*. Each element is a value of the error function :math:`J^o`,
221     that is of the observation difference part.
222
223     Example : ``Jo = ADD.get("CostFunctionJo")[:]``
224
225   Innovation
226     *List of vectors*. Each element is an innovation vector, which is in static
227     the difference between the optimal and the background, and in dynamic the
228     evolution increment.
229
230     Example : ``d = ADD.get("Innovation")[-1]``
231
232   MahalanobisConsistency
233     *List of values*. Each element is a value of the Mahalanobis quality
234     indicator.
235
236     Example : ``m = ADD.get("MahalanobisConsistency")[-1]``
237
238   OMA
239     *List of vectors*. Each element is a vector of difference between the
240     observation and the optimal state in the observation space.
241
242     Example : ``oma = ADD.get("OMA")[-1]``
243
244   OMB
245     *List of vectors*. Each element is a vector of difference between the
246     observation and the background state in the observation space.
247
248     Example : ``omb = ADD.get("OMB")[-1]``
249
250   SigmaBck2
251     *List of values*. Each element is a value of the quality indicator
252     :math:`(\sigma^b)^2` of the background part.
253
254     Example : ``sb2 = ADD.get("SigmaBck")[-1]``
255
256   SigmaObs2
257     *List of values*. Each element is a value of the quality indicator
258     :math:`(\sigma^o)^2` of the observation part.
259
260     Example : ``so2 = ADD.get("SigmaObs")[-1]``
261
262   SimulatedObservationAtBackground
263     *List of vectors*. Each element is a vector of observation simulated from
264     the background :math:`\mathbf{x}^b`.
265
266     Example : ``hxb = ADD.get("SimulatedObservationAtBackground")[-1]``
267
268   SimulatedObservationAtOptimum
269     *List of vectors*. Each element is a vector of observation simulated from
270     the analysis or optimal state :math:`\mathbf{x}^a`.
271
272     Example : ``hxa = ADD.get("SimulatedObservationAtOptimum")[-1]``
273
274   SimulationQuantiles
275     *List of vectors*. Each element is a vector corresponding to the observed
276     state which realize the required quantile, in the same order than the
277     quantiles required by the user.
278
279     Example : ``sQuantiles = ADD.get("SimulationQuantiles")[:]``
280
281 See also
282 ++++++++
283
284 References to other sections:
285   - :ref:`section_ref_algorithm_Blue`
286   - :ref:`section_ref_algorithm_3DVAR`
287   - :ref:`section_ref_algorithm_LinearityTest`