print "Entering in CreateAssimilationStudy"
print "Name is", Name
print "Algorithm is", Algorithm
+print "Debug is set to", Debug
# Create Assimilation study
from daYacsIntegration.daStudy import *
-assim_study = daStudy(Name, Algorithm)
+assim_study = daStudy(Name, Algorithm, Debug)
# Algorithm parameters
try:
</code></script>
<inport name="Name" type="string"/>
<inport name="Algorithm" type="string"/>
+ <inport name="Debug" type="bool"/>
<outport name="Study" type="pyobj"/>
</inline>
self.text_da += "outputvariables_config[\"%s\"] = %s \n" % (name,size)
self.text_da += "study_config[\"OutputVariables\"] = outputvariables_config \n"
else:
- self.text_da += "variables_config = {} \n"
+ self.text_da += "outputvariables_config = {} \n"
self.text_da += "outputvariables_config[\"adao_default\"] = -1 \n"
- self.text_da += "study_config[\"OutputVariables\"] = ouputvariables_config \n"
+ self.text_da += "study_config[\"OutputVariables\"] = outputvariables_config \n"
# Start Assimilation Study
- import logging
- logging.getLogger().setLevel(logging.DEBUG)
-
print "ADD analyze"
self.ADD.analyze()
#-*- coding: utf-8 -*-
from daCore.AssimilationStudy import AssimilationStudy
+from daCore import Logging
class daError(Exception):
def __init__(self, value):
class daStudy:
- def __init__(self, name, algorithm):
+ def __init__(self, name, algorithm, debug):
self.ADD = AssimilationStudy(name)
self.ADD.setControls()
self.algorithm_dict = None
self.Background = None
+ self.debug = debug
+ import logging
+ if self.debug:
+ logging.getLogger().setLevel(logging.DEBUG)
+ else:
+ logging.getLogger().setLevel(logging.INFO)
+
+
# Observation Management
self.ObservationOperatorType = {}
self.FunctionObservationOperator = {}
CAS_node = factory_CAS_node.cloneNode("CreateAssimilationStudy")
CAS_node.getInputPort("Name").edInitPy(study_config["Name"])
CAS_node.getInputPort("Algorithm").edInitPy(study_config["Algorithm"])
+ if study_config["Debug"] == "0":
+ CAS_node.getInputPort("Debug").edInitPy(False)
+ else:
+ CAS_node.getInputPort("Debug").edInitPy(True)
proc.edAddChild(CAS_node)
# Step 0.5: Find if there is a user init node