<script><code>
<![CDATA[
-import numpy
+import numpy, logging
+logging.debug("CREATE Entering in CreateAssimilationStudy")
print "Entering in the assimilation study"
print "Name is set to........:", Name
print "Algorithm is set to...:", Algorithm
except NameError:
pass
else:
- #print "Background is", Background
- #print "BackgroundType is", BackgroundType
+ logging.debug("CREATE Background is %s"%Background)
+ logging.debug("CREATE BackgroundType is %s"%BackgroundType)
assim_study.setBackgroundType(BackgroundType)
assim_study.setBackground(Background)
except NameError:
pass
else:
- #print "BackgroundError is", BackgroundError
- #print "BackgroundErrorType is", BackgroundErrorType
+ logging.debug("CREATE BackgroundError is %s"%BackgroundError)
+ logging.debug("CREATE BackgroundErrorType is %s"%BackgroundErrorType)
assim_study.setBackgroundError(BackgroundError)
# Observation
except NameError:
pass
else:
- #print "Observation is", Observation
- #print "ObservationType is", ObservationType
+ logging.debug("CREATE Observation is %s"%Observation)
+ logging.debug("CREATE ObservationType is %s"%ObservationType)
assim_study.setObservationType(ObservationType)
assim_study.setObservation(Observation)
except NameError:
pass
else:
- #print "ObservationError is", ObservationError
- #print "ObservationErrorType is", ObservationErrorType
+ logging.debug("CREATE ObservationError is %s"%ObservationError)
+ logging.debug("CREATE ObservationErrorType is %s"%ObservationErrorType)
assim_study.setObservationError(ObservationError)
# ObservationOperator
except NameError:
pass
else:
- #print "ObservationOperator is", ObservationOperator
- #print "ObservationOperatorType is", ObservationOperatorType
+ logging.debug("CREATE ObservationOperator is %s"%ObservationOperator)
+ logging.debug("CREATE ObservationOperatorType is %s"%ObservationOperatorType)
assim_study.setObservationOperatorType("Matrix", ObservationOperatorType)
assim_study.setObservationOperator("Matrix", ObservationOperator)
ObservationOperatorOk = 1
except NameError:
pass
else:
- #print "ObservationOperatorDirect is", ObservationOperatorDirect
+ logging.debug("CREATE ObservationOperatorDirect is %s"%ObservationOperatorDirect)
assim_study.setObservationOperatorType("Direct", "Function")
assim_study.setObservationOperator("Direct", ObservationOperatorDirect)
try:
except NameError:
pass
else:
- #print "ObservationOperatorTangent is", ObservationOperatorTangent
+ logging.debug("CREATE ObservationOperatorTangent is %s"%ObservationOperatorTangent)
assim_study.setObservationOperatorType("Tangent", "Function")
assim_study.setObservationOperator("Tangent", ObservationOperatorTangent)
try:
except NameError:
pass
else:
- #print "ObservationOperatorAdjoint is", ObservationOperatorAdjoint
+ logging.debug("CREATE ObservationOperatorAdjoint is %s"%ObservationOperatorAdjoint)
assim_study.setObservationOperatorType("Adjoint", "Function")
assim_study.setObservationOperator("Adjoint", ObservationOperatorAdjoint)
assim_study.setOutputVariable(name, size)
if has_observers:
+ logging.debug("CREATE Observers is %s"%observers.keys())
# Adding observers to the study
for observer_name in observers.keys():
scheduler = ""
<inline name="CreateNumpyMatrixFromString">
<script><code><![CDATA[
-#print "Entering in CreateNumpyMatrixFromString"
-import numpy
+import numpy, logging
+logging.debug("CREATE Entering in CreateNumpyMatrixFromString")
matrix = numpy.matrix(matrix_in_string)
type = "Matrix"
-#print "Matrix is", matrix
+logging.debug("CREATE Matrix is %s"%matrix)
]]></code></script>
<inport name="matrix_in_string" type="string"/>
<outport name="matrix" type="pyobj"/>
<inline name="CreateNumpyMatrixFromScript">
<script><code><![CDATA[
-#print "Entering in CreateNumpyMatrixFromScript"
+import logging
+logging.debug("CREATE Entering in CreateNumpyMatrixFromScript")
type = "Matrix"
# Get file path and filename
<inline name="CreateNumpyVectorFromString">
<script><code><![CDATA[
-#print "Entering in CreateNumpyVectorFromString"
-import numpy
+import numpy, logging
+logging.debug("CREATE Entering in CreateNumpyVectorFromString")
vector = numpy.matrix(vector_in_string)
type = "Vector"
-#print "Vector is", vector
+logging.debug("Vector is %s"%vector)
]]></code></script>
<inport name="vector_in_string" type="string"/>
<outport name="vector" type="pyobj"/>
<inline name="CreateNumpyVectorFromScript">
<script><code><![CDATA[
-#print "Entering in CreateNumpyVectorFromScript"
+import logging
+logging.debug("CREATE Entering in CreateNumpyVectorFromScript")
type = "Vector"
# Get file path and filename
<inline name="SimpleExecuteDirectAlgorithm">
<script><code><![CDATA[
-#print "Entering in SimpleExecuteDirectAlgorithm"
+import logging
+logging.debug("EXECUTE Entering in SimpleExecuteDirectAlgorithm")
from daYacsIntegration.daStudy import *
ADD = Study.getAssimilationStudy()
ADD.analyze()
<inline name="SimpleUserAnalysis">
<script><code><![CDATA[
#-*-coding:iso-8859-1-*-
-#print "Entering in SimpleUserAnalysis"
+import logging
+logging.debug("TERMINATE Entering in SimpleUserAnalysis")
from daYacsIntegration.daStudy import *
ADD = Study.getAssimilationStudy()
# User code is below
<inline name="FakeOptimizerLoopNode">
<script><code><![CDATA[
-#print "Entering in FakeOptimizerLoopNode"
+import logging
+logging.debug("EXECUTE Entering in FakeOptimizerLoopNode")
result = None
]]></code></script>
<inport name="computation" type="SALOME_TYPES/ParametricInput"/>
<inline name="CreateDictFromScript">
<script><code><![CDATA[
-#print "Entering in CreateDictFromScript"
+import logging
+logging.debug("CREATE Entering in CreateDictFromScript")
# Get file path and filename
import sys
<inline name="UserDataInitFromScript">
<script><code><![CDATA[
-#print "Entering in UserDataInitFromScript"
+import logging
+logging.debug("CREATE Entering in UserDataInitFromScript")
# Get file path and filename
import sys
<inline name="ReadForSwitchNode">
<script><code><![CDATA[
-#print "Entering in ReadForSwitch"
+import logging
+logging.debug("CREATE Entering in ReadForSwitchNode")
switch_value = -1
for param in data["specificParameters"]:
if param["name"] == "switch_value":
<inline name="ExtractDataNode">
<script><code><![CDATA[
+import logging
+logging.debug("TERMINATE Entering in ExtractDataNode")
import pickle
from daCore.AssimilationStudy import AssimilationStudy
-#print "Entering in ExtractData"
var = None
info = None
for param in data["specificParameters"]: