From 19343280f29ef9e6deb94741f7a1094cef3b6417 Mon Sep 17 00:00:00 2001 From: Jean-Philippe ARGAUD Date: Mon, 23 May 2011 11:06:24 +0200 Subject: [PATCH] Ajout des 3 premiers exemples simples --- .../test001_ADAO_JDC_using_strings.comm | 19 ++++++++++++++++ .../test002_ADAO_JDC_using_strings.comm | 19 ++++++++++++++++ .../test003_ADAO_JDC_using_scripts.comm.in | 20 +++++++++++++++++ .../daSalome/test003_ADAO_scripts_for_JDC.py | 22 +++++++++++++++++++ 4 files changed, 80 insertions(+) create mode 100644 src/examples/daSalome/test001_ADAO_JDC_using_strings.comm create mode 100644 src/examples/daSalome/test002_ADAO_JDC_using_strings.comm create mode 100644 src/examples/daSalome/test003_ADAO_JDC_using_scripts.comm.in create mode 100644 src/examples/daSalome/test003_ADAO_scripts_for_JDC.py 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) -- 2.39.2