From 799d0942f749438234c37af487bf3d2e2714b205 Mon Sep 17 00:00:00 2001 From: dmwright526 Date: Fri, 8 Oct 2021 19:49:46 +0000 Subject: [PATCH 1/2] Change fvcom_to_FV3 use to allow for warm/cold start sfc data and time selection in a FVCOM file --- scripts/exregional_make_ics.sh | 6 +++++- ush/config_defaults.sh | 7 +++++++ ush/setup.sh | 3 +++ ush/valid_param_vals.sh | 1 + 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/scripts/exregional_make_ics.sh b/scripts/exregional_make_ics.sh index ec0fee623..951477c93 100755 --- a/scripts/exregional_make_ics.sh +++ b/scripts/exregional_make_ics.sh @@ -658,8 +658,10 @@ mv_vrfy gfs.bndy.nc ${ics_dir}/gfs_bndy.tile${TILE_RGNL}.000.nc # if [ "${USE_FVCOM}" = "TRUE" ]; then +#Format for fvcom_time: YYYY-MM-DDTHH:00:00.000000 fvcom_exec_fn="fvcom_to_FV3" fvcom_exec_fp="$EXECDIR/${fvcom_exec_fn}" + fvcom_time="${DATE_FIRST_CYCL:0:4}-${DATE_FIRST_CYCL:4:2}-${DATE_FIRST_CYCL:6:2}T${CYCL_HRS[0]}:00:00.000000" if [ ! -f "${fvcom_exec_fp}" ]; then print_err_msg_exit "\ The executable (fvcom_exec_fp) for processing FVCOM data onto FV3-LAM @@ -680,13 +682,15 @@ Please check the following user defined variables: 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 || \ + ${APRUN} ${fvcom_exec_fn} sfc_data.tile${TILE_RGNL}.halo${NH0}.nc fvcom.nc ${FVCOM_WCSTART} ${fvcom_time}|| \ 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}\" + fvcom_time = \"${fvcom_time}\" + FVCOM_WCSTART = \"${FVCOM_WCSTART}\" ics_dir = \"${ics_dir}\" fvcom_exe_dir = \"${fvcom_exe_dir}\" fvcom_exe = \"${fvcom_exe}\"" diff --git a/ush/config_defaults.sh b/ush/config_defaults.sh index dd6a2968c..0c4bb2660 100644 --- a/ush/config_defaults.sh +++ b/ush/config_defaults.sh @@ -1723,6 +1723,12 @@ HALO_BLEND="10" # 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_WCSTART: +# Define if this is a "warm" start or a "cold" start. Setting this to +# "warm" will read in sfc_data.nc generated in a RESTART directory. +# Setting this to "cold" will read in the sfc_data.nc generated from +# chgres_cube in the make_ics portion of the workflow. +# # 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 @@ -1735,6 +1741,7 @@ HALO_BLEND="10" #------------------------------------------------------------------------ # USE_FVCOM="FALSE" +FVCOM_WCSTART="cold" FVCOM_DIR="/user/defined/dir/to/fvcom/data" FVCOM_FILE="fvcom.nc" # diff --git a/ush/setup.sh b/ush/setup.sh index 96b1ef071..36f667225 100755 --- a/ush/setup.sh +++ b/ush/setup.sh @@ -450,6 +450,8 @@ fi # # Make sure that USE_FVCOM is set to a valid value and assign directory # and file names. +# +# Set FVCOM_WCSTART to all lowercase "warm" or "cold" # #----------------------------------------------------------------------- # @@ -466,6 +468,7 @@ elif [ "$USE_FVCOM" = "FALSE" ] || \ [ "$USE_FVCOM" = "NO" ]; then USE_FVCOM="FALSE" fi +FVCOM_WCSTART=$(echo_lowercase $FVCOM_WCSTART) # #----------------------------------------------------------------------- # diff --git a/ush/valid_param_vals.sh b/ush/valid_param_vals.sh index f42093fa6..53f50f724 100644 --- a/ush/valid_param_vals.sh +++ b/ush/valid_param_vals.sh @@ -72,6 +72,7 @@ valid_vals_DO_SPP=("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") +valid_vals_FVCOM_WCSTART=("warm" "cold") valid_vals_COMPILER=("intel" "gnu") valid_vals_SUB_HOURLY_POST=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") valid_vals_DT_SUBHOURLY_POST_MNTS=("1" "01" "2" "02" "3" "03" "4" "04" "5" "05" "6" "06" "10" "12" "15" "20" "30") From 26aef641b85fb393f01b1b7434a072030832e46a Mon Sep 17 00:00:00 2001 From: dmwright526 Date: Wed, 27 Oct 2021 17:54:51 +0000 Subject: [PATCH 2/2] Update valid values for FVCOM_WCSTART --- ush/setup.sh | 3 ++- ush/valid_param_vals.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ush/setup.sh b/ush/setup.sh index 36f667225..a166fafcc 100755 --- a/ush/setup.sh +++ b/ush/setup.sh @@ -451,11 +451,12 @@ fi # Make sure that USE_FVCOM is set to a valid value and assign directory # and file names. # -# Set FVCOM_WCSTART to all lowercase "warm" or "cold" +# Make sure that FVCOM_WCSTART is set to lowercase "warm" or "cold" # #----------------------------------------------------------------------- # check_var_valid_value "USE_FVCOM" "valid_vals_USE_FVCOM" +check_var_valid_value "FVCOM_WCSTART" "valid_vals_FVCOM_WCSTART" # # Set USE_FVCOM to either "TRUE" or "FALSE" so we don't have to consider # other valid values later on. diff --git a/ush/valid_param_vals.sh b/ush/valid_param_vals.sh index 53f50f724..1b3acf00a 100644 --- a/ush/valid_param_vals.sh +++ b/ush/valid_param_vals.sh @@ -72,7 +72,7 @@ valid_vals_DO_SPP=("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") -valid_vals_FVCOM_WCSTART=("warm" "cold") +valid_vals_FVCOM_WCSTART=("warm" "WARM" "cold" "COLD") valid_vals_COMPILER=("intel" "gnu") valid_vals_SUB_HOURLY_POST=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") valid_vals_DT_SUBHOURLY_POST_MNTS=("1" "01" "2" "02" "3" "03" "4" "04" "5" "05" "6" "06" "10" "12" "15" "20" "30")