Skip to content

Commit

Permalink
[develop] Fix failing unit test due to renamed variable (#583)
Browse files Browse the repository at this point in the history
PR #566 changed the variable "MODEL" to a more descriptive name, but failed to make this change in config.community.yaml. The unit tests for generate_FV3LAM_wflow.py make use of this file as an input config.yaml, so they are now failing due to this incorrect variable name. This wasn't caught because prior to #558 the unit tests were broken for a different reason.

This change simply makes the appropriate rename, which should fix the failing unit test. Also created an f-string that was missed in a setup.py error message.
  • Loading branch information
mkavulich authored Feb 7, 2023
1 parent 373d1aa commit 844f347
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ush/config.community.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ user:
MACHINE: hera
ACCOUNT: an_account
platform:
MODEL: FV3_GFS_v16_CONUS_25km
MET_INSTALL_DIR: ""
METPLUS_PATH: ""
CCPA_OBS_DIR: ""
Expand Down Expand Up @@ -50,3 +49,5 @@ task_plot_allvars:
global:
DO_ENSEMBLE: false
NUM_ENS_MEMBERS: 2
verification:
VX_FCST_MODEL_NAME: FV3_GFS_v16_CONUS_25km
2 changes: 1 addition & 1 deletion ush/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def load_config_for_setup(ushdir, default_config, user_config):
# config.
invalid = check_structure_dict(cfg_u, cfg_d)
if invalid:
errmsg = "Invalid key(s) specified in {user_config}:\n"
errmsg = f"Invalid key(s) specified in {user_config}:\n"
for entry in invalid:
errmsg = errmsg + f"{entry} = {invalid[entry]}\n"
errmsg = errmsg + f"\nCheck {default_config} for allowed user-specified variables\n"
Expand Down

0 comments on commit 844f347

Please sign in to comment.