],
listadv = [
"3DVAR-Std",
+ "OneCycle3DVAR-Std",
],
)
self.defineRequiredParameter(
elif self._parameters["Variant"] == "3DVAR-PSAS":
NumericObjects.multi3dvar(self, Xb, Y, U, HO, EM, CM, R, B, Q, NumericObjects.psas3dvar)
#
+ #--------------------------
+ elif self._parameters["Variant"] == "OneCycle3DVAR-Std":
+ NumericObjects.std3dvar(self, Xb, Y, U, HO, EM, CM, R, B, Q)
#
#--------------------------
else:
def run(self, Xb=None, Y=None, U=None, HO=None, EM=None, CM=None, R=None, B=None, Q=None, Parameters=None):
self._pre_run(Parameters, Xb, Y, U, HO, EM, CM, R, B, Q)
#
- # Correction pour pallier a un bug de TNC sur le retour du Minimum
- if "Minimizer" in self._parameters and self._parameters["Minimizer"] == "TNC":
- self.setParameterValue("StoreInternalVariables",True)
- #
# Opérateurs
# ----------
Hm = HO["Direct"].appliedControledFormTo
def run(self, Xb=None, Y=None, U=None, HO=None, EM=None, CM=None, R=None, B=None, Q=None, Parameters=None):
self._pre_run(Parameters, Xb, Y, U, HO, EM, CM, R, B, Q)
#
- # Correction pour pallier a un bug de TNC sur le retour du Minimum
- if "Minimizer" in self._parameters and self._parameters["Minimizer"] == "TNC":
- self.setParameterValue("StoreInternalVariables",True)
- #
# Opérateurs
# ----------
Hm = HO["Direct"].appliedTo
__test_ovalue( EM, "EM", "Evolution", "M" )
__test_ovalue( CM, "CM", "Control Model", "C" )
#
+ # Corrections et compléments des bornes
if ("Bounds" in self._parameters) and isinstance(self._parameters["Bounds"], (list, tuple)) and (len(self._parameters["Bounds"]) > 0):
logging.debug("%s Prise en compte des bornes effectuee"%(self._name,))
else:
else:
if self._parameters["InitializationPoint"] is None:
raise ValueError("Forced initial point can not be set without any given Background or required value")
+ #
+ # Correction pour pallier a un bug de TNC sur le retour du Minimum
+ if "Minimizer" in self._parameters and self._parameters["Minimizer"] == "TNC":
+ self.setParameterValue("StoreInternalVariables",True)
+ #
+ # Verbosité et logging
if logging.getLogger().level < logging.WARNING:
self._parameters["optiprint"], self._parameters["optdisp"] = 1, 1
if PlatformInfo.has_scipy:
valeurs.
"""
#
- # Correction pour pallier a un bug de TNC sur le retour du Minimum
- if "Minimizer" in selfA._parameters and selfA._parameters["Minimizer"] == "TNC":
- selfA.setParameterValue("StoreInternalVariables",True)
- #
# Opérateurs
# ----------
Hm = HO["Direct"].appliedTo
# ----------------------
Xa = numpy.asmatrix(numpy.ravel( Minimum )).T
#
- selfA.StoredVariables["Analysis"].store( Xa.A1 )
+ selfA.StoredVariables["Analysis"].store( Xa )
#
if selfA._toStore("OMA") or \
selfA._toStore("SigmaObs2") or \
valeurs.
"""
#
- # Correction pour pallier a un bug de TNC sur le retour du Minimum
- if "Minimizer" in selfA._parameters and selfA._parameters["Minimizer"] == "TNC":
- selfA.setParameterValue("StoreInternalVariables",True)
- #
# Initialisations
# ---------------
Hm = HO["Direct"].appliedTo
valeurs.
"""
#
- # Correction pour pallier a un bug de TNC sur le retour du Minimum
- if "Minimizer" in selfA._parameters and selfA._parameters["Minimizer"] == "TNC":
- selfA.setParameterValue("StoreInternalVariables",True)
- #
# Initialisations
# ---------------
#
valeurs.
"""
#
- # Correction pour pallier a un bug de TNC sur le retour du Minimum
- if "Minimizer" in selfA._parameters and selfA._parameters["Minimizer"] == "TNC":
- selfA.setParameterValue("StoreInternalVariables",True)
- #
# Initialisations
# ---------------
#
Xn = EnsembleOfBackgroundPerturbations( Xb, None, __m )
#
if len(selfA.StoredVariables["Analysis"])==0 or not selfA._parameters["nextStep"]:
- selfA.StoredVariables["Analysis"].store( numpy.ravel(Xb) )
+ selfA.StoredVariables["Analysis"].store( Xb )
if selfA._toStore("APosterioriCovariance"):
selfA.StoredVariables["APosterioriCovariance"].store( Pn )
covarianceXa = Pn
Xn = EnsembleOfBackgroundPerturbations( Xb, None, __m )
#
if len(selfA.StoredVariables["Analysis"])==0 or not selfA._parameters["nextStep"]:
- selfA.StoredVariables["Analysis"].store( numpy.ravel(Xb) )
+ selfA.StoredVariables["Analysis"].store( Xb )
if selfA._toStore("APosterioriCovariance"):
selfA.StoredVariables["APosterioriCovariance"].store( Pn )
covarianceXa = Pn
#
# Mean of forecast and observation of forecast
Xfm = Xn_predicted.mean(axis=1, dtype=mfp).astype('float').reshape((__n,-1))
- Hfm = HX_predicted.mean(axis=1, dtype=mfp).astype('float').reshape((__p,1))
+ Hfm = HX_predicted.mean(axis=1, dtype=mfp).astype('float').reshape((__p,-1))
#
# Anomalies
EaX = EnsembleOfAnomalies( Xn_predicted )
Xn = EnsembleOfBackgroundPerturbations( Xb, None, __m )
#
if len(selfA.StoredVariables["Analysis"])==0 or not selfA._parameters["nextStep"]:
- selfA.StoredVariables["Analysis"].store( numpy.ravel(Xb) )
+ selfA.StoredVariables["Analysis"].store( Xb )
if selfA._toStore("APosterioriCovariance"):
selfA.StoredVariables["APosterioriCovariance"].store( Pn )
covarianceXa = Pn
Xn = EnsembleOfBackgroundPerturbations( Xb, Pn, __m )
#
if len(selfA.StoredVariables["Analysis"])==0 or not selfA._parameters["nextStep"]:
- selfA.StoredVariables["Analysis"].store( numpy.ravel(Xb) )
+ selfA.StoredVariables["Analysis"].store( Xb )
if selfA._toStore("APosterioriCovariance"):
selfA.StoredVariables["APosterioriCovariance"].store( Pn )
covarianceXa = Pn