From 773dce67b13af78815a9b87f0d101a3f52367cf2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Ribes?= Date: Thu, 24 Mar 2011 11:39:05 +0100 Subject: [PATCH] Ajout input output --- bin/AdaoCatalogGenerator.py | 4 ++-- src/daEficas/generator_adao.py | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/bin/AdaoCatalogGenerator.py b/bin/AdaoCatalogGenerator.py index 548cecf..c36656c 100644 --- a/bin/AdaoCatalogGenerator.py +++ b/bin/AdaoCatalogGenerator.py @@ -114,8 +114,8 @@ ASSIMILATION_STUDY = PROC(nom="ASSIMILATION_STUDY", AlgorithmParameters = F_AlgorithmParameters("f"), UserDataInit = F_Init("f"), UserPostAnalysis = F_UserPostAnalysis("f"), - InputVariables = F_variables("o"), - OutputVariables = F_variables("o") + InputVariables = F_variables("f"), + OutputVariables = F_variables("f") ) """ diff --git a/src/daEficas/generator_adao.py b/src/daEficas/generator_adao.py index 1bf9ecd..28b14b7 100644 --- a/src/daEficas/generator_adao.py +++ b/src/daEficas/generator_adao.py @@ -92,6 +92,7 @@ class AdaoGenerator(PythonGenerator): self.add_data("ObservationError") self.add_data("ObservationOperator") + self.add_variables() # Parametres optionnels # Extraction du Study_repertory @@ -189,3 +190,21 @@ class AdaoGenerator(PythonGenerator): self.text_da += "study_config[\"UserPostAnalysis\"] = Analysis_config \n" else: raise Exception('From Type unknown', from_type) + + def add_variables(self): + + # Input variables + if "__ASSIMILATION_STUDY__InputVariables__NAMES" in self.dictMCVal.keys(): + pass + else: + self.text_da += "inputvariables_config = {} \n" + self.text_da += "inputvariables_config[\"adao_default\"] = -1 \n" + self.text_da += "study_config[\"InputVariables\"] = inputvariables_config \n" + + # Output variables + if "__ASSIMILATION_STUDY__OutputVariables__NAMES" in self.dictMCVal.keys(): + pass + else: + self.text_da += "variables_config = {} \n" + self.text_da += "outputvariables_config[\"adao_default\"] = -1 \n" + self.text_da += "study_config[\"OutputVariables\"] = ouputvariables_config \n" -- 2.39.2