Skip to content

Commit

Permalink
[develop] Add option to change vertical coordinate file. (#813)
Browse files Browse the repository at this point in the history
Add a configurable option for users to specify their own vertical coordinate file for the FV3 model. As an alternative to the current one, the RRFS version for 65 vertical levels has been added to parm.
  • Loading branch information
christinaholtNOAA authored Jun 12, 2023
1 parent 44180c7 commit d0bb3c5
Show file tree
Hide file tree
Showing 7 changed files with 123 additions and 4 deletions.
68 changes: 68 additions & 0 deletions parm/global_hyblev_fcst_rrfsL65.txt
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion scripts/exregional_make_ics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
2 changes: 1 addition & 1 deletion scripts/exregional_make_lbcs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ workflow:
DATE_FIRST_CYCL: '2022072000'
DATE_LAST_CYCL: '2022072000'
PREEXISTING_DIR_METHOD: rename
task_process_radarref:
RADARREFL_TIMELEVEL: [0]
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:
START_TIME_NSSLMOSAIC: "00:45:00"
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
6 changes: 6 additions & 0 deletions ush/config_defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1721,12 +1721,17 @@ 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
FVCOM_WCSTART: "cold"
FVCOM_DIR: ""
FVCOM_FILE: "fvcom.nc"
VCOORD_FILE: "{{ workflow.FIXam }}/global_hyblev.l65.txt"

#----------------------------
# MAKE LBCS config parameters
Expand All @@ -1735,6 +1740,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
Expand Down
19 changes: 19 additions & 0 deletions ush/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,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}
"""
)

#
# -----------------------------------------------------------------------
#
Expand Down

0 comments on commit d0bb3c5

Please sign in to comment.