From 71304edf6089174127c149861f4b4259ed4cf33e Mon Sep 17 00:00:00 2001 From: Daniel Abdi Date: Thu, 9 Mar 2023 04:38:34 +0000 Subject: [PATCH] Undo DO_ENSEMBLE relocation in config_defaults. --- .../config.MET_ensemble_verification.yaml | 2 +- .../config.community_ensemble_008mems.yaml | 3 +-- .../config.community_ensemble_2mems.yaml | 3 +-- ...config.community_ensemble_2mems_stoch.yaml | 3 +-- .../wflow_features/config.nco_ensemble.yaml | 2 +- .../config.subhourly_post_ensemble_2mems.yaml | 3 +-- ush/config.rrfs.yaml | 2 ++ ush/config_defaults.yaml | 21 ++++++++++++------- ush/generate_FV3LAM_wflow.py | 2 +- ush/setup.py | 2 +- 10 files changed, 23 insertions(+), 20 deletions(-) diff --git a/tests/WE2E/test_configs/verification/config.MET_ensemble_verification.yaml b/tests/WE2E/test_configs/verification/config.MET_ensemble_verification.yaml index 10fbd47deb..d5b01f6816 100644 --- a/tests/WE2E/test_configs/verification/config.MET_ensemble_verification.yaml +++ b/tests/WE2E/test_configs/verification/config.MET_ensemble_verification.yaml @@ -16,7 +16,6 @@ workflow_switches: RUN_TASK_VX_POINTSTAT: true RUN_TASK_VX_ENSGRID: true RUN_TASK_VX_ENSPOINT: true - DO_ENSEMBLE: true task_get_extrn_ics: EXTRN_MDL_NAME_ICS: FV3GFS FV3GFS_FILE_FMT_ICS: grib2 @@ -29,6 +28,7 @@ task_get_extrn_lbcs: task_run_fcst: WTIME_RUN_FCST: 01:00:00 global: + DO_ENSEMBLE: true NUM_ENS_MEMBERS: 2 verification: VX_FCST_MODEL_NAME: FV3_GFS_v15p2_CONUS_25km diff --git a/tests/WE2E/test_configs/wflow_features/config.community_ensemble_008mems.yaml b/tests/WE2E/test_configs/wflow_features/config.community_ensemble_008mems.yaml index 5abd4a572a..e7e8ae4e84 100644 --- a/tests/WE2E/test_configs/wflow_features/config.community_ensemble_008mems.yaml +++ b/tests/WE2E/test_configs/wflow_features/config.community_ensemble_008mems.yaml @@ -16,8 +16,6 @@ workflow: INCR_CYCL_FREQ: 12 FCST_LEN_HRS: 6 PREEXISTING_DIR_METHOD: rename -workflow_switches: - DO_ENSEMBLE: true task_get_extrn_ics: EXTRN_MDL_NAME_ICS: FV3GFS USE_USER_STAGED_EXTRN_FILES: true @@ -26,4 +24,5 @@ task_get_extrn_lbcs: LBC_SPEC_INTVL_HRS: 3 USE_USER_STAGED_EXTRN_FILES: true global: + DO_ENSEMBLE: true NUM_ENS_MEMBERS: 8 diff --git a/tests/WE2E/test_configs/wflow_features/config.community_ensemble_2mems.yaml b/tests/WE2E/test_configs/wflow_features/config.community_ensemble_2mems.yaml index 17320db4a9..8e52964f0a 100644 --- a/tests/WE2E/test_configs/wflow_features/config.community_ensemble_2mems.yaml +++ b/tests/WE2E/test_configs/wflow_features/config.community_ensemble_2mems.yaml @@ -19,8 +19,6 @@ workflow: INCR_CYCL_FREQ: 12 FCST_LEN_HRS: 6 PREEXISTING_DIR_METHOD: rename -workflow_switches: - DO_ENSEMBLE: true task_get_extrn_ics: EXTRN_MDL_NAME_ICS: FV3GFS USE_USER_STAGED_EXTRN_FILES: true @@ -29,4 +27,5 @@ task_get_extrn_lbcs: LBC_SPEC_INTVL_HRS: 3 USE_USER_STAGED_EXTRN_FILES: true global: + DO_ENSEMBLE: true NUM_ENS_MEMBERS: 2 diff --git a/tests/WE2E/test_configs/wflow_features/config.community_ensemble_2mems_stoch.yaml b/tests/WE2E/test_configs/wflow_features/config.community_ensemble_2mems_stoch.yaml index f243adf581..ab5c6bdde0 100644 --- a/tests/WE2E/test_configs/wflow_features/config.community_ensemble_2mems_stoch.yaml +++ b/tests/WE2E/test_configs/wflow_features/config.community_ensemble_2mems_stoch.yaml @@ -16,8 +16,6 @@ workflow: DATE_LAST_CYCL: '2020081000' FCST_LEN_HRS: 3 PREEXISTING_DIR_METHOD: rename -workflow_switches: - DO_ENSEMBLE: true task_get_extrn_ics: EXTRN_MDL_NAME_ICS: HRRR USE_USER_STAGED_EXTRN_FILES: true @@ -30,6 +28,7 @@ task_get_extrn_lbcs: EXTRN_MDL_FILES_LBCS: - '{yy}{jjj}{hh}00{fcst_hr:02d}00' global: + DO_ENSEMBLE: true NUM_ENS_MEMBERS: 2 DO_SHUM: true DO_SPPT: true diff --git a/tests/WE2E/test_configs/wflow_features/config.nco_ensemble.yaml b/tests/WE2E/test_configs/wflow_features/config.nco_ensemble.yaml index 94965f7d6d..d12aeb80f6 100644 --- a/tests/WE2E/test_configs/wflow_features/config.nco_ensemble.yaml +++ b/tests/WE2E/test_configs/wflow_features/config.nco_ensemble.yaml @@ -23,7 +23,6 @@ workflow_switches: RUN_TASK_MAKE_GRID: false RUN_TASK_MAKE_OROG: false RUN_TASK_MAKE_SFC_CLIMO: false - DO_ENSEMBLE: true task_get_extrn_ics: EXTRN_MDL_NAME_ICS: FV3GFS USE_USER_STAGED_EXTRN_FILES: true @@ -32,4 +31,5 @@ task_get_extrn_lbcs: LBC_SPEC_INTVL_HRS: 3 USE_USER_STAGED_EXTRN_FILES: true global: + DO_ENSEMBLE: true NUM_ENS_MEMBERS: 2 diff --git a/tests/WE2E/test_configs/wflow_features/config.subhourly_post_ensemble_2mems.yaml b/tests/WE2E/test_configs/wflow_features/config.subhourly_post_ensemble_2mems.yaml index 909f08206d..08518f5b0f 100644 --- a/tests/WE2E/test_configs/wflow_features/config.subhourly_post_ensemble_2mems.yaml +++ b/tests/WE2E/test_configs/wflow_features/config.subhourly_post_ensemble_2mems.yaml @@ -16,8 +16,6 @@ workflow: DATE_LAST_CYCL: '2020081000' FCST_LEN_HRS: 3 PREEXISTING_DIR_METHOD: rename -workflow_switches: - DO_ENSEMBLE: true task_get_extrn_ics: EXTRN_MDL_NAME_ICS: HRRR USE_USER_STAGED_EXTRN_FILES: true @@ -35,4 +33,5 @@ task_run_post: SUB_HOURLY_POST: true DT_SUBHOURLY_POST_MNTS: 12 global: + DO_ENSEMBLE: true NUM_ENS_MEMBERS: 2 diff --git a/ush/config.rrfs.yaml b/ush/config.rrfs.yaml index abb0f01aef..e452f44690 100644 --- a/ush/config.rrfs.yaml +++ b/ush/config.rrfs.yaml @@ -49,6 +49,7 @@ workflow_switches: RUN_TASK_MAKE_OROG: false RUN_TASK_MAKE_SFC_CLIMO: false RUN_TASK_PLOT_ALLVARS: false +rrfs: DO_DACYCLE: true DO_SURFACE_CYCLE: true DO_SPINUP: true @@ -130,6 +131,7 @@ task_run_graphics: TILE_LABELS: "full" TILE_SETS: "full" global: + DO_ENSEMBLE: false NUM_ENS_MEMBERS: 9 HALO_BLEND: 20 PRINT_DIFF_PGR: true diff --git a/ush/config_defaults.yaml b/ush/config_defaults.yaml index 9552b47646..3f1040737a 100644 --- a/ush/config_defaults.yaml +++ b/ush/config_defaults.yaml @@ -1308,6 +1308,12 @@ workflow_switches: RUN_TASK_POST_STAT_PM25: false RUN_TASK_BIAS_CORRECTION_O3: false RUN_TASK_BIAS_CORRECTION_PM25: false + +#---------------------------- +# DO_ parameters. These look like workflow switches since some +# of them are used in FV3LAM_wflow.xml +#----------------------------- +rrfs: # #----------------------------------------------------------------------- # @@ -1345,12 +1351,6 @@ workflow_switches: # # Set switches associated with ensembles. Definitions: # - # DO_ENSEMBLE: - # Flag that determines whether to run a set of ensemble forecasts (for - # each set of specified cycles). If this is set to true, NUM_ENS_MEMBERS - # forecasts are run for each cycle, each with a different set of stochastic - # seed values. Otherwise, a single forecast is run for each cycle. - # # DO_ENSCONTROL: # In ensemble mode, whether or not to run member 1 as control member # @@ -1391,7 +1391,6 @@ workflow_switches: # #----------------------------------------------------------------------- # - DO_ENSEMBLE: false DO_ENSFCST: false DO_ENSCONTROL: false DO_GSIOBSERVER: false @@ -2554,7 +2553,6 @@ task_make_lbcs: KMP_AFFINITY_MAKE_LBCS: "scatter" OMP_NUM_THREADS_MAKE_LBCS: 1 OMP_STACKSIZE_MAKE_LBCS: "1024m" - LBC_SPEC_FCST_HRS: '( {% for h in range(0 if workflow_switches.DO_RRFS_DEV else task_get_extrn_lbcs.LBC_SPEC_INTVL_HRS, task_get_extrn_lbcs.LBC_SPEC_INTVL_HRS + [workflow.FCST_LEN_HRS, workflow.BOUNDARY_LEN_HRS]|max, task_get_extrn_lbcs.LBC_SPEC_INTVL_HRS) %}{{ "%d " % h }}{% endfor %} )' #---------------------------- # FORECAST config parameters @@ -3607,6 +3605,12 @@ global: # # Set parameters associated with running ensembles. Definitions: # + # DO_ENSEMBLE: + # Flag that determines whether to run a set of ensemble forecasts (for + # each set of specified cycles). If this is set to true, NUM_ENS_MEMBERS + # forecasts are run for each cycle, each with a different set of stochastic + # seed values. Otherwise, a single forecast is run for each cycle. + # # NUM_ENS_MEMBERS: # The number of ensemble members to run if DO_ENSEMBLE is set to true. # This variable also controls the naming of the ensemble member directories. @@ -3636,6 +3640,7 @@ global: # #----------------------------------------------------------------------- # + DO_ENSEMBLE: false NUM_ENS_MEMBERS: 0 NUM_ENS_MEMBERS_FCST: 0 ENSMEM_NAMES: '{% for m in range(NUM_ENS_MEMBERS) %} "mem%03d, " % m {% endfor %}' diff --git a/ush/generate_FV3LAM_wflow.py b/ush/generate_FV3LAM_wflow.py index aab631b021..f4172123b1 100755 --- a/ush/generate_FV3LAM_wflow.py +++ b/ush/generate_FV3LAM_wflow.py @@ -121,7 +121,7 @@ def generate_FV3LAM_wflow(ushdir, logfile: str = "log.generate_FV3LAM_wflow", de ensmem_indx_name = "" uscore_ensmem_name = "" slash_ensmem_subdir = "" - if expt_config["workflow_switches"]["DO_ENSEMBLE"]: + if expt_config["global"]["DO_ENSEMBLE"]: ensmem_indx_name = "mem" uscore_ensmem_name = f"_mem#{ensmem_indx_name}#" slash_ensmem_subdir = f"/mem#{ensmem_indx_name}#" diff --git a/ush/setup.py b/ush/setup.py index 569339fce6..56d8d56da8 100644 --- a/ush/setup.py +++ b/ush/setup.py @@ -1105,7 +1105,7 @@ def get_location(xcs, fmt, expt_cfg): # # Ensemble verification can only be run in ensemble mode - do_ensemble = workflow_switches["DO_ENSEMBLE"] + do_ensemble = global_sect["DO_ENSEMBLE"] run_task_vx_ensgrid = workflow_switches["RUN_TASK_VX_ENSGRID"] run_task_vx_enspoint = workflow_switches["RUN_TASK_VX_ENSPOINT"] if (not do_ensemble) and (run_task_vx_ensgrid or run_task_vx_enspoint):