except:
logging.fatal("Import of DATASSIM python modules failed !" +
"\n add DATASSIM python installation directory in your PYTHONPATH")
+ traceback.print_exc()
sys.exit(1)
# Parse arguments
assim_study.setObservationOperatorType(ObservationOperatorType)
assim_study.setObservationOperator(ObservationOperator)
+Study = assim_study
]]>
</code></script>
<inport name="Name" type="string"/>
<inport name="Algorithm" type="string"/>
+ <outport name="Study" type="pyobj"/>
</inline>
<inline name="CreateNumpyMatrixFromString">
<outport name="type" type="string"/>
</inline>
+ <inline name="SimpleExecuteDirectAlgorithm">
+ <script><code><![CDATA[
+print "Entering in SimpleExecuteDirectAlgorithm"
+from daYacsIntegration.daStudy import *
+ADD = Study.getAssimilationStudy()
+ADD.analyze()
+]]></code></script>
+ <inport name="Study" type="pyobj"/>
+ <outport name="Study" type="pyobj"/>
+ </inline>
</proc>
AlgoDataRequirements = {}
AlgoDataRequirements["Blue"] = ["Background", "BackgroundError",
"Observation", "ObservationOperator", "ObservationError"]
-
+AlgoType = {}
+AlgoType["Blue"] = "Direct"
proc.edAddDFLink(back_node.getOutputPort("type"), CAS_node.getInputPort(key_type))
- # Step 3: create optimizer loop
+ # Step 3: create compute bloc
+ compute_bloc = runtime.createBloc("compute_bloc")
+ proc.edAddChild(compute_bloc)
+ proc.edAddCFLink(CAS_node, compute_bloc)
+
+ if AlgoType[study_config["Algorithm"]] == "Direct":
+ # We don't need to use an optimizer loop
+ factory_execute_node = catalogAd._nodeMap["SimpleExecuteDirectAlgorithm"]
+ execute_node = factory_execute_node.cloneNode("Execute" + study_config["Algorithm"])
+ compute_bloc.edAddChild(execute_node)
+ proc.edAddDFLink(CAS_node.getOutputPort("Study"), execute_node.getInputPort("Study"))
# Step 4: create post-processing from user configuration