Skip to content

Commit

Permalink
Feature #2742 main_v5.1 fix StatAnalysis to set fcst_lev/obs_lev (#2761)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgemccabe authored Nov 1, 2024
1 parent 5d075af commit fce359b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ def set_minimum_config_settings(config):
'MODEL1': '{custom}',
'MODEL_LIST': '{custom}'},
{'METPLUS_MODEL': 'model = ["CUSTOM_MODEL"];'}),
# 17 - fcst_lev
({'FCST_LEVEL_LIST': 'R5'},
{'METPLUS_FCST_LEVEL': 'fcst_lev = ["R5"];'}),
# 17 - obs_lev
({'OBS_LEVEL_LIST': 'R7'},
{'METPLUS_OBS_LEVEL': 'obs_lev = ["R7"];'}),
]
)
@pytest.mark.wrapper_d
Expand Down
3 changes: 2 additions & 1 deletion metplus/wrappers/stat_analysis_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,8 @@ def _run_stat_analysis_job(self, runtime_settings):
value = f'"{value}"'
else:
value = f'[{value}]'
value = f'{item.lower()} = {value};'
item = item.lower().replace('_level', '_lev')
value = f'{item} = {value};'
self.env_var_dict[key] = value

# send environment variables to logger
Expand Down

0 comments on commit fce359b

Please sign in to comment.