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 --
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"
100 #AlgoType["Blue"] = "Direct"
103 # Variables qui sont partages avec le generateur de
107 BasicDataInputs = ["String", "Script", "FunctionDict"]
111 DataTypeDict["Vector"] = ["String", "Script"]
112 DataTypeDict["Matrix"] = ["String", "Script"]
113 DataTypeDict["Function"] = ["FunctionDict"]
114 DataTypeDict["Dict"] = ["Script"]
116 DataTypeDefaultDict = {}
117 DataTypeDefaultDict["Vector"] = "Script"
118 DataTypeDefaultDict["Matrix"] = "Script"
119 DataTypeDefaultDict["Function"] = "FunctionDict"
120 DataTypeDefaultDict["Dict"] = "Script"
122 # Assimilation data input
124 AssimDataDict["Background"] = ["Vector"]
125 AssimDataDict["BackgroundError"] = ["Matrix"]
126 AssimDataDict["Observation"] = ["Vector"]
127 AssimDataDict["ObservationError"] = ["Matrix"]
128 AssimDataDict["ObservationOperator"] = ["Matrix", "Function"]
129 AssimDataDict["EvolutionModel"] = ["Matrix", "Function"]
130 AssimDataDict["EvolutionError"] = ["Matrix"]
131 AssimDataDict["AlgorithmParameters"] = ["Dict"]
132 AssimDataDict["UserDataInit"] = ["Dict"]
134 AssimDataDefaultDict = {}
135 AssimDataDefaultDict["Background"] = "Vector"
136 AssimDataDefaultDict["BackgroundError"] = "Matrix"
137 AssimDataDefaultDict["Observation"] = "Vector"
138 AssimDataDefaultDict["ObservationError"] = "Matrix"
139 AssimDataDefaultDict["ObservationOperator"] = "Function"
140 AssimDataDefaultDict["EvolutionModel"] = "Function"
141 AssimDataDefaultDict["EvolutionError"] = "Matrix"
142 AssimDataDefaultDict["AlgorithmParameters"] = "Dict"
143 AssimDataDefaultDict["UserDataInit"] = "Dict"
145 # Assimilation optional nodes
147 OptDict["UserPostAnalysis"] = ["String", "Script"]
149 OptDefaultDict["UserPostAnalysis"] = "Script"
162 "GradientOfCostFunctionJ",
163 "GradientOfCostFunctionJb",
164 "GradientOfCostFunctionJo",
167 "APosterioriCovariance",