Skip to content

Commit

Permalink
Update directory structure of NCO mode (#743)
Browse files Browse the repository at this point in the history
* update vertical structure of NCO mode

* update sample script for nco

* Fix typo on write component of new RRFS CONUS
  • Loading branch information
chan-hoo authored Apr 25, 2022
1 parent e5e0042 commit 1bd9d5f
Show file tree
Hide file tree
Showing 13 changed files with 77 additions and 89 deletions.
32 changes: 12 additions & 20 deletions tests/WE2E/run_WE2E_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ SFC_CLIMO_DIR=\"${SFC_CLIMO_DIR}\""
# 2) The directory in which the output files from the post-processor (UPP)
# for a given cycle are stored. The path to this directory is
#
# \$PTMP/com/\$NET/\$envir/\$RUN.\$yyyymmdd/\$hh
# \$PTMP/com/\$NET/\$model_ver/\$RUN.\$yyyymmdd/\$hh
#
# Here, we make the first directory listed above unique to a WE2E test
# by setting RUN to the name of the current test. This will also make
Expand All @@ -872,40 +872,32 @@ SFC_CLIMO_DIR=\"${SFC_CLIMO_DIR}\""
# envir to the same value as RUN (which is just EXPT_SUBDIR). Then, for
# this test, the UPP output will be located in the directory
#
# \$PTMP/com/\$NET/\$RUN/\$RUN.\$yyyymmdd/\$hh
# \$PTMP/com/\$NET/\we2e/\$RUN.\$yyyymmdd/\$hh
#
RUN=\"\${EXPT_SUBDIR}\"
envir=\"\${EXPT_SUBDIR}\""
model_ver="we2e""

#
# Set COMINgfs if using the FV3GFS or the GSMGFS as the external model
# for ICs or LBCs.
#
if [ "${EXTRN_MDL_NAME_ICS}" = "FV3GFS" ] || \
[ "${EXTRN_MDL_NAME_ICS}" = "GSMGFS" ] || \
[ "${EXTRN_MDL_NAME_LBCS}" = "FV3GFS" ] || \
[ "${EXTRN_MDL_NAME_LBCS}" = "GSMGFS" ]; then
# Set COMIN.

COMINgfs=${TEST_COMINgfs:-}
COMIN=${TEST_COMIN:-}

if [ ! -d "${COMINgfs:-}" ] ; then
print_err_msg_exit "\
The directory (COMINgfs) that needs to be specified when running the
if [ ! -d "${COMIN:-}" ] ; then
print_err_msg_exit "\
The directory (COMIN) that needs to be specified when running the
workflow in NCO mode (RUN_ENVIR set to \"nco\") AND using the FV3GFS or
the GSMGFS as the external model for ICs and/or LBCs has not been specified
for this machine (MACHINE):
MACHINE= \"${MACHINE}\""
fi
fi

expt_config_str=${expt_config_str}"
expt_config_str=${expt_config_str}"
#
# Directory that needs to be specified when running the workflow in NCO
# mode (RUN_ENVIR set to \"nco\") AND using the FV3GFS or the GSMGFS as
# the external model for ICs and/or LBCs.
# mode (RUN_ENVIR set to \"nco\").
#
COMINgfs=\"${COMINgfs}\""
COMIN=\"${COMIN}\""

fi
#
# Set STMP and PTMP.
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ EXTRN_MDL_NAME_ICS="FV3GFS"
FV3GFS_FILE_FMT_ICS="grib2"
EXTRN_MDL_NAME_LBCS="FV3GFS"
FV3GFS_FILE_FMT_LBCS="grib2"
USE_USER_STAGED_EXTRN_FILES="TRUE"

DATE_FIRST_CYCL="20190615"
DATE_LAST_CYCL="20190615"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ FV3GFS_FILE_FMT_ICS="grib2"
EXTRN_MDL_NAME_LBCS="FV3GFS"
FV3GFS_FILE_FMT_LBCS="grib2"

USE_USER_STAGED_EXTRN_FILES="TRUE"

DATE_FIRST_CYCL="20190615"
DATE_LAST_CYCL="20190615"
CYCL_HRS=( "00" )
Expand Down
29 changes: 18 additions & 11 deletions ush/config.nco.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,34 @@ VERBOSE="TRUE"
RUN_ENVIR="nco"
PREEXISTING_DIR_METHOD="rename"

PREDEF_GRID_NAME="CONUS_25km_GFDLgrid"
PREDEF_GRID_NAME="RRFS_CONUS_25km"
QUILTING="TRUE"

CCPP_PHYS_SUITE="FV3_GFS_v15p2"
CCPP_PHYS_SUITE="FV3_GFS_v16"

FCST_LEN_HRS="06"
LBC_SPEC_INTVL_HRS="6"
FCST_LEN_HRS="6"
LBC_SPEC_INTVL_HRS="3"

DATE_FIRST_CYCL="20190901"
DATE_LAST_CYCL="20190901"
CYCL_HRS=( "18" )
DATE_FIRST_CYCL="20220407"
DATE_LAST_CYCL="20220407"
CYCL_HRS=( "00" )

EXTRN_MDL_NAME_ICS="FV3GFS"
EXTRN_MDL_NAME_LBCS="FV3GFS"

FV3GFS_FILE_FMT_ICS="grib2"
FV3GFS_FILE_FMT_LBCS="grib2"

WRITE_DOPOST="TRUE"

#
# The following must be modified for different platforms and users.
#
RUN="an_experiment"
COMINgfs="/scratch1/NCEPDEV/hwrf/noscrub/hafs-input/COMGFS" # Path to directory containing files from the external model (FV3GFS).
NET="rrfs"
model_ver="v1.0"
RUN="rrfs_test"
COMIN="/scratch1/NCEPDEV/rstprod/com/gfs/prod" # Path to directory containing files from the external model.
FIXLAM_NCO_BASEDIR="/scratch2/BMC/det/FV3LAM_pregen" # Path to directory containing the pregenerated grid, orography, and surface climatology "fixed" files to use for the experiment.
STMP="/scratch2/BMC/det/Gerard.Ketefian/UFS_CAM/NCO_dirs/stmp" # Path to directory STMP that mostly contains input files.
PTMP="/scratch2/BMC/det/Gerard.Ketefian/UFS_CAM/NCO_dirs/ptmp" # Path to directory PTMP in which the experiment's output files will be placed.
STMP="/scratch2/NCEPDEV/fv3-cam/Chan-hoo.Jeon/01_OUT_DATA/stmp" # Path to directory STMP that mostly contains input files.
PTMP="/scratch2/NCEPDEV/fv3-cam/Chan-hoo.Jeon/01_OUT_DATA/ptmp" # Path to directory PTMP in which the experiment's output files will be placed.

66 changes: 31 additions & 35 deletions ush/config_defaults.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#
# NCEP Central Operations
# WCOSS Implementation Standards
# April 17, 2019
# Version 10.2.0
# January 19, 2022
# Version 11.0.0
#
# RUN_ENVIR is described in this document as follows:
#
Expand Down Expand Up @@ -232,18 +232,11 @@ EXEC_SUBDIR="bin"
# Set variables that are only used in NCO mode (i.e. when RUN_ENVIR is
# set to "nco"). Definitions:
#
# COMINgfs:
# The beginning portion of the directory containing files generated by
# the external model (FV3GFS) that the initial and lateral boundary
# condition generation tasks need in order to create initial and boundary
# condition files for a given cycle on the native FV3-LAM grid. For a
# cycle that starts on the date specified by the variable yyyymmdd
# (consisting of the 4-digit year followed by the 2-digit month followed
# by the 2-digit day of the month) and hour specified by the variable hh
# (consisting of the 2-digit hour-of-day), the directory in which the
# workflow will look for the external model files is:
#
# $COMINgfs/gfs.$yyyymmdd/$hh/atmos
# COMIN:
# Directory containing files generated by the external model (FV3GFS, NAM,
# HRRR, etc) that the initial and lateral boundary condition generation tasks
# need in order to create initial and boundary condition files for a given
# cycle on the native FV3-LAM grid.
#
# FIXLAM_NCO_BASEDIR:
# The base directory containing pregenerated grid, orography, and surface
Expand All @@ -258,6 +251,24 @@ EXEC_SUBDIR="bin"
# string in this file, but it can be specified in the user-specified
# workflow configuration file (EXPT_CONFIG_FN).
#
# envir, NET, model_ver, RUN:
# Standard environment variables defined in the NCEP Central Operations WCOSS
# Implementation Standards document as follows:
#
# envir:
# Set to "test" during the initial testing phase, "para" when running
# in parallel (on a schedule), and "prod" in production.
#
# NET:
# Model name (first level of com directory structure)
#
# model_ver:
# Version number of package in three digits (second level of com directory)
#
# RUN:
# Name of model run (third level of com directory structure).
# In general, same as $NET
#
# STMP:
# The beginning portion of the directory that will contain cycle-dependent
# model input files, symlinks to cycle-independent input files, and raw
Expand All @@ -269,39 +280,24 @@ EXEC_SUBDIR="bin"
#
# $STMP/tmpnwprd/$RUN/$cdate
#
# NET, envir, RUN:
# Variables used in forming the path to the directory that will contain
# the output files from the post-processor (UPP) for a given cycle (see
# definition of PTMP below). These are defined in the WCOSS Implementation
# Standards document as follows:
#
# NET:
# Model name (first level of com directory structure)
#
# envir:
# Set to "test" during the initial testing phase, "para" when running
# in parallel (on a schedule), and "prod" in production.
#
# RUN:
# Name of model run (third level of com directory structure).
#
# PTMP:
# The beginning portion of the directory that will contain the output
# files from the post-processor (UPP) for a given cycle. For a cycle
# that starts on the date specified by yyyymmdd and hour specified by hh
# (where yyyymmdd and hh are as described above), the directory in which
# the UPP output files will be placed will be:
#
# $PTMP/com/$NET/$envir/$RUN.$yyyymmdd/$hh
# $PTMP/com/$NET/$model_ver/$RUN.$yyyymmdd/$hh
#
#-----------------------------------------------------------------------
#
COMINgfs="/base/path/of/directory/containing/gfs/input/files"
COMIN="/path/of/directory/containing/data/files/for/IC/LBCS"
FIXLAM_NCO_BASEDIR=""
STMP="/base/path/of/directory/containing/model/input/and/raw/output/files"
NET="rrfs"
envir="para"
RUN="experiment_name"
NET="rrfs"
model_ver="v1.0.0"
RUN="rrfs"
STMP="/base/path/of/directory/containing/model/input/and/raw/output/files"
PTMP="/base/path/of/directory/containing/postprocessed/output/files"
#
#-----------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion ush/machine/cheyenne.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,5 @@ MET_BIN_EXEC=${MET_BIN_EXEC:-"bin"}

# Test Data Locations
TEST_PREGEN_BASEDIR="/glade/p/ral/jntp/UFS_SRW_app/FV3LAM_pregen"
TEST_COMINgfs="/glade/p/ral/jntp/UFS_SRW_app/COMGFS"
TEST_COMIN="/glade/p/ral/jntp/UFS_SRW_app/COMGFS"
TEST_EXTRN_MDL_SOURCE_BASEDIR="/glade/p/ral/jntp/UFS_SRW_app/staged_extrn_mdl_files"
2 changes: 1 addition & 1 deletion ush/machine/hera.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ MET_BIN_EXEC=${MET_BIN_EXEC:-"bin"}

# Test Data Locations
TEST_PREGEN_BASEDIR="/scratch2/BMC/det/UFS_SRW_app/FV3LAM_pregen"
TEST_COMINgfs="/scratch2/NCEPDEV/fv3-cam/noscrub/UFS_SRW_App/COMGFS"
TEST_COMIN="/scratch2/NCEPDEV/fv3-cam/noscrub/UFS_SRW_App/COMGFS"
TEST_EXTRN_MDL_SOURCE_BASEDIR="/scratch2/BMC/det/UFS_SRW_app/develop/model_data"
TEST_ALT_EXTRN_MDL_SYSBASEDIR_ICS="/scratch2/BMC/det/UFS_SRW_app/dummy_FV3GFS_sys_dir"
TEST_ALT_EXTRN_MDL_SYSBASEDIR_LBCS="/scratch2/BMC/det/UFS_SRW_app/dummy_FV3GFS_sys_dir"
2 changes: 1 addition & 1 deletion ush/machine/jet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,5 @@ RUN_CMD_POST="srun"

# Test Data Locations
TEST_PREGEN_BASEDIR="/mnt/lfs4/BMC/wrfruc/UFS_SRW_app/FV3LAM_pregen"
TEST_COMINgfs="/mnt/lfs4/BMC/wrfruc/UFS_SRW_app/COMGFS"
TEST_COMIN="/mnt/lfs4/BMC/wrfruc/UFS_SRW_app/COMGFS"
TEST_EXTRN_MDL_SOURCE_BASEDIR="/mnt/lfs4/BMC/wrfruc/UFS_SRW_app/staged_extrn_mdl_files"
2 changes: 1 addition & 1 deletion ush/machine/orion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ MET_BIN_EXEC=${MET_BIN_EXEC:-"bin"}

# Test Data Locations
TEST_PREGEN_BASEDIR="/work/noaa/fv3-cam/UFS_SRW_App/FV3LAM_pregen"
TEST_COMINgfs="/work/noaa/fv3-cam/UFS_SRW_App/COMGFS"
TEST_COMIN="/work/noaa/fv3-cam/UFS_SRW_App/COMGFS"
TEST_EXTRN_MDL_SOURCE_BASEDIR="/work/noaa/fv3-cam/UFS_SRW_App/develop/model_data"

2 changes: 1 addition & 1 deletion ush/machine/wcoss_dell_p3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,5 @@ MET_BIN_EXEC=${MET_BIN_EXEC:-"exec"}

# Test Data Locations
TEST_PREGEN_BASEDIR="/gpfs/dell2/emc/modeling/noscrub/UFS_SRW_App/FV3LAM_pregen"
TEST_COMINgfs="/gpfs/dell2/emc/modeling/noscrub/UFS_SRW_App/COMGFS"
TEST_COMIN="/gpfs/dell2/emc/modeling/noscrub/UFS_SRW_App/COMGFS"
TEST_EXTRN_MDL_SOURCE_BASEDIR="/gpfs/dell2/emc/modeling/noscrub/UFS_SRW_App/develop/model_data"
6 changes: 3 additions & 3 deletions ush/set_extrn_mdl_params.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ function set_extrn_mdl_params() {
#
#-----------------------------------------------------------------------
#
# Use known locations or COMINgfs as default, depending on RUN_ENVIR
# Use known locations or COMIN as default, depending on RUN_ENVIR
#
#-----------------------------------------------------------------------
#
if [ "${RUN_ENVIR}" = "nco" ]; then
EXTRN_MDL_SYSBASEDIR_ICS="${EXTRN_MDL_SYSBASEDIR_ICS:-$COMINgfs}"
EXTRN_MDL_SYSBASEDIR_LBCS="${EXTRN_MDL_SYSBASEDIR_LBCS:-$COMINgfs}"
EXTRN_MDL_SYSBASEDIR_ICS="${EXTRN_MDL_SYSBASEDIR_ICS:-$COMIN}"
EXTRN_MDL_SYSBASEDIR_LBCS="${EXTRN_MDL_SYSBASEDIR_LBCS:-$COMIN}"
else
EXTRN_MDL_SYSBASEDIR_ICS="${EXTRN_MDL_SYSBASEDIR_ICS:-$(set_known_sys_dir \
${EXTRN_MDL_NAME_ICS})}"
Expand Down
6 changes: 3 additions & 3 deletions ush/set_predef_grid_params.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ case ${PREDEF_GRID_NAME} in
WRTCMP_stdlat2="${ESGgrid_LAT_CTR}"
WRTCMP_nx="217"
WRTCMP_ny="128"
WRTCMP_lon_lwr_left="-122.719258"
WRTCMP_lon_lwr_left="-122.719528"
WRTCMP_lat_lwr_left="21.138123"
WRTCMP_dx="${ESGgrid_DELX}"
WRTCMP_dy="${ESGgrid_DELY}"
Expand Down Expand Up @@ -224,7 +224,7 @@ case ${PREDEF_GRID_NAME} in
WRTCMP_stdlat2="${ESGgrid_LAT_CTR}"
WRTCMP_nx="416"
WRTCMP_ny="245"
WRTCMP_lon_lwr_left="-122.719258"
WRTCMP_lon_lwr_left="-122.719528"
WRTCMP_lat_lwr_left="21.138123"
WRTCMP_dx="${ESGgrid_DELX}"
WRTCMP_dy="${ESGgrid_DELY}"
Expand Down Expand Up @@ -316,7 +316,7 @@ case ${PREDEF_GRID_NAME} in
WRTCMP_stdlat2="${ESGgrid_LAT_CTR}"
WRTCMP_nx="1799"
WRTCMP_ny="1059"
WRTCMP_lon_lwr_left="-122.719258"
WRTCMP_lon_lwr_left="-122.719528"
WRTCMP_lat_lwr_left="21.138123"
WRTCMP_dx="${ESGgrid_DELX}"
WRTCMP_dy="${ESGgrid_DELY}"
Expand Down
14 changes: 5 additions & 9 deletions ush/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,7 @@ check_for_preexist_dir_file "$EXPTDIR" "${PREEXISTING_DIR_METHOD}"
# is not placed directly under COMROOT but several directories further
# down. More specifically, for a cycle starting at yyyymmddhh, it is at
#
# $COMROOT/$NET/$envir/$RUN.$yyyymmdd/$hh
# $COMROOT/$NET/$model_ver/$RUN.$yyyymmdd/$hh
#
# Below, we set COMROOT in terms of PTMP as COMROOT="$PTMP/com". COMOROOT
# is not used by the workflow in community mode.
Expand All @@ -1151,7 +1151,7 @@ check_for_preexist_dir_file "$EXPTDIR" "${PREEXISTING_DIR_METHOD}"
# from the RUN_POST_TN task will be placed, i.e. it is the cycle-independent
# portion of the RUN_POST_TN task's output directory. It is given by
#
# $COMROOT/$NET/$envir
# $COMROOT/$NET/$model_ver
#
# COMOUT_BASEDIR is not used by the workflow in community mode.
#
Expand All @@ -1164,19 +1164,15 @@ FIXclim="${EXPTDIR}/fix_clim"
FIXLAM="${EXPTDIR}/fix_lam"

if [ "${RUN_ENVIR}" = "nco" ]; then

CYCLE_BASEDIR="$STMP/tmpnwprd/$RUN"
CYCLE_BASEDIR="${STMP}/tmpnwprd/${RUN}"
check_for_preexist_dir_file "${CYCLE_BASEDIR}" "${PREEXISTING_DIR_METHOD}"
COMROOT="$PTMP/com"
COMOUT_BASEDIR="$COMROOT/$NET/$envir"
COMROOT="${PTMP}/com"
COMOUT_BASEDIR="${COMROOT}/${NET}/${model_ver}"
check_for_preexist_dir_file "${COMOUT_BASEDIR}" "${PREEXISTING_DIR_METHOD}"

else

CYCLE_BASEDIR="$EXPTDIR"
COMROOT=""
COMOUT_BASEDIR=""

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

0 comments on commit 1bd9d5f

Please sign in to comment.