diff --git a/scripts/exregional_make_grid.sh b/scripts/exregional_make_grid.sh index 13276835e..639bf3ab0 100755 --- a/scripts/exregional_make_grid.sh +++ b/scripts/exregional_make_grid.sh @@ -103,7 +103,7 @@ export OMP_STACKSIZE=2048m case $MACHINE in -"WCOSS_C" | "WCOSS") +"WCOSS_CRAY") # { save_shell_opts; set +x; } > /dev/null 2>&1 @@ -121,6 +121,18 @@ case $MACHINE in ulimit -a ;; +"WCOSS_DELL_P3") +# + { save_shell_opts; set +x; } > /dev/null 2>&1 + + module list + + { restore_shell_opts; } > /dev/null 2>&1 + + export APRUN="mpirun" + + ulimit -s unlimited + ;; "HERA") # diff --git a/scripts/exregional_make_ics.sh b/scripts/exregional_make_ics.sh index 6875e7a86..04cc14652 100755 --- a/scripts/exregional_make_ics.sh +++ b/scripts/exregional_make_ics.sh @@ -606,6 +606,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. # #----------------------------------------------------------------------- diff --git a/scripts/exregional_make_orog.sh b/scripts/exregional_make_orog.sh index 61639c3b3..fece0763e 100755 --- a/scripts/exregional_make_orog.sh +++ b/scripts/exregional_make_orog.sh @@ -99,7 +99,7 @@ export OMP_STACKSIZE=2048m case $MACHINE in -"WCOSS_C" | "WCOSS") +"WCOSS_CRAY") # { save_shell_opts; set +x; } > /dev/null 2>&1 @@ -117,6 +117,11 @@ case $MACHINE in ulimit -a ;; +"WCOSS_DELL_P3") + ulimit -s unlimited + ulimit -a + APRUN="mpirun" + ;; "HERA") ulimit -s unlimited @@ -286,7 +291,7 @@ Starting orography file generation..." case $MACHINE in -"WCOSS_C" | "WCOSS") +"WCOSS_CRAY") # # On WCOSS and WCOSS_C, use cfp to run multiple tiles simulatneously for # the orography. For now, we have only one tile in the regional case, @@ -312,6 +317,19 @@ ${tmp_dir}" \ ;; +"WCOSS_DELL_P3") + + ufs_utils_ushdir="${UFS_UTILS_DIR}/ush" + res="0" # What should this be set to??? + + "${exec_fp}" < "${input_redirect_fn}" || \ + print_err_msg_exit "\ +Call to executable (exec_fp) that generates the raw orography file returned +with nonzero exit code: + exec_fp = \"${exec_fp}\"" + ;; + + "CHEYENNE" | "HERA" | "JET" | "ODIN" | "STAMPEDE") $APRUN "${exec_fp}" < "${input_redirect_fn}" || \ print_err_msg_exit "\ diff --git a/scripts/exregional_make_sfc_climo.sh b/scripts/exregional_make_sfc_climo.sh index c581f040a..b7709a615 100755 --- a/scripts/exregional_make_sfc_climo.sh +++ b/scripts/exregional_make_sfc_climo.sh @@ -128,14 +128,21 @@ EOF # case $MACHINE in -"WCOSS_C") -# This could be wrong. Just a guess since I don't have access to this machine. +"WCOSS_CRAY") APRUN=${APRUN:-"aprun -j 1 -n 6 -N 6"} ;; -"WCOSS") -# This could be wrong. Just a guess since I don't have access to this machine. - APRUN=${APRUN:-"aprun -j 1 -n 6 -N 6"} +"WCOSS_DELL_P3") + +# Specify computational resources. + export NODES=2 + export ntasks=48 + export ptile=24 + export threads=1 + export MP_LABELIO=yes + export OMP_NUM_THREADS=$threads + + APRUN="mpirun" ;; "HERA") diff --git a/ush/config_defaults.sh b/ush/config_defaults.sh index c6dba8057..e5fa2d4be 100644 --- a/ush/config_defaults.sh +++ b/ush/config_defaults.sh @@ -1255,3 +1255,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" diff --git a/ush/setup.sh b/ush/setup.sh index 892cf9522..1bd70a6ed 100755 --- a/ush/setup.sh +++ b/ush/setup.sh @@ -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 # #----------------------------------------------------------------------- # @@ -699,25 +720,13 @@ case $MACHINE in "WCOSS_CRAY") FIXgsm=${FIXgsm:-"/gpfs/hps3/emc/global/noscrub/emc.glopara/git/fv3gfs/fix/fix_am"} TOPO_DIR=${TOPO_DIR:-"/gpfs/hps3/emc/global/noscrub/emc.glopara/git/fv3gfs/fix/fix_orog"} - SFC_CLIMO_INPUT_DIR=${SFC_CLIMO_INPUT_DIR:-""} + SFC_CLIMO_INPUT_DIR=${SFC_CLIMO_INPUT_DIR:-"/gpfs/hps3/emc/global/noscrub/emc.glopara/git/fv3gfs/fix/fix_sfc_climo"} ;; "WCOSS_DELL_P3") FIXgsm=${FIXgsm:-"/gpfs/dell2/emc/modeling/noscrub/emc.glopara/git/fv3gfs/fix/fix_am"} TOPO_DIR=${TOPO_DIR:-"/gpfs/dell2/emc/modeling/noscrub/emc.glopara/git/fv3gfs/fix/fix_orog"} - SFC_CLIMO_INPUT_DIR=${SFC_CLIMO_INPUT_DIR:-""} - ;; - -"DELL") - FIXgsm=${FIXgsm:-"/gpfs/dell2/emc/modeling/noscrub/emc.glopara/git/fv3gfs/fix/fix_am"} - TOPO_DIR=${TOPO_DIR:-"/gpfs/dell2/emc/modeling/noscrub/emc.glopara/git/fv3gfs/fix/fix_orog"} - SFC_CLIMO_INPUT_DIR=${SFC_CLIMO_INPUT_DIR:-""} - ;; - -"THEIA") - FIXgsm=${FIXgsm:-"/scratch4/NCEPDEV/global/save/glopara/git/fv3gfs/fix/fix_am"} - TOPO_DIR=${TOPO_DIR:-"/scratch4/NCEPDEV/global/save/glopara/git/fv3gfs/fix/fix_orog"} - SFC_CLIMO_INPUT_DIR=${SFC_CLIMO_INPUT_DIR:-"/scratch4/NCEPDEV/da/noscrub/George.Gayno/climo_fields_netcdf"} + SFC_CLIMO_INPUT_DIR=${SFC_CLIMO_INPUT_DIR:-"/gpfs/dell2/emc/modeling/noscrub/emc.glopara/git/fv3gfs/fix/fix_sfc_climo"} ;; "HERA") @@ -2766,6 +2775,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. # #----------------------------------------------------------------------- diff --git a/ush/valid_param_vals.sh b/ush/valid_param_vals.sh index 7c0c07315..2aad5c51d 100644 --- a/ush/valid_param_vals.sh +++ b/ush/valid_param_vals.sh @@ -72,3 +72,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")