Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
200 changes: 100 additions & 100 deletions parm/FV3LAM_wflow.xml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tests/WE2E/get_expts_status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ USHdir="$HOMEdir/ush"
#-----------------------------------------------------------------------
#
. $USHdir/source_util_funcs.sh
source_config $USHdir/constants.yaml
#
#-----------------------------------------------------------------------
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ metadata:
three tasks.
user:
RUN_ENVIR: community
platform:
RUN_CMD_UTILS: cd $yyyymmdd
RUN_CMD_FCST: mpirun -np ${PE_MEMBER01}
RUN_CMD_POST: echo hello $yyyymmdd
workflow:
CCPP_PHYS_SUITE: FV3_GFS_v15p2
DATE_FIRST_CYCL: '20190701'
Expand Down
2 changes: 2 additions & 0 deletions ush/machine/cheyenne.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ platform:
PRE_TASK_CMDS: '{ ulimit -s unlimited; ulimit -a; }'
TEST_EXTRN_MDL_SOURCE_BASEDIR: /glade/p/ral/jntp/UFS_SRW_App/develop/input_model_data
TEST_PREGEN_BASEDIR: /glade/p/ral/jntp/UFS_SRW_App/develop/FV3LAM_pregen
TEST_ALT_EXTRN_MDL_SYSBASEDIR_ICS: /glade/p/ral/jntp/UFS_SRW_App/develop/dummy_FV3GFS_sys_dir
TEST_ALT_EXTRN_MDL_SYSBASEDIR_LBCS: /glade/p/ral/jntp/UFS_SRW_App/develop/dummy_FV3GFS_sys_dir
task_run_fcst:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the point of adding these directories and the "TEST_ALT"?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JeffBeck-NOAA Test cases such as specify_EXTRN_MDL_SYSBASEDIR_ICS_LBCS fail when I run the comprehensive test without it. Hera and Gaea had them before but the rest of the machines didn't so I added it to all of them in case such test cases are run there. The logic behind TEST_ALT_* seems to not be ideal, for example see this issue #364 that plans to change it.

FIXaer: /glade/p/ral/jntp/UFS_SRW_App/develop/fix/fix_aer
FIXgsm: /glade/p/ral/jntp/UFS_SRW_App/develop/fix/fix_am
Expand Down
4 changes: 2 additions & 2 deletions ush/machine/gaea.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ platform:
PRE_TASK_CMDS: '{ ulimit -s unlimited; ulimit -a; }'
TEST_EXTRN_MDL_SOURCE_BASEDIR: /lustre/f2/pdata/ncep_shared/UFS_SRW_App/develop/input_model_data
TEST_PREGEN_BASEDIR: /lustre/f2/pdata/ncep_shared/UFS_SRW_App/develop/FV3LAM_pregen
task_make_lbcs:
WTIME_MAKE_LBCS: 00:60:00
TEST_ALT_EXTRN_MDL_SYSBASEDIR_ICS: /lustre/f2/pdata/ncep_shared/UFS_SRW_App/develop/dummy_FV3GFS_sys_dir
TEST_ALT_EXTRN_MDL_SYSBASEDIR_LBCS: /lustre/f2/pdata/ncep_shared/UFS_SRW_App/develop/dummy_FV3GFS_sys_dir
task_run_fcst:
FIXaer: /lustre/f2/pdata/ncep_shared/UFS_SRW_App/develop/fix/fix_aer
FIXgsm: /lustre/f2/pdata/ncep_shared/UFS_SRW_App/develop/fix/fix_am
Expand Down
2 changes: 2 additions & 0 deletions ush/machine/hera.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ platform:
PRE_TASK_CMDS: '{ ulimit -s unlimited; ulimit -a; }'
TEST_EXTRN_MDL_SOURCE_BASEDIR: /scratch2/BMC/det/UFS_SRW_App/develop/input_model_data
TEST_PREGEN_BASEDIR: /scratch2/BMC/det/UFS_SRW_App/develop/FV3LAM_pregen
TEST_ALT_EXTRN_MDL_SYSBASEDIR_ICS: /scratch2/BMC/det/UFS_SRW_app/develop/dummy_FV3GFS_sys_dir
TEST_ALT_EXTRN_MDL_SYSBASEDIR_LBCS: /scratch2/BMC/det/UFS_SRW_app/develop/dummy_FV3GFS_sys_dir
task_get_extrn_ics:
EXTRN_MDL_DATA_STORES: hpss aws nomads
task_get_extrn_lbcs:
Expand Down
2 changes: 2 additions & 0 deletions ush/machine/jet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ platform:
PRE_TASK_CMDS: '{ ulimit -s unlimited; ulimit -a; }'
TEST_EXTRN_MDL_SOURCE_BASEDIR: /mnt/lfs4/BMC/wrfruc/UFS_SRW_App/develop/input_model_data
TEST_PREGEN_BASEDIR: /mnt/lfs4/BMC/wrfruc/UFS_SRW_App/develop/FV3LAM_pregen
TEST_ALT_EXTRN_MDL_SYSBASEDIR_ICS: /mnt/lfs4/BMC/wrfruc/UFS_SRW_App/develop/dummy_FV3GFS_sys_dir
TEST_ALT_EXTRN_MDL_SYSBASEDIR_LBCS: /mnt/lfs4/BMC/wrfruc/UFS_SRW_App/develop/dummy_FV3GFS_sys_dir
task_get_extrn_ics:
EXTRN_MDL_DATA_STORES: hpss aws nomads
task_get_extrn_lbcs:
Expand Down
3 changes: 3 additions & 0 deletions ush/machine/noaacloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ platform:
PRE_TASK_CMDS: '{ ulimit -s unlimited; ulimit -a; }'
BUILD_MOD_FN: wflow_noaacloud
TEST_EXTRN_MDL_SOURCE_BASEDIR: /contrib/EPIC/UFS_SRW_App/develop/input_model_data
TEST_PREGEN_BASEDIR: /contrib/EPIC/UFS_SRW_App/develop/FV3LAM_pregen
TEST_ALT_EXTRN_MDL_SYSBASEDIR_ICS: /contrib/EPIC/UFS_SRW_App/develop/dummy_FV3GFS_sys_dir
TEST_ALT_EXTRN_MDL_SYSBASEDIR_LBCS: /contrib/EPIC/UFS_SRW_App/develop/dummy_FV3GFS_sys_dir
task_get_extrn_ics:
EXTRN_MDL_DATA_STORES: aws nomads
task_get_extrn_lbcs:
Expand Down
2 changes: 2 additions & 0 deletions ush/machine/odin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ platform:
PRE_TASK_CMDS: '{ ulimit -s unlimited; ulimit -a; }'
TEST_EXTRN_MDL_SOURCE_BASEDIR: /scratch/ywang/UFS_SRW_App/develop/input_model_data
TEST_PREGEN_BASEDIR: /scratch/ywang/UFS_SRW_App/develop/FV3LAM_pregen
TEST_ALT_EXTRN_MDL_SYSBASEDIR_ICS: /scratch/ywang/UFS_SRW_App/develop/dummy_FV3GFS_sys_dir
TEST_ALT_EXTRN_MDL_SYSBASEDIR_LBCS: /scratch/ywang/UFS_SRW_App/develop/dummy_FV3GFS_sys_dir
task_run_fcst:
FIXaer: /scratch/ywang/UFS_SRW_App/develop/fix/fix_aer
FIXgsm: /scratch/ywang/UFS_SRW_App/develop/fix/fix_am
Expand Down
2 changes: 2 additions & 0 deletions ush/machine/stampede.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ platform:
PRE_TASK_CMDS: '{ ulimit -s unlimited; ulimit -a; }'
TEST_EXTRN_MDL_SOURCE_BASEDIR: /work2/00315/tg455890/stampede2/UFS_SRW_App/develop/input_model_data
TEST_PREGEN_BASEDIR: /work2/00315/tg455890/stampede2/UFS_SRW_App/develop/FV3LAM_pregen
TEST_ALT_EXTRN_MDL_SYSBASEDIR_ICS: /work2/00315/tg455890/stampede2/UFS_SRW_App/develop/dummy_FV3GFS_sys_dir
TEST_ALT_EXTRN_MDL_SYSBASEDIR_LBCS: /work2/00315/tg455890/stampede2/UFS_SRW_App/develop/dummy_FV3GFS_sys_dir
task_run_fcst:
FIXaer: /work2/00315/tg455890/stampede2/UFS_SRW_App/develop/fix/fix_aer
FIXgsm: /work2/00315/tg455890/stampede2/UFS_SRW_App/develop/fix/fix_am
Expand Down
61 changes: 37 additions & 24 deletions ush/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,21 @@ def setup():
#
# -----------------------------------------------------------------------
#
# Step-1 of config
# ================
# Set the name of the configuration file containing default values for
# the experiment/workflow variables. Then source the file.
# the experiment/workflow variables. Then load its content.
#
# -----------------------------------------------------------------------
#
EXPT_DEFAULT_CONFIG_FN = "config_defaults.yaml"
cfg_d = load_config_file(os.path.join(USHdir, EXPT_DEFAULT_CONFIG_FN))
import_vars(dictionary=flatten_dict(cfg_d))
EXPT_CONFIG_FN = cfg_d["workflow"]["EXPT_CONFIG_FN"]

#
# -----------------------------------------------------------------------
#
# If a user-specified configuration file exists, source it. This file
# Load the user config file but don't source it yet. This file
# contains user-specified values for a subset of the experiment/workflow
# variables that override their default values. Note that the user-
# specified configuration file is not tracked by the repository, whereas
Expand All @@ -94,28 +96,28 @@ def setup():
# -----------------------------------------------------------------------
#
if os.path.exists(EXPT_CONFIG_FN):
#
# We require that the variables being set in the user-specified configu-
# ration file have counterparts in the default configuration file. This
# is so that we do not introduce new variables in the user-specified
# configuration file without also officially introducing them in the de-
# fault configuration file. Thus, before sourcing the user-specified
# configuration file, we check that all variables in the user-specified
# configuration file are also assigned default values in the default
# configuration file.
#
cfg_u = load_config_file(os.path.join(USHdir, EXPT_CONFIG_FN))
cfg_u = flatten_dict(cfg_u)
import_vars(dictionary=cfg_u)
update_dict(cfg_u, cfg_d)
import_vars(dictionary=cfg_u,
env_vars=["MACHINE",
"EXTRN_MDL_NAME_ICS", "EXTRN_MDL_NAME_LBCS",
"FV3GFS_FILE_FMT_ICS", "FV3GFS_FILE_FMT_LBCS"])
else:
print_err_msg_exit(
f'''
User config file not found
EXPT_CONFIG_FN = \"{EXPT_CONFIG_FN}\"'''
)
#
# -----------------------------------------------------------------------
#
# Source machine specific file
# Step-2 of config
# ================
# Source machine specific config file to set default values
#
# -----------------------------------------------------------------------
#
global MACHINE
global MACHINE, EXTRN_MDL_SYSBASEDIR_ICS, EXTRN_MDL_SYSBASEDIR_LBCS
MACHINE_FILE = os.path.join(USHdir, "machine", f"{lowercase(MACHINE)}.yaml")
machine_cfg = load_config_file(MACHINE_FILE)

Expand All @@ -130,11 +132,8 @@ def get_location(xcs,fmt):
else:
return ""

global EXTRN_MDL_SYSBASEDIR_ICS, EXTRN_MDL_SYSBASEDIR_LBCS
EXTRN_MDL_SYSBASEDIR_ICS = EXTRN_MDL_SYSBASEDIR_ICS or \
get_location(EXTRN_MDL_NAME_ICS, FV3GFS_FILE_FMT_ICS)
EXTRN_MDL_SYSBASEDIR_LBCS = EXTRN_MDL_SYSBASEDIR_LBCS or \
get_location(EXTRN_MDL_NAME_LBCS, FV3GFS_FILE_FMT_LBCS)
EXTRN_MDL_SYSBASEDIR_ICS = get_location(EXTRN_MDL_NAME_ICS, FV3GFS_FILE_FMT_ICS)
EXTRN_MDL_SYSBASEDIR_LBCS = get_location(EXTRN_MDL_NAME_LBCS, FV3GFS_FILE_FMT_LBCS)

# remove the data key and provide machine specific default values for cfg_d
if "data" in machine_cfg:
Expand All @@ -144,10 +143,24 @@ def get_location(xcs,fmt):
"EXTRN_MDL_SYSBASEDIR_LBCS": EXTRN_MDL_SYSBASEDIR_LBCS,
})
machine_cfg = flatten_dict(machine_cfg)
update_dict(machine_cfg, cfg_d, True)
update_dict(machine_cfg, cfg_d)

# import cfg_d again
#
# -----------------------------------------------------------------------
#
# Step-3 of config
# ================
# Source user config. This overrides previous two configs
#
# -----------------------------------------------------------------------
#
update_dict(cfg_u, cfg_d)

# Now that all 3 config files have their contribution in cfg_d
# import its content to python globals()
import_vars(dictionary=flatten_dict(cfg_d))

# make machine name uppercase
MACHINE = uppercase(MACHINE)

#
Expand Down