2 # Copyright (C) 2010-2011 EDF R&D
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License.
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 # Author: Andre Ribes, andre.ribes@edf.fr, EDF R&D
23 # -- Infos pour le parser --
26 AnalysisFromList = ["String", "Script"]
28 # -- Infos from daCore --
29 AssimData = ["Background", "BackgroundError",
30 "Observation", "ObservationError",
31 "ObservationOperator",
32 "EvolutionModel", "EvolutionError",
33 "AlgorithmParameters"]
36 AssimType["Background"] = ["Vector"]
37 AssimType["BackgroundError"] = ["Matrix"]
38 AssimType["Observation"] = ["Vector"]
39 AssimType["ObservationError"] = ["Matrix"]
40 AssimType["ObservationOperator"] = ["Matrix", "Function"]
41 AssimType["EvolutionModel"] = ["Matrix", "Function"]
42 AssimType["EvolutionError"] = ["Matrix"]
43 AssimType["AlgorithmParameters"] = ["Dict"]
44 AssimType["UserDataInit"] = ["Dict"]
47 FromNumpyList["Vector"] = ["String", "Script"]
48 FromNumpyList["Matrix"] = ["String", "Script"]
49 FromNumpyList["Function"] = ["FunctionDict"]
50 FromNumpyList["Dict"] = ["Script"]
52 # -- Infos from daAlgorithms --
57 # "KalmanFilter", # Removed because EvolutionModel must be available in OptLoop
59 "NonLinearLeastSquares",
62 AlgoDataRequirements = {}
63 AlgoDataRequirements["3DVAR"] = [
64 "Background", "BackgroundError",
65 "Observation", "ObservationError",
66 "ObservationOperator",
68 AlgoDataRequirements["Blue"] = [
69 "Background", "BackgroundError",
70 "Observation", "ObservationError",
71 "ObservationOperator",
73 AlgoDataRequirements["EnsembleBlue"] = [
74 "Background", "BackgroundError",
75 "Observation", "ObservationError",
76 "ObservationOperator",
78 # AlgoDataRequirements["KalmanFilter"] = [
79 # "Background", "BackgroundError",
80 # "Observation", "ObservationError",
81 # "EvolutionModel", "EvolutionError",
82 # "ObservationOperator",
84 AlgoDataRequirements["LinearLeastSquares"] = [
85 "Observation", "ObservationError",
86 "ObservationOperator",
88 AlgoDataRequirements["NonLinearLeastSquares"] = [
89 "Observation", "ObservationError",
90 "ObservationOperator",
94 AlgoType["3DVAR"] = "Optim"
95 AlgoType["Blue"] = "Optim"
96 AlgoType["EnsembleBlue"] = "Optim"
97 # AlgoType["KalmanFilter"] = "Optim"
98 AlgoType["LinearLeastSquares"] = "Optim"
99 AlgoType["NonLinearLeastSquares"] = "Optim"
101 # Variables qui sont partages avec le generateur de
105 BasicDataInputs = ["String", "Script", "FunctionDict"]
109 DataTypeDict["Vector"] = ["String", "Script"]
110 DataTypeDict["Matrix"] = ["String", "Script"]
111 DataTypeDict["Function"] = ["FunctionDict"]
112 DataTypeDict["Dict"] = ["Script"]
114 DataTypeDefaultDict = {}
115 DataTypeDefaultDict["Vector"] = "Script"
116 DataTypeDefaultDict["Matrix"] = "Script"
117 DataTypeDefaultDict["Function"] = "FunctionDict"
118 DataTypeDefaultDict["Dict"] = "Script"
120 # Assimilation data input
122 AssimDataDict["Background"] = ["Vector"]
123 AssimDataDict["BackgroundError"] = ["Matrix"]
124 AssimDataDict["Observation"] = ["Vector"]
125 AssimDataDict["ObservationError"] = ["Matrix"]
126 AssimDataDict["ObservationOperator"] = ["Matrix", "Function"]
127 AssimDataDict["EvolutionModel"] = ["Matrix", "Function"]
128 AssimDataDict["EvolutionError"] = ["Matrix"]
129 AssimDataDict["AlgorithmParameters"] = ["Dict"]
130 AssimDataDict["UserDataInit"] = ["Dict"]
132 AssimDataDefaultDict = {}
133 AssimDataDefaultDict["Background"] = "Vector"
134 AssimDataDefaultDict["BackgroundError"] = "Matrix"
135 AssimDataDefaultDict["Observation"] = "Vector"
136 AssimDataDefaultDict["ObservationError"] = "Matrix"
137 AssimDataDefaultDict["ObservationOperator"] = "Function"
138 AssimDataDefaultDict["EvolutionModel"] = "Function"
139 AssimDataDefaultDict["EvolutionError"] = "Matrix"
140 AssimDataDefaultDict["AlgorithmParameters"] = "Dict"
141 AssimDataDefaultDict["UserDataInit"] = "Dict"
143 # Assimilation optional nodes
145 OptDict["UserPostAnalysis"] = ["String", "Script"]
147 OptDefaultDict["UserPostAnalysis"] = "Script"
160 "GradientOfCostFunctionJ",
161 "GradientOfCostFunctionJb",
162 "GradientOfCostFunctionJo",
165 "APosterioriCovariance",