Skip to content

Commit

Permalink
[develop] Bugfix for Issue ufs-community#867 (when QUILTING is set …
Browse files Browse the repository at this point in the history
…to `false`) (ufs-community#869)

When QUILTING is set to false, the run_fcst task fails because some of the variables needed in the jinja template file parm/model_configure remain undefined in the call to ush/create_model_configure_file.py. This PR fixes that bug and adds a WE2E test for the QUILTING: false case.

Note that when QUILTING is set to false, the UFS Weather Model generates output files named fv3_history2d.nc and fv3_history.nc that contain data on the native grid, not the write-component grid. Thus, the run_post and subsequent tasks that depend on Weather Model output on the write-component grid cannot be included in the workflow. For this reason, the new WE2E test that this PR adds includes tasks only up to run_fcst.
  • Loading branch information
gsketefian authored Jul 26, 2023
1 parent 25eb2fa commit eb90788
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/WE2E/machine_suites/comprehensive
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,6 @@ nco_grid_RRFS_CONUS_25km_ics_FV3GFS_lbcs_FV3GFS_timeoffset_suite_GFS_v16
nco_grid_RRFS_CONUS_3km_ics_FV3GFS_lbcs_FV3GFS_suite_GFS_v15_thompson_mynn_lam3km
nco_grid_RRFS_CONUScompact_25km_ics_HRRR_lbcs_RAP_suite_HRRR
pregen_grid_orog_sfc_climo
quilting_false
specify_EXTRN_MDL_SYSBASEDIR_ICS_LBCS
specify_template_filenames
1 change: 1 addition & 0 deletions tests/WE2E/machine_suites/coverage.hera.gnu.com
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ get_from_NOMADS_ics_FV3GFS_lbcs_FV3GFS
grid_RRFS_CONUS_13km_ics_FV3GFS_lbcs_FV3GFS_suite_HRRR
grid_RRFS_CONUS_25km_ics_FV3GFS_lbcs_FV3GFS_suite_GFS_2017_gfdlmp_regional_plot
grid_RRFS_CONUS_25km_ics_FV3GFS_lbcs_FV3GFS_suite_RRFS_v1beta
quilting_false
grid_SUBCONUS_Ind_3km_ics_HRRR_lbcs_RAP_suite_WoFS_v0
GST_release_public_v1
MET_verification_only_vx
Expand Down
35 changes: 35 additions & 0 deletions tests/WE2E/test_configs/wflow_features/config.quilting_false.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
metadata:
description: |-
This test is to ensure that the workflow completes successfully with
QUILTING disabled. The forecast runs on the RRFS_CONUScompact_25km
grid using the RAP physics suite with ICs derived from the FV3GFS and
LBCs derived from the RAP. Note that with QUILTING disabled, the run_post
and subsequent tasks in the SRW App workflow cannot be run. This is
because QUILTING disabled, the output from the UFS Weather Model is on
the Weather Model's native grid, not the write-component grid, and UPP
does not (yet) have the capability to process output on the native grid.
user:
RUN_ENVIR: community
workflow:
CCPP_PHYS_SUITE: FV3_RAP
PREDEF_GRID_NAME: RRFS_CONUScompact_25km
DATE_FIRST_CYCL: '2019061518'
DATE_LAST_CYCL: '2019061518'
FCST_LEN_HRS: 6
PREEXISTING_DIR_METHOD: rename
rocoto:
tasks:
taskgroups: '{{ ["parm/wflow/prep.yaml", "parm/wflow/coldstart.yaml"]|include }}'
task_get_extrn_ics:
EXTRN_MDL_NAME_ICS: FV3GFS
FV3GFS_FILE_FMT_ICS: grib2
USE_USER_STAGED_EXTRN_FILES: true
task_get_extrn_lbcs:
EXTRN_MDL_NAME_LBCS: RAP
LBC_SPEC_INTVL_HRS: 1
EXTRN_MDL_LBCS_OFFSET_HRS: 0
USE_USER_STAGED_EXTRN_FILES: true
task_run_fcst:
QUILTING: false
verification:
VX_FCST_MODEL_NAME: FV3_GFS_v15p2_CONUS_25km
28 changes: 28 additions & 0 deletions ush/create_model_configure_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,34 @@ def create_model_configure_file(
}
)
#
# If not using the write-component (aka quilting), set those variables
# needed for quilting in the jinja template for the model configuration
# file (MODEL_CONFIG_TMPL_FP) to "None". This is necessary because
# otherwise, the run_fcst task will fail in the call to set_template()
# below with a "variables are not provided" message.
#
else:
settings.update(
{
"write_groups": None,
"write_tasks_per_group": None,
"cen_lon": None,
"cen_lat": None,
"lon1": None,
"lat1": None,
"stdlat1": None,
"stdlat2": None,
"nx": None,
"ny": None,
"dx": None,
"dy": None,
"lon2": None,
"lat2": None,
"dlon": None,
"dlat": None,
}
)
#
# If sub_hourly_post is set to "TRUE", then the forecast model must be
# directed to generate output files on a sub-hourly interval. Do this
# by specifying the output interval in the model configuration file
Expand Down

0 comments on commit eb90788

Please sign in to comment.