From 90a1ca09633c03ed7d88e621efa237afea4f25b6 Mon Sep 17 00:00:00 2001 From: Anne Philipp <anne.philipp@univie.ac.at> Date: Sun, 10 Mar 2019 17:49:27 +0100 Subject: [PATCH] added switch to select for calculation of extra synthesized ensembles from ELDA stream or not --- run/control/CONTROL.documentation | 3 +- run/control/CONTROL_ZAMG_SYNTH_ELDA | 45 +++++++++++++------------- source/python/classes/ControlFile.py | 11 +++++-- source/python/mods/prepare_flexpart.py | 8 ++--- 4 files changed, 37 insertions(+), 30 deletions(-) diff --git a/run/control/CONTROL.documentation b/run/control/CONTROL.documentation index 1c47f08..f56313c 100644 --- a/run/control/CONTROL.documentation +++ b/run/control/CONTROL.documentation @@ -22,7 +22,7 @@ GATEWAY None #=============================================================================== # GENERAL SECTION: -# Specific storage, notifcication and data transfer settings. +# Specific storage, notification and data transfer settings. # Selection of ECMWF access interface and extra output options. #------------------------------------------------------------------------------- DEBUG 0 @@ -111,6 +111,7 @@ ETAPAR 77 #------------------------------------------------------------------------------- CWC 0 WRF 0 +DOUBLEELDA 0 ADDPAR None #=============================================================================== diff --git a/run/control/CONTROL_ZAMG_SYNTH_ELDA b/run/control/CONTROL_ZAMG_SYNTH_ELDA index 15e9d7c..7b6ed9a 100644 --- a/run/control/CONTROL_ZAMG_SYNTH_ELDA +++ b/run/control/CONTROL_ZAMG_SYNTH_ELDA @@ -1,22 +1,23 @@ -DTIME 3 -TYPE AN FC AN FC AN FC AN FC -TIME 00 18 06 06 12 06 18 18 -STEP 00 09 00 03 00 09 00 03 -ACCTIME 06/18 -ACCMAXSTEP 12 -ACCTYPE FC -CLASS OD -STREAM ELDA -PREFIX EL -UPPER 30. -LOWER 10. -LEFT -10. -RIGHT 10. -NUMBER 0/to/25 -GRID 1. -RESOL 159 -ETA 1 -CWC 1 -LEVELIST 130/TO/137 -ADDPAR 186/187/188/235/139/39/134 -ECTRANS 1 +DTIME 3 +TYPE AN FC AN FC AN FC AN FC +TIME 00 18 06 06 12 06 18 18 +STEP 00 09 00 03 00 09 00 03 +ACCTIME 06/18 +ACCMAXSTEP 12 +ACCTYPE FC +CLASS OD +STREAM ELDA +PREFIX EL +UPPER 5. +LOWER -5. +LEFT -2. +RIGHT 2. +NUMBER 0/to/2 +GRID 1. +RESOL 159 +ETA 1 +LEVELIST 135/TO/137 +ADDPAR 186/187/188/235/139/39/134 +ECTRANS 1 +RRINT 1 +DOUBLEELDA 0 diff --git a/source/python/classes/ControlFile.py b/source/python/classes/ControlFile.py index 48026ad..1ff3ec9 100644 --- a/source/python/classes/ControlFile.py +++ b/source/python/classes/ControlFile.py @@ -329,15 +329,19 @@ class ControlFile(object): Switch to decide wether the job is a pure forecast retrieval or coupled with analysis data. Default value is 0. - rrint: int + rrint : int Switch to select between old precipitation disaggregation method (0) or the new IA3 disaggegration method (1). Default value is 0. + doubleelda : int + Switch to select the calculation of extra ensemble members for the + ELDA stream. It doubles the amount of retrieved ensemble members. + logicals : list of str List of the names of logical switches which controls the flow of the program. Default list is ['gauss', 'omega', 'omegadiff', 'eta', 'etadiff', 'dpdeta', 'cwc', 'wrf', 'grib2flexpart', 'ecstorage', - 'ectrans', 'debug', 'request', 'public', 'purefc', 'rrint'] + 'ectrans', 'debug', 'request', 'public', 'purefc', 'rrint', 'doubleelda'] ''' def __init__(self, filename): @@ -424,11 +428,12 @@ class ControlFile(object): self.cds_api = None self.purefc = 0 self.rrint = 0 + self.doubleelda = 0 self.logicals = ['gauss', 'omega', 'omegadiff', 'eta', 'etadiff', 'dpdeta', 'cwc', 'wrf', 'grib2flexpart', 'ecstorage', 'ectrans', 'debug', 'oper', 'request', 'public', - 'purefc', 'rrint'] + 'purefc', 'rrint', 'doubleelda'] self._read_controlfile() diff --git a/source/python/mods/prepare_flexpart.py b/source/python/mods/prepare_flexpart.py index 0d6cfe8..eae0189 100755 --- a/source/python/mods/prepare_flexpart.py +++ b/source/python/mods/prepare_flexpart.py @@ -70,11 +70,11 @@ import socket sys.path.append(os.path.dirname(os.path.abspath( inspect.getfile(inspect.currentframe()))) + '/../') import _config -from .checks import check_ppid +from mods.checks import check_ppid from classes.UioFiles import UioFiles from classes.ControlFile import ControlFile -from .tools import (setup_controldata, clean_up, get_cmdline_args, - read_ecenv, make_dir) +from mods.tools import (setup_controldata, clean_up, get_cmdline_args, + read_ecenv, make_dir, normal_exit) from classes.EcFlexpart import EcFlexpart # ------------------------------------------------------------------------------ @@ -162,7 +162,7 @@ def prepare_flexpart(ppid, c): # copy/transfer/interpolate them or make them GRIB2 flexpart = EcFlexpart(c, fluxes=False) flexpart.create(inputfiles, c) - if c.stream.lower() == 'elda': + if c.stream.lower() == 'elda' and c.doubleelda: flexpart.calc_extra_elda(c.inputdir, c.prefix) flexpart.process_output(c) -- GitLab