From 130864d5594efd6de9aa9a0501d54e7d63c0881c Mon Sep 17 00:00:00 2001 From: "Christina.Holt" Date: Thu, 25 May 2023 19:51:12 +0000 Subject: [PATCH 1/2] Add option to change vertical coordinate file. --- parm/global_hyblev_fcst_rrfsL65.txt | 68 +++++++++++++++++++ scripts/exregional_make_ics.sh | 2 +- scripts/exregional_make_lbcs.sh | 2 +- .../data_assimilation/config.process_obs.yaml | 4 ++ .../config.different_vcoord.yaml | 24 +++++++ ush/config_defaults.yaml | 2 + ush/setup.py | 19 ++++++ 7 files changed, 119 insertions(+), 2 deletions(-) create mode 100644 parm/global_hyblev_fcst_rrfsL65.txt create mode 100644 tests/WE2E/test_configs/wflow_features/config.different_vcoord.yaml diff --git a/parm/global_hyblev_fcst_rrfsL65.txt b/parm/global_hyblev_fcst_rrfsL65.txt new file mode 100644 index 0000000000..b1ce286eac --- /dev/null +++ b/parm/global_hyblev_fcst_rrfsL65.txt @@ -0,0 +1,68 @@ + 2 66 + 0.000 1.00000000 + 0.000 0.99787363 + 0.000 0.99547387 + 0.017 0.99276698 + 0.234 0.98971388 + 1.058 0.98626929 + 3.103 0.98238159 + 7.211 0.97799245 + 14.450 0.97303658 + 26.130 0.96744145 + 43.805 0.96112727 + 69.754 0.95400221 + 107.500 0.94595747 + 160.901 0.93687684 + 233.980 0.92663902 + 330.883 0.91511905 + 455.809 0.90219033 + 612.932 0.88772712 + 806.289 0.87160769 + 1039.659 0.85371818 + 1316.413 0.83395695 + 1639.350 0.81223965 + 2010.516 0.78850460 + 2431.016 0.76271850 + 2900.827 0.73488203 + 3418.626 0.70503512 + 3981.638 0.67326135 + 4585.535 0.63969119 + 5224.384 0.60450347 + 5890.665 0.56792486 + 6575.364 0.53022703 + 7268.150 0.49172137 + 7957.623 0.45275150 + 8631.631 0.41368369 + 9277.633 0.37489594 + 9883.087 0.33676625 + 10435.842 0.29966091 + 10924.498 0.26392352 + 11338.722 0.22986547 + 11669.502 0.19775844 + 11909.318 0.16782909 + 12052.236 0.14025627 + 12093.928 0.11517042 + 12031.620 0.09265514 + 11863.989 0.07275035 + 11591.011 0.05545674 + 11213.791 0.04074101 + 10734.376 0.02854147 + 10155.564 0.01877378 + 9480.727 0.01133629 + 8714.452 0.00610706 + 7877.419 0.00279793 + 7004.872 0.00097247 + 6132.608 0.00018806 + 5296.374 0.00000379 + 4530.025 0.00000000 + 3843.468 0.00000000 + 3229.725 0.00000000 + 2681.893 0.00000000 + 2193.544 0.00000000 + 1758.738 0.00000000 + 1372.014 0.00000000 + 1028.378 0.00000000 + 723.285 0.00000000 + 452.613 0.00000000 + 212.637 0.00000000 + 0.000 0.00000000 diff --git a/scripts/exregional_make_ics.sh b/scripts/exregional_make_ics.sh index 9c5b995239..f85eefc615 100755 --- a/scripts/exregional_make_ics.sh +++ b/scripts/exregional_make_ics.sh @@ -537,7 +537,7 @@ settings=" 'mosaic_file_target_grid': ${FIXlam}/${CRES}${DOT_OR_USCORE}mosaic.halo$((10#${NH4})).nc, 'orog_dir_target_grid': ${FIXlam}, 'orog_files_target_grid': ${CRES}${DOT_OR_USCORE}oro_data.tile${TILE_RGNL}.halo$((10#${NH4})).nc, - 'vcoord_file_target_grid': ${FIXam}/global_hyblev.l65.txt, + 'vcoord_file_target_grid': ${VCOORD_FILE}, 'varmap_file': ${PARMdir}/ufs_utils/varmap_tables/${varmap_file}, 'data_dir_input_grid': ${extrn_mdl_staging_dir}, 'atm_files_input_grid': ${fn_atm}, diff --git a/scripts/exregional_make_lbcs.sh b/scripts/exregional_make_lbcs.sh index 34707686fe..f8071201f5 100755 --- a/scripts/exregional_make_lbcs.sh +++ b/scripts/exregional_make_lbcs.sh @@ -457,7 +457,7 @@ settings=" 'mosaic_file_target_grid': ${FIXlam}/${CRES}${DOT_OR_USCORE}mosaic.halo$((10#${NH4})).nc, 'orog_dir_target_grid': ${FIXlam}, 'orog_files_target_grid': ${CRES}${DOT_OR_USCORE}oro_data.tile${TILE_RGNL}.halo$((10#${NH4})).nc, - 'vcoord_file_target_grid': ${FIXam}/global_hyblev.l65.txt, + 'vcoord_file_target_grid': ${VCOORD_FILE}, 'varmap_file': ${PARMdir}/ufs_utils/varmap_tables/${varmap_file}, 'data_dir_input_grid': ${extrn_mdl_staging_dir}, 'atm_files_input_grid': ${fn_atm}, diff --git a/tests/WE2E/test_configs/data_assimilation/config.process_obs.yaml b/tests/WE2E/test_configs/data_assimilation/config.process_obs.yaml index 6c0741ae1e..1ba85a1afd 100644 --- a/tests/WE2E/test_configs/data_assimilation/config.process_obs.yaml +++ b/tests/WE2E/test_configs/data_assimilation/config.process_obs.yaml @@ -9,6 +9,10 @@ workflow: PREDEF_GRID_NAME: RRFS_CONUS_3km DATE_FIRST_CYCL: '2022072000' DATE_LAST_CYCL: '2022072000' +task_make_ics: + VCOORD_FILE: "{{ user.PARMdir }}/global_hyblev_fcst_rrfsL65.txt" +task_make_lbcs: + VCOORD_FILE: "{{ user.PARMdir }}/global_hyblev_fcst_rrfsL65.txt" rocoto: entities: diff --git a/tests/WE2E/test_configs/wflow_features/config.different_vcoord.yaml b/tests/WE2E/test_configs/wflow_features/config.different_vcoord.yaml new file mode 100644 index 0000000000..16f2d10e74 --- /dev/null +++ b/tests/WE2E/test_configs/wflow_features/config.different_vcoord.yaml @@ -0,0 +1,24 @@ +metadata: + description: |- + This test is to ensure that the workflow running in community mode + completes successfully when the RRFS vertical coordinates are chosen. +user: + RUN_ENVIR: community +workflow: + CCPP_PHYS_SUITE: FV3_HRRR + PREDEF_GRID_NAME: RRFS_CONUS_25km + DATE_FIRST_CYCL: '2019070100' + DATE_LAST_CYCL: '2019070100' + FCST_LEN_HRS: 3 + PREEXISTING_DIR_METHOD: rename +task_get_extrn_ics: + EXTRN_MDL_NAME_ICS: FV3GFS + USE_USER_STAGED_EXTRN_FILES: true +task_get_extrn_lbcs: + EXTRN_MDL_NAME_LBCS: FV3GFS + LBC_SPEC_INTVL_HRS: 3 + USE_USER_STAGED_EXTRN_FILES: true +task_make_ics: + VCOORD_FILE: "{{ user.PARMdir }}/global_hyblev_fcst_rrfsL65.txt" +task_make_lbcs: + VCOORD_FILE: "{{ user.PARMdir }}/global_hyblev_fcst_rrfsL65.txt" diff --git a/ush/config_defaults.yaml b/ush/config_defaults.yaml index a026c51bec..f18823bd35 100644 --- a/ush/config_defaults.yaml +++ b/ush/config_defaults.yaml @@ -1738,6 +1738,7 @@ task_make_ics: FVCOM_WCSTART: "cold" FVCOM_DIR: "" FVCOM_FILE: "fvcom.nc" + VCOORD_FILE: "{{ workflow.FIXam }}/global_hyblev.l65.txt" #---------------------------- # MAKE LBCS config parameters @@ -1746,6 +1747,7 @@ task_make_lbcs: KMP_AFFINITY_MAKE_LBCS: "scatter" OMP_NUM_THREADS_MAKE_LBCS: 1 OMP_STACKSIZE_MAKE_LBCS: "1024m" + VCOORD_FILE: "{{ workflow.FIXam }}/global_hyblev.l65.txt" #---------------------------- # FORECAST config parameters diff --git a/ush/setup.py b/ush/setup.py index 002ccbf2df..df44f95776 100644 --- a/ush/setup.py +++ b/ush/setup.py @@ -605,6 +605,25 @@ def get_location(xcs, fmt, expt_cfg): {data_key} = \"{basedir}\"''' ) + + # Make sure the vertical coordinate file for both make_lbcs and + # make_ics is the same. + if ics_vcoord := expt_config.get("task_make_ics", {}).get("VCOORD_FILE") != \ + (lbcs_vcoord := expt_config.get("task_make_lbcs", {}).get("VCOORD_FILE")): + raise ValueError( + f""" + The VCOORD_FILE must be set to the same value for both the + make_ics task and the make_lbcs task. They are currently + set to: + + make_ics: + VCOORD_FILE: {ics_vcoord} + + make_lbcs: + VCOORD_FILE: {lbcs_vcoord} + """ + ) + # # ----------------------------------------------------------------------- # From c522dcdebc8079c843114bbc12683aa174ab4dc3 Mon Sep 17 00:00:00 2001 From: "Christina.Holt" Date: Thu, 25 May 2023 21:25:05 +0000 Subject: [PATCH 2/2] Document the new variable. --- ush/config_defaults.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ush/config_defaults.yaml b/ush/config_defaults.yaml index f18823bd35..0a9389e1c3 100644 --- a/ush/config_defaults.yaml +++ b/ush/config_defaults.yaml @@ -1732,6 +1732,10 @@ task_make_ics: # FV3-LAM grid. This file will be copied later to a new location and name # changed to fvcom.nc # + # VCOORD_FILE: + # Full path to the file used to set the vertical coordinate in FV3. + # This file should be the same in both make_ics and make_lbcs. + # #------------------------------------------------------------------------ # USE_FVCOM: false