From: Jean-Philippe ARGAUD Date: Mon, 23 May 2011 09:06:24 +0000 (+0200) Subject: Ajout des 3 premiers exemples simples X-Git-Tag: V6_4_0rc3~44^2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=19343280f29ef9e6deb94741f7a1094cef3b6417;p=modules%2Fadao.git Ajout des 3 premiers exemples simples --- 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 index 0000000..8455aa5 --- /dev/null +++ b/src/examples/daSalome/test001_ADAO_JDC_using_strings.comm @@ -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 index 0000000..752fbf4 --- /dev/null +++ b/src/examples/daSalome/test002_ADAO_JDC_using_strings.comm @@ -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 index 0000000..5b26a32 --- /dev/null +++ b/src/examples/daSalome/test003_ADAO_JDC_using_scripts.comm.in @@ -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 index 0000000..0b2a50c --- /dev/null +++ b/src/examples/daSalome/test003_ADAO_scripts_for_JDC.py @@ -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)