]> SALOME platform Git repositories - modules/adao.git/commitdiff
Salome HOME
Ajout des 3 premiers exemples simples
authorJean-Philippe ARGAUD <ahbhhjp@cli23jp>
Mon, 23 May 2011 09:06:24 +0000 (11:06 +0200)
committerJean-Philippe ARGAUD <ahbhhjp@cli23jp>
Mon, 23 May 2011 09:06:24 +0000 (11:06 +0200)
src/examples/daSalome/test001_ADAO_JDC_using_strings.comm [new file with mode: 0644]
src/examples/daSalome/test002_ADAO_JDC_using_strings.comm [new file with mode: 0644]
src/examples/daSalome/test003_ADAO_JDC_using_scripts.comm.in [new file with mode: 0644]
src/examples/daSalome/test003_ADAO_scripts_for_JDC.py [new file with mode: 0644]

diff --git a/src/examples/daSalome/test001_ADAO_JDC_using_strings.comm b/src/examples/daSalome/test001_ADAO_JDC_using_strings.comm
new file mode 100644 (file)
index 0000000..8455aa5
--- /dev/null
@@ -0,0 +1,19 @@
+
+ASSIMILATION_STUDY(Study_name='Test',
+                   Debug=0,
+                   Algorithm='Blue',
+                   Background=_F(INPUT_TYPE='Vector',
+                                 data=_F(FROM='String',
+                                         STRING='0 0 0',),),
+                   BackgroundError=_F(INPUT_TYPE='Matrix',
+                                      data=_F(FROM='String',
+                                              STRING='1 0 0 ; 0 1 0 ; 0 0 1',),),
+                   Observation=_F(INPUT_TYPE='Vector',
+                                  data=_F(FROM='String',
+                                          STRING='1 1 1',),),
+                   ObservationError=_F(INPUT_TYPE='Matrix',
+                                       data=_F(FROM='String',
+                                               STRING='1 0 0 ; 0 1 0 ; 0 0 1',),),
+                   ObservationOperator=_F(INPUT_TYPE='Matrix',
+                                          data=_F(FROM='String',
+                                                  STRING='1 0 0 ; 0 1 0 ; 0 0 1',),),);
diff --git a/src/examples/daSalome/test002_ADAO_JDC_using_strings.comm b/src/examples/daSalome/test002_ADAO_JDC_using_strings.comm
new file mode 100644 (file)
index 0000000..752fbf4
--- /dev/null
@@ -0,0 +1,19 @@
+
+ASSIMILATION_STUDY(Study_name='Test',
+                   Debug=0,
+                   Algorithm='3DVAR',
+                   Background=_F(INPUT_TYPE='Vector',
+                                 data=_F(FROM='String',
+                                         STRING='0 0 0',),),
+                   BackgroundError=_F(INPUT_TYPE='Matrix',
+                                      data=_F(FROM='String',
+                                              STRING='1 0 0 ; 0 1 0 ; 0 0 1',),),
+                   Observation=_F(INPUT_TYPE='Vector',
+                                  data=_F(FROM='String',
+                                          STRING='1 1 1',),),
+                   ObservationError=_F(INPUT_TYPE='Matrix',
+                                       data=_F(FROM='String',
+                                               STRING='1 0 0 ; 0 1 0 ; 0 0 1',),),
+                   ObservationOperator=_F(INPUT_TYPE='Matrix',
+                                          data=_F(FROM='String',
+                                                  STRING='1 0 0 ; 0 1 0 ; 0 0 1',),),);
diff --git a/src/examples/daSalome/test003_ADAO_JDC_using_scripts.comm.in b/src/examples/daSalome/test003_ADAO_JDC_using_scripts.comm.in
new file mode 100644 (file)
index 0000000..5b26a32
--- /dev/null
@@ -0,0 +1,20 @@
+
+ASSIMILATION_STUDY(Study_name='Test',
+                   Study_repertory='@prefix@/examples/daSalome',
+                   Debug=0,
+                   Algorithm='3DVAR',
+                   Background=_F(INPUT_TYPE='Vector',
+                                 data=_F(FROM='Script',
+                                         SCRIPT_FILE='test003_ADAO_scripts_for_JDC.py',),),
+                   BackgroundError=_F(INPUT_TYPE='Matrix',
+                                      data=_F(FROM='Script',
+                                              SCRIPT_FILE='test003_ADAO_scripts_for_JDC.py',),),
+                   Observation=_F(INPUT_TYPE='Vector',
+                                  data=_F(FROM='Script',
+                                          SCRIPT_FILE='test003_ADAO_scripts_for_JDC.py',),),
+                   ObservationError=_F(INPUT_TYPE='Matrix',
+                                       data=_F(FROM='Script',
+                                               SCRIPT_FILE='test003_ADAO_scripts_for_JDC.py',),),
+                   ObservationOperator=_F(INPUT_TYPE='Matrix',
+                                          data=_F(FROM='Script',
+                                                  SCRIPT_FILE='test003_ADAO_scripts_for_JDC.py',),),);
diff --git a/src/examples/daSalome/test003_ADAO_scripts_for_JDC.py b/src/examples/daSalome/test003_ADAO_scripts_for_JDC.py
new file mode 100644 (file)
index 0000000..0b2a50c
--- /dev/null
@@ -0,0 +1,22 @@
+#-*-coding:iso-8859-1-*-
+import numpy
+#
+# Definition of the Background as a vector
+# ----------------------------------------
+Background = [0, 0, 0]
+#
+# Definition of the Observation as a vector
+# -----------------------------------------
+Observation = "1 1 1"
+#
+# Definition of the Background Error covariance as a matrix
+# ---------------------------------------------------------
+BackgroundError = numpy.array([[1., 0., 0.], [0., 1., 0.], [0., 0., 1.]])
+#
+# Definition of the Observation Error covariance as a matrix
+# ----------------------------------------------------------
+ObservationError = numpy.matrix("1 0 0 ; 0 1 0 ; 0 0 1")
+#
+# Definition of the Observation Operator as a matrix
+# --------------------------------------------------
+ObservationOperator = numpy.identity(3)