Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganize NPOESS scripts #2166

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "npoess" -c "base"

export OMP_NUM_THREADS=${OMP_NUM_THREADS:-1}


################################
# Set up the HOME directory
################################
Expand Down Expand Up @@ -38,47 +37,6 @@ GRID="0p50" YMD=${PDY} HH=${cyc} generate_com -rx COM_ATMOS_GRIB_0p50:COM_ATMOS_

mkdir -m 775 -p "${COM_ATMOS_GOES}"

# TODO - This should be in the ex-script (#1226)

####################################
# Specify Forecast Hour Range
####################################
export SHOUR=000
export FHOUR=180
export FHINC=003

####################################
# Specify Timeout Behavior of Post
#
# SLEEP_TIME - Amount of time to wait for
# a restart file before exiting
# SLEEP_INT - Amount of time to wait between
# checking for restart files
####################################
export SLEEP_TIME=900
export SLEEP_INT=5

####################################
# Check if this is a restart
####################################
if [[ -f "${COM_ATMOS_GOES}/${RUN}.t${cyc}z.control.goessimpgrb2" ]]; then
modelrecvy=$(cat < "${COM_ATMOS_GOES}/${RUN}.t${cyc}z.control.goessimpgrb")
recvy_cyc="${modelrecvy:8:2}"
recvy_shour="${modelrecvy:10:13}"

if [[ ${RERUN} == "NO" ]]; then
NEW_SHOUR=$(( recvy_shour + FHINC ))
if (( NEW_SHOUR >= SHOUR )); then
export SHOUR=${NEW_SHOUR}
fi
if (( recvy_shour >= FHOUR )); then
echo "Forecast Pgrb Generation Already Completed to ${FHOUR}"
else
echo "Starting: PDY=${PDY} cycle=t${recvy_cyc}z SHOUR=${SHOUR}"
fi
fi
fi

#############################################################
# Execute the script
"${HOMEgfs}/scripts/exgfs_atmos_grib2_special_npoess.sh"
Expand Down
45 changes: 44 additions & 1 deletion scripts/exgfs_atmos_grib2_special_npoess.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,52 @@ export opt26=' -set_grib_max_bits 25 -fi -if '
export opt27=":(APCP|ACPCP|PRATE|CPRAT|DZDT):"
export opt28=' -new_grid_interpolation budget -fi '

SLEEP_LOOP_MAX=$(expr $SLEEP_TIME / $SLEEP_INT)
####################################
# Specify Timeout Behavior of Post
#
# SLEEP_TIME - Amount of time to wait for
# a restart file before exiting
# SLEEP_INT - Amount of time to wait between
# checking for restart files
####################################
export SLEEP_TIME=${SLEEP_TIME:-900}
export SLEEP_INT=${SLEEP_TIME:-5}

SLEEP_LOOP_MAX=$(( SLEEP_TIME / SLEEP_INT ))

# TODO: Does this section do anything? I retained if for clarity of
# changes/updates, but it does not appear to do anything.
HenryRWinterbottom marked this conversation as resolved.
Show resolved Hide resolved

####################################
# Check if this is a restart
####################################
if [[ -f "${COM_ATMOS_GOES}/${RUN}.t${cyc}z.control.goessimpgrb2" ]]; then
modelrecvy=$(cat < "${COM_ATMOS_GOES}/${RUN}.t${cyc}z.control.goessimpgrb")
recvy_cyc="${modelrecvy:8:2}"
recvy_shour="${modelrecvy:10:13}"

if [[ ${RERUN} == "NO" ]]; then
NEW_SHOUR=$(( recvy_shour + FHINC ))
if (( NEW_SHOUR >= SHOUR )); then
export SHOUR="${NEW_SHOUR}"
fi
if (( recvy_shour >= FHOUR )); then
echo "Forecast Pgrb Generation Already Completed to ${FHOUR}"
else
echo "Starting: PDY=${PDY} cycle=t${recvy_cyc}z SHOUR=${SHOUR}"
fi
fi
fi

##############################################################################
# Specify Forecast Hour Range F000 - F024 for GFS_NPOESS_PGRB2_0P5DEG
##############################################################################
export SHOUR=000
export FHOUR=024
KateFriedman-NOAA marked this conversation as resolved.
Show resolved Hide resolved
export FHINC=003
if [[ "${FHOUR}" -gt "${FHMAX_GFS}" ]]; then
export FHOUR="${FHMAX_GFS}"
fi

############################################################
# Loop Through the Post Forecast Files
Expand Down Expand Up @@ -109,6 +148,10 @@ done
################################################################
export SHOUR=000
export FHOUR=180
WalterKolczynski-NOAA marked this conversation as resolved.
Show resolved Hide resolved
export FHINC=003
if [[ "${FHOUR}" -gt "${FHMAX_GFS}" ]]; then
export FHOUR="${FHMAX_GFS}"
fi

#################################
# Process GFS PGRB2_SPECIAL_POST
Expand Down