diff --git a/scripts/exregional_run_fcst.sh b/scripts/exregional_run_fcst.sh index 5963fd6bcf..513aa66345 100755 --- a/scripts/exregional_run_fcst.sh +++ b/scripts/exregional_run_fcst.sh @@ -410,20 +410,22 @@ done # #----------------------------------------------------------------------- # -for f_nm_path in ${FIXclim}/*; do - f_nm=$( basename "${f_nm_path}" ) - pre_f="${f_nm%%.*}" - - if [ "${pre_f}" = "merra2" ]; then - mnth=$( printf "%s\n" "${f_nm}" | grep -o -P '(?<=2014.m).*(?=.nc)' ) - symlink="${run_dir}/aeroclim.m${mnth}.nc" - else - symlink="${run_dir}/${pre_f}.dat" - fi - target="${f_nm_path}" - create_symlink_to_file target="$target" symlink="$symlink" \ +if [ "${USE_MERRA_CLIMO}" = "TRUE" ]; then + for f_nm_path in ${FIXclim}/*; do + f_nm=$( basename "${f_nm_path}" ) + pre_f="${f_nm%%.*}" + + if [ "${pre_f}" = "merra2" ]; then + mnth=$( printf "%s\n" "${f_nm}" | grep -o -P '(?<=2014.m).*(?=.nc)' ) + symlink="${run_dir}/aeroclim.m${mnth}.nc" + else + symlink="${run_dir}/${pre_f}.dat" + fi + target="${f_nm_path}" + create_symlink_to_file target="$target" symlink="$symlink" \ relative="${relative_link_flag}" -done + done +fi # #----------------------------------------------------------------------- # diff --git a/tests/WE2E/test_configs/grids_extrn_mdls_suites_community/config.grid_RRFS_CONUS_3km_ics_FV3GFS_lbcs_FV3GFS_suite_GFS_v15_thompson_mynn_lam3km.sh b/tests/WE2E/test_configs/grids_extrn_mdls_suites_community/config.grid_RRFS_CONUS_3km_ics_FV3GFS_lbcs_FV3GFS_suite_GFS_v15_thompson_mynn_lam3km.sh index f391b26886..03dbd2c381 100644 --- a/tests/WE2E/test_configs/grids_extrn_mdls_suites_community/config.grid_RRFS_CONUS_3km_ics_FV3GFS_lbcs_FV3GFS_suite_GFS_v15_thompson_mynn_lam3km.sh +++ b/tests/WE2E/test_configs/grids_extrn_mdls_suites_community/config.grid_RRFS_CONUS_3km_ics_FV3GFS_lbcs_FV3GFS_suite_GFS_v15_thompson_mynn_lam3km.sh @@ -13,6 +13,8 @@ PREEXISTING_DIR_METHOD="rename" PREDEF_GRID_NAME="RRFS_CONUS_3km" CCPP_PHYS_SUITE="FV3_GFS_v15_thompson_mynn_lam3km" +USE_MERRA_CLIMO="TRUE" + EXTRN_MDL_NAME_ICS="FV3GFS" EXTRN_MDL_NAME_LBCS="FV3GFS" USE_USER_STAGED_EXTRN_FILES="TRUE" diff --git a/ush/config_defaults.sh b/ush/config_defaults.sh index 702cf4db8d..c3090cc8bc 100644 --- a/ush/config_defaults.sh +++ b/ush/config_defaults.sh @@ -1333,6 +1333,15 @@ RUN_TASK_VX_ENSPOINT="FALSE" # #----------------------------------------------------------------------- # +# Flag that determines whether MERRA2 aerosol climatology data and +# lookup tables for optics properties are obtained +# +#----------------------------------------------------------------------- +# +USE_MERRA_CLIMO="FALSE" +# +#----------------------------------------------------------------------- +# # Set the array parameter containing the names of all the fields that the # MAKE_SFC_CLIMO_TN task generates on the native FV3-LAM grid. # diff --git a/ush/generate_FV3LAM_wflow.sh b/ush/generate_FV3LAM_wflow.sh index d19a58b52c..db65baec21 100755 --- a/ush/generate_FV3LAM_wflow.sh +++ b/ush/generate_FV3LAM_wflow.sh @@ -618,18 +618,20 @@ fi # #----------------------------------------------------------------------- # -print_info_msg "$VERBOSE" " +if [ "${USE_MERRA_CLIMO}" = "TRUE" ]; then + print_info_msg "$VERBOSE" " Copying MERRA2 aerosol climatology data files from system directory (FIXaer/FIXlut) to a subdirectory (FIXclim) in the experiment directory: FIXaer = \"${FIXaer}\" FIXlut = \"${FIXlut}\" FIXclim = \"${FIXclim}\"" -check_for_preexist_dir_file "${FIXclim}" "delete" -mkdir_vrfy -p "${FIXclim}" + check_for_preexist_dir_file "${FIXclim}" "delete" + mkdir_vrfy -p "${FIXclim}" -cp_vrfy "${FIXaer}/merra2.aerclim"*".nc" "${FIXclim}/" -cp_vrfy "${FIXlut}/optics"*".dat" "${FIXclim}/" + cp_vrfy "${FIXaer}/merra2.aerclim"*".nc" "${FIXclim}/" + cp_vrfy "${FIXlut}/optics"*".dat" "${FIXclim}/" +fi # #----------------------------------------------------------------------- # diff --git a/ush/setup.sh b/ush/setup.sh index ee49750ae9..88dcab21e5 100755 --- a/ush/setup.sh +++ b/ush/setup.sh @@ -790,6 +790,30 @@ check_var_valid_value \ # #----------------------------------------------------------------------- # +# Make sure that USE_MERRA_CLIMO is set to a valid value. +# +#----------------------------------------------------------------------- +# +check_var_valid_value "USE_MERRA_CLIMO" "valid_vals_USE_MERRA_CLIMO" +# +# Set USE_MERRA_CLIMO to either "TRUE" or "FALSE" so we don't +# have to consider other valid values later on. +# +USE_MERRA_CLIMO=$(echo_uppercase $USE_MERRA_CLIMO) +if [ "${USE_MERRA_CLIMO}" = "TRUE" ] || \ + [ "${USE_MERRA_CLIMO}" = "YES" ]; then + USE_MERRA_CLIMO="TRUE" +elif [ "${USE_MERRA_CLIMO}" = "FALSE" ] || \ + [ "${USE_MERRA_CLIMO}" = "NO" ]; then + USE_MERRA_CLIMO="FALSE" +fi +# Force to "TRUE" in case of FV3_GFS_v15_thompson_mynn_lam3km: +if [ "${CCPP_PHYS_SUITE}" = "FV3_GFS_v15_thompson_mynn_lam3km" ]; then + USE_MERRA_CLIMO="TRUE" +fi +# +#----------------------------------------------------------------------- +# # Make sure that FCST_MODEL is set to a valid value. # #----------------------------------------------------------------------- diff --git a/ush/valid_param_vals.sh b/ush/valid_param_vals.sh index a8bd0ae721..c421441309 100644 --- a/ush/valid_param_vals.sh +++ b/ush/valid_param_vals.sh @@ -78,3 +78,4 @@ 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") +valid_vals_USE_MERRA_CLIMO=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no")