2 Copyright (C) 2008-2024 EDF R&D
4 This file is part of SALOME ADAO module.
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.
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.
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
20 See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D
24 .. index:: single: 3DVAR
25 .. index:: single: 3D-Var
26 .. _section_ref_algorithm_3DVAR:
28 Calculation algorithm "*3DVAR*"
29 -------------------------------
31 .. ------------------------------------ ..
32 .. include:: snippets/Header2Algo01.rst
34 This algorithm performs a state estimation by variational minimization of the
35 classical :math:`J` function in static data assimilation:
37 .. math:: J(\mathbf{x})=(\mathbf{x}-\mathbf{x}^b)^T.\mathbf{B}^{-1}.(\mathbf{x}-\mathbf{x}^b)+(\mathbf{y}^o-H(\mathbf{x}))^T.\mathbf{R}^{-1}.(\mathbf{y}^o-H(\mathbf{x}))
39 which is usually designed as the "*3D-Var*" function (see for example
40 [Talagrand97]_). The terms "*3D-Var*", "*3D-VAR*" and "*3DVAR*" are equivalent.
42 There exists various variants of this algorithm. The following stable and
43 robust formulations are proposed here:
47 pair: Variant ; 3DVAR-VAN
48 pair: Variant ; 3DVAR-Incr
49 pair: Variant ; 3DVAR-PSAS
51 pair: Variant ; Optimal Interpolation
53 - "3DVAR" (3D Variational analysis, see [Lorenc86]_, [LeDimet86]_, [Talagrand97]_), original classical algorithm, extremely robust, which operates in the model space,
54 - "3DVAR-VAN" (3D Variational Analysis with No inversion of B, see [Lorenc88]_), similar algorithm, which operates in the model space, avoiding inversion of the covariance matrix B (except in the case where there are bounds.),
55 - "3DVAR-Incr" (Incremental 3DVAR, see [Courtier94]_), cheaper algorithm than the previous ones, involving an approximation of non-linear operators,
56 - "3DVAR-PSAS" (Physical-space Statistical Analysis Scheme for 3DVAR, see [Courtier97]_, [Cohn98]_), algorithm sometimes cheaper because it operates in the observation space, involving an approximation of non-linear operators, not allowing to take into account bounds.
58 It is highly recommended to use the original "3DVAR". The "3DVAR" and
59 "3DVAR-Incr" algorithms (and not the others) explicitly allow the modification
60 of the initial point of their minimization, even if it is not recommended.
62 This mono-objective optimization algorithm is naturally written for a single
63 estimate, without any dynamic or iterative notion (there is no need in this
64 case for an incremental evolution operator, nor for an evolution error
65 covariance). In the traditional framework of temporal or iterative data
66 assimilation that ADAO deals with, it can also be used on a succession of
67 observations, placing the estimate in a recursive framework similar to a
68 :ref:`section_ref_algorithm_KalmanFilter`. A standard estimate is made at each
69 observation step on the state predicted by the incremental evolution model,
70 knowing that the state error covariance remains the background covariance
71 initially provided by the user. To be explicit, unlike Kalman-type filters, the
72 state error covariance is not updated.
74 An extension of 3DVAR, coupling a "3DVAR" method with a Kalman ensemble filter,
75 allows to improve the estimation of *a posteriori* error covariances. This
76 extension is obtained by using the "E3DVAR" variant of the filtering algorithm
77 :ref:`section_ref_algorithm_EnsembleKalmanFilter`.
79 Note that observation and evolution error statistics are assumed to be
80 Gaussian. So, in the particular case where the observation operator :math:`H`
81 is linear, this algorithm is strictly equivalent to optimal interpolation (OI).
82 What's more, it performs both minimum variance estimation (MV or "*Minimum
83 Variance* estimator") and maximum a posteriori estimation (MAP or "*Maximum A
84 Posteriori* estimator"), which coincide in this particular case.
86 .. ------------------------------------ ..
87 .. include:: snippets/Header2Algo12.rst
89 .. include:: snippets/FeaturePropNonLocalOptimization.rst
91 .. include:: snippets/FeaturePropDerivativeNeeded.rst
93 .. include:: snippets/FeaturePropParallelDerivativesOnly.rst
95 .. include:: snippets/FeaturePropConvergenceOnBoth.rst
97 .. ------------------------------------ ..
98 .. include:: snippets/Header2Algo02.rst
100 .. include:: snippets/Background.rst
102 .. include:: snippets/BackgroundError.rst
104 .. include:: snippets/Observation.rst
106 .. include:: snippets/ObservationError.rst
108 .. include:: snippets/ObservationOperator.rst
110 .. ------------------------------------ ..
111 .. include:: snippets/Header2Algo03AdOp.rst
113 .. include:: snippets/BoundsWithNone.rst
115 .. include:: snippets/CostDecrementTolerance.rst
117 .. include:: snippets/EstimationOf_Parameters.rst
119 .. include:: snippets/GradientNormTolerance.rst
121 .. include:: snippets/InitializationPoint.rst
123 .. include:: snippets/MaximumNumberOfIterations.rst
125 .. include:: snippets/Minimizer_xDVAR.rst
127 .. include:: snippets/NumberOfSamplesForQuantiles.rst
129 .. include:: snippets/ProjectedGradientTolerance.rst
131 .. include:: snippets/Quantiles.rst
133 .. include:: snippets/SetSeed.rst
135 .. include:: snippets/SimulationForQuantiles.rst
137 .. include:: snippets/StateBoundsForQuantilesWithNone.rst
139 StoreSupplementaryCalculations
140 .. index:: single: StoreSupplementaryCalculations
142 *List of names*. This list indicates the names of the supplementary
143 variables, that can be available during or at the end of the algorithm, if
144 they are initially required by the user. Their availability involves,
145 potentially, costly calculations or memory consumptions. The default is then
146 a void list, none of these variables being calculated and stored by default
147 (excepted the unconditional variables). The possible names are in the
148 following list (the detailed description of each named variable is given in
149 the following part of this specific algorithmic documentation, in the
150 sub-section "*Information and variables available at the end of the
153 "APosterioriCorrelations",
154 "APosterioriCovariance",
155 "APosterioriStandardDeviations",
156 "APosterioriVariances",
159 "CostFunctionJAtCurrentOptimum",
161 "CostFunctionJbAtCurrentOptimum",
163 "CostFunctionJoAtCurrentOptimum",
164 "CurrentIterationNumber",
171 "InnovationAtCurrentAnalysis",
172 "InnovationAtCurrentState",
173 "JacobianMatrixAtBackground",
174 "JacobianMatrixAtOptimum",
175 "KalmanGainAtOptimum",
176 "MahalanobisConsistency",
179 "SampledStateForQuantiles",
181 "SimulatedObservationAtBackground",
182 "SimulatedObservationAtCurrentOptimum",
183 "SimulatedObservationAtCurrentState",
184 "SimulatedObservationAtOptimum",
185 "SimulationQuantiles",
189 ``{"StoreSupplementaryCalculations":["CurrentState", "Residu"]}``
191 .. include:: snippets/Variant_3DVAR.rst
193 .. ------------------------------------ ..
194 .. include:: snippets/Header2Algo04.rst
196 .. include:: snippets/Analysis.rst
198 .. include:: snippets/CostFunctionJ.rst
200 .. include:: snippets/CostFunctionJb.rst
202 .. include:: snippets/CostFunctionJo.rst
204 .. ------------------------------------ ..
205 .. include:: snippets/Header2Algo05.rst
207 .. include:: snippets/Analysis.rst
209 .. include:: snippets/APosterioriCorrelations.rst
211 .. include:: snippets/APosterioriCovariance.rst
213 .. include:: snippets/APosterioriStandardDeviations.rst
215 .. include:: snippets/APosterioriVariances.rst
217 .. include:: snippets/BMA.rst
219 .. include:: snippets/CostFunctionJ.rst
221 .. include:: snippets/CostFunctionJAtCurrentOptimum.rst
223 .. include:: snippets/CostFunctionJb.rst
225 .. include:: snippets/CostFunctionJbAtCurrentOptimum.rst
227 .. include:: snippets/CostFunctionJo.rst
229 .. include:: snippets/CostFunctionJoAtCurrentOptimum.rst
231 .. include:: snippets/CurrentIterationNumber.rst
233 .. include:: snippets/CurrentOptimum.rst
235 .. include:: snippets/CurrentState.rst
237 .. include:: snippets/CurrentStepNumber.rst
239 .. include:: snippets/ForecastState.rst
241 .. include:: snippets/IndexOfOptimum.rst
243 .. include:: snippets/Innovation.rst
245 .. include:: snippets/InnovationAtCurrentAnalysis.rst
247 .. include:: snippets/InnovationAtCurrentState.rst
249 .. include:: snippets/JacobianMatrixAtBackground.rst
251 .. include:: snippets/JacobianMatrixAtOptimum.rst
253 .. include:: snippets/KalmanGainAtOptimum.rst
255 .. include:: snippets/MahalanobisConsistency.rst
257 .. include:: snippets/OMA.rst
259 .. include:: snippets/OMB.rst
261 .. include:: snippets/SampledStateForQuantiles.rst
263 .. include:: snippets/SigmaObs2.rst
265 .. include:: snippets/SimulatedObservationAtBackground.rst
267 .. include:: snippets/SimulatedObservationAtCurrentOptimum.rst
269 .. include:: snippets/SimulatedObservationAtCurrentState.rst
271 .. include:: snippets/SimulatedObservationAtOptimum.rst
273 .. include:: snippets/SimulationQuantiles.rst
275 .. ------------------------------------ ..
276 .. _section_ref_algorithm_3DVAR_examples:
278 .. include:: snippets/Header2Algo09.rst
281 .. include:: scripts/simple_3DVAR1.rst
283 .. literalinclude:: scripts/simple_3DVAR1.py
285 .. include:: snippets/Header2Algo10.rst
287 .. literalinclude:: scripts/simple_3DVAR1.res
290 .. include:: snippets/Header2Algo11.rst
293 .. image:: scripts/simple_3DVAR1.png
297 .. include:: scripts/simple_3DVAR1Plus.rst
299 .. _simple_3DVAR1Plus:
300 .. image:: scripts/simple_3DVAR1Plus.png
305 .. include:: scripts/simple_3DVAR2.rst
307 .. literalinclude:: scripts/simple_3DVAR2.py
309 .. include:: snippets/Header2Algo10.rst
311 .. literalinclude:: scripts/simple_3DVAR2.res
314 .. include:: snippets/Header2Algo11.rst
316 .. _simple_3DVAR2_state:
317 .. image:: scripts/simple_3DVAR2_state.png
321 .. simple_3DVAR2_variance:
322 .. image:: scripts/simple_3DVAR2_variance.png
327 .. include:: scripts/simple_3DVAR3.rst
329 .. literalinclude:: scripts/simple_3DVAR3.py
331 .. include:: snippets/Header2Algo10.rst
333 .. literalinclude:: scripts/simple_3DVAR3.res
336 .. include:: snippets/Header2Algo11.rst
338 .. _simple_3DVAR3_state:
339 .. image:: scripts/simple_3DVAR3_state.png
343 .. _simple_3DVAR3_variance:
344 .. image:: scripts/simple_3DVAR3_variance.png
348 .. ------------------------------------ ..
349 .. include:: snippets/Header2Algo06.rst
351 - :ref:`section_ref_algorithm_Blue`
352 - :ref:`section_ref_algorithm_ExtendedBlue`
353 - :ref:`section_ref_algorithm_KalmanFilter`
354 - :ref:`section_ref_algorithm_LinearityTest`
356 .. ------------------------------------ ..
357 .. include:: snippets/Header2Algo07.rst