Skip to content

Commit

Permalink
Per #1289, read new config variables that support setting explicit fi…
Browse files Browse the repository at this point in the history
…le list file path for ensembles
  • Loading branch information
georgemccabe committed Jan 31, 2022
1 parent 824a3ba commit 1a62528
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
9 changes: 7 additions & 2 deletions metplus/wrappers/ensemble_stat_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,13 @@ def create_c_dict(self):
c_dict['FCST_INPUT_TEMPLATE'] = (
self.config.getraw('config', 'FCST_ENSEMBLE_STAT_INPUT_TEMPLATE')
)
if not c_dict['FCST_INPUT_TEMPLATE']:
self.log_error("Must set FCST_ENSEMBLE_STAT_INPUT_TEMPLATE")
c_dict['FCST_INPUT_FILE_LIST'] = (
self.config.getraw('config', 'FCST_ENSEMBLE_STAT_INPUT_FILE_LIST')
)
if (not c_dict['FCST_INPUT_TEMPLATE'] and
not c_dict['FCST_INPUT_FILE_LIST']):
self.log_error("Must set FCST_ENSEMBLE_STAT_INPUT_TEMPLATE or "
"FCST_ENSEMBLE_STAT_INPUT_FILE_LIST")

c_dict['OUTPUT_DIR'] = self.config.getdir('ENSEMBLE_STAT_OUTPUT_DIR',
'')
Expand Down
10 changes: 8 additions & 2 deletions metplus/wrappers/gen_ens_prod_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,14 @@ def create_c_dict(self):
c_dict['FCST_INPUT_DIR'] = self.config.getdir('GEN_ENS_PROD_INPUT_DIR',
'')

if not c_dict['FCST_INPUT_TEMPLATE']:
self.log_error('GEN_ENS_PROD_INPUT_TEMPLATE must be set')
c_dict['FCST_INPUT_FILE_LIST'] = (
self.config.getraw('config', 'GEN_ENS_PROD_INPUT_FILE_LIST')
)

if (not c_dict['FCST_INPUT_TEMPLATE'] or
c_dict['FCST_INPUT_FILE_LIST']):
self.log_error('GEN_ENS_PROD_INPUT_TEMPLATE or '
'GEN_ENS_PROD_INPUT_FILE_LIST must be set')

# not all input files are mandatory to be found
c_dict['MANDATORY'] = False
Expand Down

0 comments on commit 1a62528

Please sign in to comment.