Commit e8ae52e3 authored by Miguel Tremblay's avatar Miguel Tremblay
Browse files

Added a check if the model had failed. If so an error message is sent to the...

Added a check if the model had failed.  If so an error message is sent to the log and the application abort.
parent 0d264d14
......@@ -307,17 +307,24 @@ class Metro_model(Metro_module):
metro_logger.print_message(metro_logger.LOGGER_MSG_EXECPRIMARY,
_("Start sending data to METRo core"))
# print "Le vent", lWS
bEchec = []
macadam.Do_Metro(bFlat,\
fLat, fLon, fLCorr,\
lLayerThick, nNbrOfLayer, lLayerType, \
lAT, lQP, lWS, lAP, lSF, lIR, lFT, lPI, lSC,\
lAT_obs,lST_obs, lSST_obs, \
lAH, lTime_obs,\
lSWO, bNoObs,\
lAH, lTime_obs, lSWO, bNoObs,\
fDeltaTMetroObservation, nLenObservation, \
nNbrTimeSteps, bSilent)
bEchec = (macadam.get_echec())[0]
# Check if the execution of the model was a succes:
if bEchec != 0:
sError_message = _("Fatal error in METRo physical model.")
metro_logger.print_message(metro_logger.LOGGER_MSG_STOP,
sError_message)
else:
metro_logger.print_message(metro_logger.LOGGER_MSG_EXECPRIMARY,
_("End of METRo core"))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment