From 2cbe139363f43e8e5e4d995eb3d59c98acb4aba1 Mon Sep 17 00:00:00 2001 From: chan-hoo Date: Thu, 1 Dec 2022 17:20:54 +0000 Subject: [PATCH 1/2] ensure arbitrary restart_interval --- parm/model_configure | 2 +- .../wflow_features/config.specify_RESTART_INTERVAL.yaml | 9 +++++---- ush/config_defaults.yaml | 6 ++++-- ush/setup.py | 6 ------ 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/parm/model_configure b/parm/model_configure index fa2472e336..1b0f7a815a 100644 --- a/parm/model_configure +++ b/parm/model_configure @@ -15,7 +15,7 @@ cpl: {{ cpl }} calendar: 'julian' memuse_verbose: .false. atmos_nthreads: {{ atmos_nthreads }} -restart_interval: {{ restart_interval }} -1 +restart_interval: {{ restart_interval }} output_1st_tstep_rst: .false. write_dopost: {{ write_dopost }} ideflate: 0 diff --git a/tests/WE2E/test_configs/wflow_features/config.specify_RESTART_INTERVAL.yaml b/tests/WE2E/test_configs/wflow_features/config.specify_RESTART_INTERVAL.yaml index 954576895b..bc37ecd5c0 100644 --- a/tests/WE2E/test_configs/wflow_features/config.specify_RESTART_INTERVAL.yaml +++ b/tests/WE2E/test_configs/wflow_features/config.specify_RESTART_INTERVAL.yaml @@ -2,11 +2,11 @@ metadata: description: |- This test checks the capability of the workflow to have the time interval (RESTART_INTERVAL) at which restart files are written by the - forecast model be set to a user-specified value. + forecast model be set to user-specified values. user: RUN_ENVIR: community workflow: - CCPP_PHYS_SUITE: FV3_GFS_v15p2 + CCPP_PHYS_SUITE: FV3_GFS_v16 PREDEF_GRID_NAME: RRFS_CONUS_25km DATE_FIRST_CYCL: '2019070100' DATE_LAST_CYCL: '2019070100' @@ -17,7 +17,8 @@ task_get_extrn_ics: USE_USER_STAGED_EXTRN_FILES: true task_get_extrn_lbcs: EXTRN_MDL_NAME_LBCS: FV3GFS - LBC_SPEC_INTVL_HRS: 3 + LBC_SPEC_INTVL_HRS: 6 USE_USER_STAGED_EXTRN_FILES: true task_run_fcst: - RESTART_INTERVAL: 1 + WTIME_RUN_FCST: 01:00:00 + RESTART_INTERVAL: 1 2 5 diff --git a/ush/config_defaults.yaml b/ush/config_defaults.yaml index 295fc17781..e9976a8e95 100644 --- a/ush/config_defaults.yaml +++ b/ush/config_defaults.yaml @@ -1490,8 +1490,10 @@ task_run_fcst: # RESTART_INTERVAL: # frequency of the output restart files (unit:hour). # Default=0: restart files are produced at the end of a forecast run - # For example, RESTART_INTERVAL: 1: restart files are produced every hour - # with the prefix "YYYYMMDD.HHmmSS." in the RESTART directory + # For example, i) RESTART_INTERVAL: 1 -1 => restart files are produced + # every hour with the prefix "YYYYMMDD.HHmmSS." in the RESTART directory + # ii) RESTART_INTERVAL: 1 2 5 => restart files are produced only when + # fh = 1, 2, and 5. # # WRITE_DOPOST: # Flag that determines whether or not to use the inline post feature diff --git a/ush/setup.py b/ush/setup.py index 572433459f..58d50775ad 100644 --- a/ush/setup.py +++ b/ush/setup.py @@ -569,12 +569,6 @@ def get_location(xcs, fmt): FCST_MODEL = '{FCST_MODEL}'""" ) - # Make sure RESTART_INTERVAL is set to an integer value - if not isinstance(RESTART_INTERVAL, int): - raise Exception( - f"\nRESTART_INTERVAL = {RESTART_INTERVAL}, must be an integer value\n" - ) - # Check that input dates are in a date format # get dictionary of all variables From 6c22e7507db26b6b74198ee06179c09afb13fab3 Mon Sep 17 00:00:00 2001 From: chan-hoo Date: Fri, 2 Dec 2022 11:15:13 +0000 Subject: [PATCH 2/2] remove wtime change in we2e --- .../wflow_features/config.specify_RESTART_INTERVAL.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/WE2E/test_configs/wflow_features/config.specify_RESTART_INTERVAL.yaml b/tests/WE2E/test_configs/wflow_features/config.specify_RESTART_INTERVAL.yaml index bc37ecd5c0..4b31015735 100644 --- a/tests/WE2E/test_configs/wflow_features/config.specify_RESTART_INTERVAL.yaml +++ b/tests/WE2E/test_configs/wflow_features/config.specify_RESTART_INTERVAL.yaml @@ -20,5 +20,4 @@ task_get_extrn_lbcs: LBC_SPEC_INTVL_HRS: 6 USE_USER_STAGED_EXTRN_FILES: true task_run_fcst: - WTIME_RUN_FCST: 01:00:00 RESTART_INTERVAL: 1 2 5