diff --git a/scripts/exregional_make_grid.sh b/scripts/exregional_make_grid.sh index a7921b5bb..c0d033a4e 100755 --- a/scripts/exregional_make_grid.sh +++ b/scripts/exregional_make_grid.sh @@ -20,7 +20,6 @@ . $USHDIR/link_fix.sh . $USHDIR/set_FV3nml_sfc_climo_filenames.sh . $USHDIR/set_FV3nml_stoch_params.sh -. $USHDIR/create_diag_table_files.sh # #----------------------------------------------------------------------- # @@ -682,10 +681,6 @@ if [ "${DO_ENSEMBLE}" = TRUE ]; then Call to function to set stochastic parameters in the FV3 namelist files for the various ensemble members failed." fi - -create_diag_table_files || print_err_msg_exit "\ -Call to function to create a diagnostics table file under each cycle -directory failed." # #----------------------------------------------------------------------- # diff --git a/scripts/exregional_run_fcst.sh b/scripts/exregional_run_fcst.sh index e712fb2b5..13c644a3d 100755 --- a/scripts/exregional_run_fcst.sh +++ b/scripts/exregional_run_fcst.sh @@ -17,6 +17,7 @@ #----------------------------------------------------------------------- # . $USHDIR/create_model_configure_file.sh +. $USHDIR/create_diag_table_file.sh # #----------------------------------------------------------------------- # @@ -459,6 +460,19 @@ cycle's (cdate) run directory (run_dir) failed: # #----------------------------------------------------------------------- # +# Call the function that creates the model configuration file within each +# cycle directory. +# +#----------------------------------------------------------------------- +# +create_diag_table_file \ + run_dir="${run_dir}" || print_err_msg_exit "\ + Call to function to create a diag table file for the current + cycle's (cdate) run directory (run_dir) failed: + run_dir = \"${run_dir}\"" +# +#----------------------------------------------------------------------- +# # If running ensemble forecasts, create a link to the cycle-specific # diagnostic tables file in the cycle directory. Note that this link # should not be made if not running ensemble forecasts because in that diff --git a/ush/create_diag_table_files.sh b/ush/create_diag_table_file.sh similarity index 80% rename from ush/create_diag_table_files.sh rename to ush/create_diag_table_file.sh index cff8c0424..5a5237d56 100644 --- a/ush/create_diag_table_files.sh +++ b/ush/create_diag_table_file.sh @@ -6,7 +6,7 @@ # #----------------------------------------------------------------------- # -function create_diag_table_files() { +function create_diag_table_file() { # #----------------------------------------------------------------------- # @@ -45,7 +45,9 @@ function create_diag_table_files() { # #----------------------------------------------------------------------- # - local valid_args=() + local valid_args=( +run_dir \ +) process_args valid_args "$@" # #----------------------------------------------------------------------- @@ -65,8 +67,6 @@ function create_diag_table_files() { #----------------------------------------------------------------------- # local i \ - cdate \ - cycle_dir \ diag_table_fp \ settings # @@ -77,39 +77,35 @@ function create_diag_table_files() { #----------------------------------------------------------------------- # print_info_msg "$VERBOSE" " -Creating a diagnostics table file (\"${DIAG_TABLE_FN}\") within each cycle -directory..." +Creating a diagnostics table file (\"${DIAG_TABLE_FN}\") in the specified run +directory (run_dir): + run_dir = \"${run_dir}\"" - for (( i=0; i<${NUM_CYCLES}; i++ )); do - - cdate="${ALL_CDATES[$i]}" - cycle_dir="${CYCLE_BASEDIR}/$cdate" - - diag_table_fp="${cycle_dir}/${DIAG_TABLE_FN}" - print_info_msg "$VERBOSE" " +# Copy template diag_table file from the templates directory to the +# run directory. + diag_table_fp="${run_dir}/${DIAG_TABLE_FN}" + print_info_msg "$VERBOSE" " Using the template diagnostics table file: - diag_table_tmpl_fp = ${DIAG_TABLE_TMPL_FP} + diag_table_tmpl_fp = ${DIAG_TABLE_TMPL_FP} to create: - diag_table_fp = \"${diag_table_fp}\"" + diag_table_fp = \"${diag_table_fp}\"" - settings=" - starttime: !datetime ${ALL_CDATES[$i]} + settings=" + starttime: !datetime ${CDATE} cres: ${CRES} " - $USHDIR/fill_jinja_template.py -q -u "${settings}" -t "${DIAG_TABLE_TMPL_FP}" -o "${diag_table_fp}" || \ - print_err_msg_exit " + $USHDIR/fill_jinja_template.py -q -u "${settings}" -t "${DIAG_TABLE_TMPL_FP}" -o "${diag_table_fp}" || \ + print_err_msg_exit " !!!!!!!!!!!!!!!!! fill_jinja_template.py failed! !!!!!!!!!!!!!!!!! " - - done # #----------------------------------------------------------------------- # diff --git a/ush/generate_FV3LAM_wflow.sh b/ush/generate_FV3LAM_wflow.sh index 1d1cba527..187eaab05 100755 --- a/ush/generate_FV3LAM_wflow.sh +++ b/ush/generate_FV3LAM_wflow.sh @@ -48,7 +48,6 @@ ushdir="${scrfunc_dir}" . $ushdir/source_util_funcs.sh . $ushdir/set_FV3nml_sfc_climo_filenames.sh . $ushdir/set_FV3nml_stoch_params.sh -. $ushdir/create_diag_table_files.sh # #----------------------------------------------------------------------- # @@ -315,21 +314,6 @@ $settings" # #----------------------------------------------------------------------- # -# Create the cycle directories. -# -#----------------------------------------------------------------------- -# -print_info_msg "$VERBOSE" " -Creating the cycle directories..." - -for (( i=0; i<${NUM_CYCLES}; i++ )); do - cdate="${ALL_CDATES[$i]}" - cycle_dir="${CYCLE_BASEDIR}/$cdate" - mkdir_vrfy -p "${cycle_dir}" -done -# -#----------------------------------------------------------------------- -# # Create a symlink in the experiment directory that points to the workflow # (re)launch script. # @@ -720,10 +704,6 @@ Call to function to set stochastic parameters in the FV3 namelist files for the various ensemble members failed." fi - create_diag_table_files || print_err_msg_exit "\ -Call to function to create a diagnostics table file under each cycle -directory failed." - fi # #----------------------------------------------------------------------- diff --git a/ush/setup.sh b/ush/setup.sh index 4200c6e73..c29a2a076 100755 --- a/ush/setup.sh +++ b/ush/setup.sh @@ -621,24 +621,6 @@ done # #----------------------------------------------------------------------- # -# Call a function to generate the array ALL_CDATES containing the cycle -# dates/hours for which to run forecasts. The elements of this array -# will have the form YYYYMMDDHH. They are the starting dates/times of -# the forecasts that will be run in the experiment. Then set NUM_CYCLES -# to the number of elements in this array. -# -#----------------------------------------------------------------------- -# -set_cycle_dates \ - date_start="${DATE_FIRST_CYCL}" \ - date_end="${DATE_LAST_CYCL}" \ - cycle_hrs="${CYCL_HRS_str}" \ - output_varname_all_cdates="ALL_CDATES" - -NUM_CYCLES="${#ALL_CDATES[@]}" -# -#----------------------------------------------------------------------- -# # Set various directories. # # HOMErrfs: @@ -2662,18 +2644,6 @@ LBC_SPEC_FCST_HRS=(${LBC_SPEC_FCST_HRS[@]}) # #----------------------------------------------------------------------- # -# The number of cycles for which to make forecasts and the list of starting -# dates/hours of these cycles. -# -#----------------------------------------------------------------------- -# -NUM_CYCLES="${NUM_CYCLES}" -ALL_CDATES=( \\ -$( 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.