Skip to content

Commit

Permalink
Merge pull request #80 from gsketefian/community_develop
Browse files Browse the repository at this point in the history
Community develop
  • Loading branch information
gsketefian authored Aug 27, 2019
2 parents 1a6917f + e3ce156 commit cb4d8a6
Show file tree
Hide file tree
Showing 16 changed files with 917 additions and 256 deletions.
24 changes: 18 additions & 6 deletions jobs/JREGIONAL_GET_EXTRN_FILES
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,22 @@ fi
#
#-----------------------------------------------------------------------
#
if [ "$ANL_OR_FCST" = "ANL" ]; then
mkdir_vrfy -p "$EXTRN_MDL_FILES_BASEDIR_ICSSURF"
if [ "${RUN_ENVIR}" = "nco" ]; then

COMINGFS=COMINgfs=/scratch3/NCEPDEV/hwrf/noscrub/hafs-input/COMGFS
COMINgfs=/scratch3/NCEPDEV/hwrf/noscrub/hafs-input/COMGFS
EXTRN_MDL_FILES_DIR="$EXTRN_MDL_FILES_BASEDIR_ICSSURF/$CDATE"
elif [ "$ANL_OR_FCST" = "FCST" ]; then
mkdir_vrfy -p "$EXTRN_MDL_FILES_BASEDIR_LBCS"
EXTRN_MDL_FILES_DIR="$EXTRN_MDL_FILES_BASEDIR_LBCS/$CDATE"

else

if [ "$ANL_OR_FCST" = "ANL" ]; then
mkdir_vrfy -p "$EXTRN_MDL_FILES_BASEDIR_ICSSURF"
EXTRN_MDL_FILES_DIR="$EXTRN_MDL_FILES_BASEDIR_ICSSURF/$CDATE"
elif [ "$ANL_OR_FCST" = "FCST" ]; then
mkdir_vrfy -p "$EXTRN_MDL_FILES_BASEDIR_LBCS"
EXTRN_MDL_FILES_DIR="$EXTRN_MDL_FILES_BASEDIR_LBCS/$CDATE"
fi

fi
#
#-----------------------------------------------------------------------
Expand Down Expand Up @@ -240,7 +250,9 @@ $SCRIPTSDIR/exregional_get_extrn_files.sh \
EXTRN_MDL_ARCV_FNS="${EXTRN_MDL_ARCV_FNS_str}" \
EXTRN_MDL_ARCV_FPS="${EXTRN_MDL_ARCV_FPS_str}" \
EXTRN_MDL_ARCV_FMT="${EXTRN_MDL_ARCV_FMT}" \
EXTRN_MDL_ARCVREL_DIR="${EXTRN_MDL_ARCVREL_DIR}"
EXTRN_MDL_ARCVREL_DIR="${EXTRN_MDL_ARCVREL_DIR}" \
|| print_err_msg_exit "${script_name}" "\
Call to ex-script corresponding to J-job \"${script_name}\" failed."
#
#-----------------------------------------------------------------------
#
Expand Down
4 changes: 3 additions & 1 deletion jobs/JREGIONAL_MAKE_IC_LOWBC
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,9 @@ $SCRIPTSDIR/exregional_make_ic_lowbc.sh \
EXTRN_MDL_CDATE="${EXTRN_MDL_CDATE}" \
WGRIB2_DIR="${WGRIB2_DIR}" \
APRUN="${APRUN}" \
WORKDIR_ICSLBCS_CDATE="${WORKDIR_ICSLBCS_CDATE}"
WORKDIR_ICSLBCS_CDATE="${WORKDIR_ICSLBCS_CDATE}" \
|| print_err_msg_exit "${script_name}" "\
Call to ex-script corresponding to J-job \"${script_name}\" failed."
#
#-----------------------------------------------------------------------
#
Expand Down
4 changes: 3 additions & 1 deletion jobs/JREGIONAL_MAKE_LBC1_TO_LBCN
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,9 @@ $SCRIPTSDIR/exregional_make_lbc1_to_lbcn.sh \
WGRIB2_DIR="${WGRIB2_DIR}" \
APRUN="${APRUN}" \
WORKDIR_ICSLBCS_CDATE="${WORKDIR_ICSLBCS_CDATE}" \
EXTRN_MDL_LBC_UPDATE_FHRS="${EXTRN_MDL_LBC_UPDATE_FHRS_str}"
EXTRN_MDL_LBC_UPDATE_FHRS="${EXTRN_MDL_LBC_UPDATE_FHRS_str}" \
|| print_err_msg_exit "${script_name}" "\
Call to ex-script corresponding to J-job \"${script_name}\" failed."
#
#-----------------------------------------------------------------------
#
Expand Down
4 changes: 3 additions & 1 deletion jobs/JREGIONAL_MAKE_SFC_CLIMO
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ mkdir_vrfy ${WORKDIR_LOCAL}
#-----------------------------------------------------------------------
#
${SCRIPTSDIR}/exregional_make_sfc_climo.sh \
WORKDIR_LOCAL="${WORKDIR_LOCAL}"
WORKDIR_LOCAL="${WORKDIR_LOCAL}" \
|| print_err_msg_exit "${script_name}" "\
Call to ex-script corresponding to J-job \"${script_name}\" failed."
#
#-----------------------------------------------------------------------
#
Expand Down
15 changes: 12 additions & 3 deletions jobs/JREGIONAL_RUN_FV3
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,17 @@ the specified cycle.
#
#-----------------------------------------------------------------------
#
RUNDIR="$EXPTDIR/$CDATE"
if [ "${RUN_ENVIR}" = "nco" ]; then
DOMAIN=${predef_domain}
YYMMDDHH=...
DATA="$STMP/tmpnwprd/regional_forecast_tm00_${DOMAIN}_${YYMMDDHH}"
RUNDIR=$DATA
else
RUNDIR="$EXPTDIR/$CDATE"
fi

check_for_preexist_dir $RUNDIR ${preexisting_dir_method}
mkdir_vrfy $RUNDIR

mkdir_vrfy $RUNDIR/INPUT
mkdir_vrfy $RUNDIR/RESTART
#
Expand Down Expand Up @@ -290,7 +297,9 @@ fi
#-----------------------------------------------------------------------
#
$SCRIPTSDIR/exregional_run_fv3.sh \
RUNDIR="${RUNDIR}"
RUNDIR="${RUNDIR}" \
|| print_err_msg_exit "${script_name}" "\
Call to ex-script corresponding to J-job \"${script_name}\" failed."
#
#-----------------------------------------------------------------------
#
Expand Down
115 changes: 115 additions & 0 deletions jobs/JREGIONAL_RUN_POST
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
#!/bin/bash

#
#-----------------------------------------------------------------------
#
# This script runs the post-processor (UPP) on the NetCDF output files
# of the write component of the FV3SAR model.
#
#-----------------------------------------------------------------------
#

#
#-----------------------------------------------------------------------
#
# Source the variable definitions script and the function definitions
# file.
#
#-----------------------------------------------------------------------
#
. $SCRIPT_VAR_DEFNS_FP
. $USHDIR/source_funcs.sh
#
#-----------------------------------------------------------------------
#
# Save current shell options (in a global array). Then set new options
# for this script/function.
#
#-----------------------------------------------------------------------
#
{ save_shell_opts; set -u -x; } > /dev/null 2>&1
#
#-----------------------------------------------------------------------
#
# Set the script name and print out an informational message informing
# the user that we've entered this script.
#
#-----------------------------------------------------------------------
#
script_name=$( basename "$0" )
print_info_msg "\n\
========================================================================
Entering script: \"${script_name}\"
This is the J-job script for the task that runs the post-processor (UPP)
on the output files corresponding to a specified forecast hour.
========================================================================"
#
#-----------------------------------------------------------------------
#
#
#
#-----------------------------------------------------------------------
#
RUNDIR="$EXPTDIR/$CDATE"
#
#-----------------------------------------------------------------------
#
# If it doesn't already exist, create the directory (POSTPRD_DIR) in
# which to store post-processing output. (Note that POSTPRD_DIR may al-
# ready have been created by this post-processing script run for a dif-
# ferent forecast hour.) Also, create a temporary work directory (FHR_-
# DIR) for the current forecast hour being processed. FHR_DIR will be
# deleted later after the processing for the current forecast hour is
# complete. Then change location to FHR_DIR.
#
# Note that there may be a preexisting version of FHR_DIR from previous
# runs of this script for the current forecast hour (e.g. from the work-
# flow task that runs this script failing and then being called again).
# Thus, we first make sure preexisting versions are deleted.
#
#-----------------------------------------------------------------------
#
POSTPRD_DIR="$RUNDIR/postprd"
mkdir_vrfy -p "${POSTPRD_DIR}"

FHR_DIR="${POSTPRD_DIR}/$fhr"
check_for_preexist_dir $FHR_DIR "delete"
mkdir_vrfy -p "${FHR_DIR}"

cd_vrfy ${FHR_DIR}
#
#-----------------------------------------------------------------------
#
# Call the ex-script for this J-job and pass to it the necessary varia-
# bles.
#
#-----------------------------------------------------------------------
#
$SCRIPTSDIR/exregional_run_post.sh \
RUNDIR="${RUNDIR}" \
POSTPRD_DIR="${POSTPRD_DIR}" \
FHR_DIR="${FHR_DIR}" \
fhr="${fhr}" \
|| print_err_msg_exit "${script_name}" "\
Call to ex-script corresponding to J-job \"${script_name}\" failed."
#
#-----------------------------------------------------------------------
#
# Print exit message.
#
#-----------------------------------------------------------------------
#
print_info_msg "\n\
========================================================================
Exiting script: \"${script_name}\"
========================================================================"
#
#-----------------------------------------------------------------------
#
# Restore the shell options saved at the beginning of this script/func-
# tion.
#
#-----------------------------------------------------------------------
#
{ restore_shell_opts; } > /dev/null 2>&1

5 changes: 3 additions & 2 deletions scripts/exregional_make_ic_lowbc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,9 @@ status."
#
#-----------------------------------------------------------------------
#
#${APRUN} ${EXECDIR}/chgres_cube.exe || print_err_msg_exit "${script_name}" "\
${APRUN} ${BASEDIR}/UFS_UTILS_chgres_grib2/exec/chgres_cube.exe || print_err_msg_exit "${script_name}" "\
#${APRUN} ${BASEDIR}/UFS_UTILS_chgres_grib2/exec/chgres_cube.exe || print_err_msg_exit "${script_name}" "\
${APRUN} ${EXECDIR}/chgres_cube.exe || \
print_err_msg_exit "${script_name}" "\
Call to executable to generate surface and initial conditions files for
the FV3SAR failed:
EXTRN_MDL_NAME_ICSSURF = \"${EXTRN_MDL_NAME_ICSSURF}\"
Expand Down
3 changes: 2 additions & 1 deletion scripts/exregional_make_lbc1_to_lbcn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,8 @@ with nonzero status."
#
# Run chgres_cube.
#
${APRUN} ${BASEDIR}/UFS_UTILS_chgres_grib2/exec/chgres_cube.exe || \
# ${APRUN} ${BASEDIR}/UFS_UTILS_chgres_grib2/exec/chgres_cube.exe || \
${APRUN} ${EXECDIR}/chgres_cube.exe || \
print_err_msg_exit "${script_name}" "\
Call to executable to generate lateral boundary conditions file for the
the FV3SAR failed:
Expand Down
Loading

0 comments on commit cb4d8a6

Please sign in to comment.