-ASSIMILATION_STUDY(Study_name='ADAO skeleton case',
- Study_repertory='@prefix@/share/salome/adao_examples/daSkeletons/External_data_definition_by_scripts',
- Debug=0,
- Algorithm='3DVAR',
+ASSIMILATION_STUDY(StudyName='ADAO skeleton case',
+ StudyRepertory='@prefix@/share/salome/adao_examples/daSkeletons/External_data_definition_by_scripts',
+ AlgorithmParameters=_F(Algorithm='3DVAR',
+ Parameters='Dict',
+ data=_F(FROM='Script',
+ SCRIPT_FILE='Script_AlgorithmParameters.py',),),
Background=_F(Stored=1,
INPUT_TYPE='Vector',
data=_F(FROM='Script',
INPUT_TYPE='Function',
data=_F(FROM='FunctionDict',
FUNCTIONDICT_FILE='Script_ObservationOperator_H.py',),),
- AlgorithmParameters=_F(INPUT_TYPE='Dict',
- data=_F(FROM='Script',
- SCRIPT_FILE='Script_AlgorithmParameters.py',),),
UserPostAnalysis=_F(FROM='Script',
SCRIPT_FILE='Script_UserPostAnalysis.py',),);
+#VERSION_CATALOGUE:V7_6_0:FIN VERSION_CATALOGUE
+
--- /dev/null
+# -*- coding: utf-8 -*-
+study_config = {}
+study_config['StudyType'] = 'ASSIMILATION_STUDY'
+study_config['Name'] = 'ADAO skeleton case'
+study_config['Debug'] = '0'
+study_config['Algorithm'] = '3DVAR'
+AlgorithmParameters_config = {}
+AlgorithmParameters_config['Type'] = 'Dict'
+AlgorithmParameters_config['From'] = 'Script'
+AlgorithmParameters_config['Data'] = 'Script_AlgorithmParameters.py'
+study_config['AlgorithmParameters'] = AlgorithmParameters_config
+Background_config = {}
+Background_config['Type'] = 'Vector'
+Background_config['From'] = 'Script'
+Background_config['Data'] = 'Script_Background_xb.py'
+Background_config['Stored'] = '1'
+study_config['Background'] = Background_config
+BackgroundError_config = {}
+BackgroundError_config['Type'] = 'Matrix'
+BackgroundError_config['From'] = 'Script'
+BackgroundError_config['Data'] = 'Script_BackgroundError_B.py'
+BackgroundError_config['Stored'] = '0'
+study_config['BackgroundError'] = BackgroundError_config
+Observation_config = {}
+Observation_config['Type'] = 'Vector'
+Observation_config['From'] = 'Script'
+Observation_config['Data'] = 'Script_Observation_yo.py'
+Observation_config['Stored'] = '1'
+study_config['Observation'] = Observation_config
+ObservationError_config = {}
+ObservationError_config['Type'] = 'Matrix'
+ObservationError_config['From'] = 'Script'
+ObservationError_config['Data'] = 'Script_ObservationError_R.py'
+ObservationError_config['Stored'] = '0'
+study_config['ObservationError'] = ObservationError_config
+ObservationOperator_FunctionDict = {}
+ObservationOperator_FunctionDict['Function'] = ['Direct', 'Tangent', 'Adjoint']
+ObservationOperator_FunctionDict['Script'] = {}
+ObservationOperator_FunctionDict['Script']['Direct'] = 'Script_ObservationOperator_H.py'
+ObservationOperator_FunctionDict['Script']['Tangent'] = 'Script_ObservationOperator_H.py'
+ObservationOperator_FunctionDict['Script']['Adjoint'] = 'Script_ObservationOperator_H.py'
+ObservationOperator_config = {}
+ObservationOperator_config['Type'] = 'Function'
+ObservationOperator_config['From'] = 'FunctionDict'
+ObservationOperator_config['Data'] = ObservationOperator_FunctionDict
+study_config['ObservationOperator'] = ObservationOperator_config
+inputvariables_config = {}
+inputvariables_config['Order'] =['adao_default']
+inputvariables_config['adao_default'] = -1
+study_config['InputVariables'] = inputvariables_config
+outputvariables_config = {}
+outputvariables_config['Order'] = ['adao_default']
+outputvariables_config['adao_default'] = -1
+study_config['OutputVariables'] = outputvariables_config
+study_config['Repertory'] = '@prefix@/share/salome/adao_examples/daSkeletons/External_data_definition_by_scripts'
+Analysis_config = {}
+Analysis_config['From'] = 'Script'
+Analysis_config['Data'] = 'Script_UserPostAnalysis.py'
+study_config['UserPostAnalysis'] = Analysis_config
""" ADAO Internal Data Structure Model """
def __init__(self, name = "", addViewers=None):
self.__name = str(name)
+ self.__directory = None
self.__case = CaseLogger(self.__name, "case", addViewers)
#
self.__adaoObject = {}
except Exception as e:
if isinstance(e, SyntaxError): msg = "at %s: %s"%(e.offset, e.text)
else: msg = ""
- raise ValueError("during settings, the following error occurs:\n"+\
- "\n%s %s\n\nSee also the potential messages, "+\
- "which can show the origin of the above error, "+\
- "in the launching terminal."%(str(e),msg))
+ raise ValueError(("during settings, the following error occurs:\n"+\
+ "\n%s %s\n\nSee also the potential messages, "+\
+ "which can show the origin of the above error, "+\
+ "in the launching terminal.")%(str(e),msg))
# -----------------------------------------------------------
name = Concept,
asVector = Vector,
asPersistentVector = VectorSerie,
- asScript = Script,
- scheduledBy = Scheduler,
- toBeChecked = Checked,
- )
- if Stored:
- self.__StoredInputs[Concept] = self.__adaoObject[Concept].getO()
- return 0
-
- def setControls(self,
- Vector = (), # Valeur par defaut pour un vecteur vide
- VectorSerie = None,
- Script = None,
- Stored = False,
- Scheduler = None,
- Checked = False):
- "Definition d'un concept de calcul"
- Concept = "Controls"
- self.__case.register("set"+Concept, dir(), locals())
- self.__adaoObject[Concept] = State(
- name = Concept,
- asVector = Vector,
- asPersistentVector = VectorSerie,
- asScript = Script,
+ asScript = self.with_directory(Script),
scheduledBy = Scheduler,
toBeChecked = Checked,
)
self.__StoredInputs[Concept] = self.__adaoObject[Concept].getO()
return 0
- def setDebug(self, level = 10):
+ def setDebug(self, __level = 10):
"NOTSET=0 < DEBUG=10 < INFO=20 < WARNING=30 < ERROR=40 < CRITICAL=50"
self.__case.register("setDebug",dir(),locals())
log = logging.getLogger()
- log.setLevel( level )
- self.__StoredInputs["Debug"] = level
+ log.setLevel( __level )
+ self.__StoredInputs["Debug"] = __level
self.__StoredInputs["NoDebug"] = False
return 0
files.sort()
return files
- # -----------------------------------------------------------
def get_algorithms_main_path(self):
"""
has_salome = bool( "ROOT_SALOME" in os.environ )
has_yacs = bool( "YACS_ROOT_DIR" in os.environ )
has_adao = bool( "ADAO_ROOT_DIR" in os.environ )
+has_eficas = bool( "EFICAS_ROOT_DIR" in os.environ )
# ==============================================================================
def uniq(sequence):
def __init__(self, name, algorithm, debug):
self.ADD = AssimilationStudy(name)
- self.ADD.setControls()
self.algorithm = algorithm
self.algorithm_dict = None
self.Background = None