Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions scripts/exregional_make_ics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,48 @@ mv_vrfy gfs.bndy.nc ${ics_dir}/gfs_bndy.tile${TILE_RGNL}.000.nc
#
#-----------------------------------------------------------------------
#
# Process FVCOM Data
#
#-----------------------------------------------------------------------
#
if [ "${USE_FVCOM}" = "TRUE" ]; then

fvcom_exec_fn="fvcom_to_FV3"
fvcom_exec_fp="$EXECDIR/${fvcom_exec_fn}"
if [ ! -f "${fvcom_exec_fp}" ]; then
print_err_msg_exit "\
The executable (fvcom_exec_fp) for processing FVCOM data onto FV3-LAM
native grid does not exist:
fvcom_exec_fp = \"${fvcom_exec_fp}\"
Please ensure that you've built this executable."
fi
cp_vrfy ${fvcom_exec_fp} ${ics_dir}/.
fvcom_data_fp="${FVCOM_DIR}/${FVCOM_FILE}"
if [ ! -f "${fvcom_data_fp}" ]; then
print_err_msg_exit "\
The file or path (fvcom_data_fp) does not exist:
fvcom_data_fp = \"${fvcom_data_fp}\"
Please check the following user defined variables:
FVCOM_DIR = \"${FVCOM_DIR}\"
FVCOM_FILE= \"${FVCOM_FILE}\" "
fi

cp_vrfy ${fvcom_data_fp} ${ics_dir}/fvcom.nc
cd_vrfy ${ics_dir}
${APRUN} ${fvcom_exec_fn} sfc_data.tile${TILE_RGNL}.halo${NH0}.nc fvcom.nc || \
print_err_msg_exit "\
Call to executable (fvcom_exe) to modify sfc fields for FV3-LAM failed:
fvcom_exe = \"${fvcom_exe}\"
The following variables were being used:
FVCOM_DIR = \"${FVCOM_DIR}\"
FVCOM_FILE = \"${FVCOM_FILE}\"
ics_dir = \"${ics_dir}\"
fvcom_exe_dir = \"${fvcom_exe_dir}\"
fvcom_exe = \"${fvcom_exe}\""
fi
#
#-----------------------------------------------------------------------
#
# Print message indicating successful completion of script.
#
#-----------------------------------------------------------------------
Expand Down
24 changes: 24 additions & 0 deletions ush/config_defaults.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1277,3 +1277,27 @@ HALO_BLEND=0
#-----------------------------------------------------------------------
#
GWD_RRFS_v1beta_BASEDIR=""
#
#-----------------------------------------------------------------------
#
# USE_FVCOM:
# Flag set to update surface conditions in FV3-LAM with fields generated
# from the Finite Volume Community Ocean Model (FVCOM). This will
# replace lake/sea surface temperature, ice surface temperature, and ice
# placement. FVCOM data must already be interpolated to the desired
# FV3-LAM grid. This flag will be used in make_ics to modify sfc_data.nc
# after chgres_cube is run by running the routine process_FVCOM.exe
#
# FVCOM_DIR:
# User defined directory where FVCOM data already interpolated to FV3-LAM
# grid is located. File name in this path should be "fvcom.nc" to allow
#
# FVCOM_FILE:
# Name of file located in FVCOM_DIR that has FVCOM data interpolated to
# FV3-LAM grid. This file will be copied later to a new location and name
# changed to fvcom.nc
#------------------------------------------------------------------------
#
USE_FVCOM="FALSE"
FVCOM_DIR="/user/defined/dir/to/fvcom/data"
FVCOM_FILE="fvcom.nc"
33 changes: 33 additions & 0 deletions ush/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,27 @@ if [ "${DO_SPPT}" = "FALSE" ]; then
SPPT_MAG=-999.0
fi

#
#-----------------------------------------------------------------------
#
# Make sure that USE_FVCOM is set to a valid value and assign directory
# and file names.
#
#-----------------------------------------------------------------------
#
check_var_valid_value "USE_FVCOM" "valid_vals_USE_FVCOM"
#
# Set USE_FVCOM to either "TRUE" or "FALSE" so we don't have to consider
# other valid values later on.
#
USE_FVCOM=${USE_FVCOM^^}
if [ "$USE_FVCOM" = "TRUE" ] || \
[ "$USE_FVCOM" = "YES" ]; then
USE_FVCOM="TRUE"
elif [ "$USE_FVCOM" = "FALSE" ] || \
[ "$USE_FVCOM" = "NO" ]; then
USE_FVCOM="FALSE"
fi
#
#-----------------------------------------------------------------------
#
Expand Down Expand Up @@ -2813,6 +2834,18 @@ $( printf "\"%s\" \\\\\n" "${ALL_CDATES[@]}" )
#
#-----------------------------------------------------------------------
#
# If USE_FVCOM is set to TRUE, then FVCOM data (located in FVCOM_DIR
# in FVCOM_FILE) will be used to update lower boundary conditions during
# make_ics.
#
#-----------------------------------------------------------------------
#
USE_FVCOM="${USE_FVCOM}"
FVCOM_DIR="${FVCOM_DIR}"
FVCOM_FILE="${FVCOM_FILE}"
#
#-----------------------------------------------------------------------
#
# Computational parameters.
#
#-----------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions ush/valid_param_vals.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,4 @@ valid_vals_DO_SHUM=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no")
valid_vals_DO_SPPT=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no")
valid_vals_DO_SKEB=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no")
valid_vals_USE_ZMTNBLCK=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no")
valid_vals_USE_FVCOM=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no")