Skip to content

Commit

Permalink
Remove data waiting except for UK data from all jobs (#35)
Browse files Browse the repository at this point in the history
Co-authored-by: yali mao <yali.mao@clogin03.cactus.wcoss2.ncep.noaa.gov>
  • Loading branch information
YaliMao-NOAA and yali mao authored Jul 31, 2024
1 parent 6e0700a commit 207824d
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 156 deletions.
10 changes: 0 additions & 10 deletions jobs/JWAFS_GCIP
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,6 @@ export COMOUT=${COMOUT:-$(compath.py -o $NET/$wafs_ver)/$RUN.$PDY/$cyc/gcip}

mkdir -p $COMOUT

###############################################
# Specify Timeout Behavior of WAFS GCIP
#
# SLEEP_TIME - how long to wait for inputs before exiting
# SLEEP_INT - time interval for checking for inputs
###############################################
# JY export SLEEP_TIME=300
export SLEEP_TIME=600
export SLEEP_INT=10

############################################
# Execute the script, parallel run for 000 003
############################################
Expand Down
12 changes: 0 additions & 12 deletions jobs/JWAFS_GRIB2_0P25
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,6 @@ if [ $SENDCOM = YES ] ; then
mkdir -p $COMOUT # $PCOM
fi

###############################################
# Specify Timeout Behavior of WAFS blending
#
# SLEEP_TIME - Amount of time to wait for
# a input file before exiting
# SLEEP_INT - Amount of time to wait between
# checking for input files
###############################################
# export SLEEP_TIME=300 # changed to 60 to avoid hitting wall_clock when miss umket wafs files ...
export SLEEP_TIME=600
export SLEEP_INT=10

############################################
# Execute the script.
############################################
Expand Down
17 changes: 0 additions & 17 deletions jobs/JWAFS_UPP
Original file line number Diff line number Diff line change
Expand Up @@ -80,23 +80,6 @@ export COMINgfs=${COMINgfs:-$(compath.py $envir/$RUNupp/$gfs_ver)/gfs.$PDY/$cyc/
export COMOUT=${COMOUT:-$(compath.py -o $NET/$wafs_ver)/$RUN.$PDY/$cyc/upp}
mkdir -p $COMOUT

####################################
# Specify Special Post Vars
####################################
numx=${numx:-1}

####################################
# 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


#########################################################
# Execute the Script
#########################################################
Expand Down
88 changes: 24 additions & 64 deletions scripts/exwafs_gcip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ cd $DATA
# Overwrite TMPDIR for dumpjb
export TMPDIR=$DATA

SLEEP_LOOP_MAX=`expr $SLEEP_TIME / $SLEEP_INT`

configFile=gcip.config

echo 'before preparing data' `date`
Expand All @@ -54,21 +52,6 @@ vhour="$(printf "%02d" $(( 10#$vhour )) )"

# model data
masterFile=$COMINgfs/gfs.t${cyc}z.master.grb2f$fhr

# check the availability of model file
icnt=1
while [ $icnt -lt $SLEEP_LOOP_MAX ] ; do
if [ -s $masterFile ] ; then
break
fi
sleep $SLEEP_INT
icnt=$((icnt + 1))
if [ $icnt -ge $SLEEP_LOOP_MAX ] ; then
msg="ABORTING after $SLEEP_TIME seconds of waiting for gfs master file!"
err_exit $msg
fi
done

cp $PARMwafs/wafs_gcip_gfs.cfg $configFile

modelFile=modelfile.grb
Expand Down Expand Up @@ -96,41 +79,32 @@ for channel in $channels ; do
curl -O $COMINsat/$satFile
else
# check the availability of satellite data file
icnt=1
while [ $icnt -lt $SLEEP_LOOP_MAX ] ; do
if [ -s $COMINsat/$satFile ] ; then
break
fi
sleep $SLEEP_INT
icnt=$((icnt + 1))
if [ $icnt -ge $SLEEP_LOOP_MAX ] ; then
msg="GCIP at ${vhour}z ABORTING after $SLEEP_TIME seconds of waiting for satellite $channel file!"
echo "$msg"
rc=1
echo $msg >> $COMOUT/${RUN}.gcip.log
if [ -s $COMINsat/$satFile ] ; then
cp $COMINsat/$satFile .
else
msg="GCIP at ${vhour}z ABORTING, no satellite $channel file!"
echo "$msg"
echo $msg >> $COMOUT/${RUN}.gcip.log

if [ $envir != prod ]; then
export maillist='nco.spa@noaa.gov'
fi
export maillist=${maillist:-'nco.spa@noaa.gov,ncep.sos@noaa.gov'}

export subject="Missing GLOBCOMPVIS Satellite Data for $PDY t${cyc}z $job"
echo "*************************************************************" > mailmsg
echo "*** WARNING !! COULD NOT FIND GLOBCOMPVIS Satellite Data *** " >> mailmsg
echo "*************************************************************" >> mailmsg
echo >> mailmsg
echo "One or more GLOBCOMPVIS Satellite Data files are missing, including " >> mailmsg
echo " $COMINsat/$satFile " >> mailmsg
echo >> mailmsg
echo "$job will gracfully exited" >> mailmsg
cat mailmsg > $COMOUT/${RUN}.t${cyc}z.gcip.emailbody
cat $COMOUT/${RUN}.t${cyc}z.gcip.emailbody | mail.py -s "$subject" $maillist -v

exit $rc
if [ $envir != prod ]; then
export maillist='nco.spa@noaa.gov'
fi
done

cp $COMINsat/$satFile .
export maillist=${maillist:-'nco.spa@noaa.gov,ncep.sos@noaa.gov'}

export subject="Missing GLOBCOMPVIS Satellite Data for $PDY t${cyc}z $job"
echo "*************************************************************" > mailmsg
echo "*** WARNING !! COULD NOT FIND GLOBCOMPVIS Satellite Data *** " >> mailmsg
echo "*************************************************************" >> mailmsg
echo >> mailmsg
echo "One or more GLOBCOMPVIS Satellite Data files are missing, including " >> mailmsg
echo " $COMINsat/$satFile " >> mailmsg
echo >> mailmsg
echo "$job will gracfully exited" >> mailmsg
cat mailmsg > $COMOUT/${RUN}.t${cyc}z.gcip.emailbody
cat $COMOUT/${RUN}.t${cyc}z.gcip.emailbody | mail.py -s "$subject" $maillist -v

exit 1
fi
fi
if [[ -s $satFile ]] ; then
satFiles="$satFiles $satFile"
Expand All @@ -142,20 +116,6 @@ done

# radar data
sourceRadar=$COMINradar/refd3d.t${vhour}z.grb2f00

# check the availability of radar data file
icnt=1
while [ $icnt -lt $SLEEP_LOOP_MAX ] ; do
if [ -s $sourceRadar ] ; then
break
fi
sleep $SLEEP_INT
icnt=$((icnt + 1))
if [ $icnt -ge $SLEEP_LOOP_MAX ] ; then
echo "WARNING: radar data is not available after $SLEEP_TIME seconds of waiting!"
fi
done

radarFile=radarFile.grb
if [ -s $sourceRadar ] ; then
cp $sourceRadar $radarFile
Expand Down
16 changes: 0 additions & 16 deletions scripts/exwafs_grib2_0p25.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,6 @@ wafs2i=$COMIN/${RUN}.${cycle}.master.f$fhr.grib2.idx
master2=$COMINgfs/gfs.${cycle}.master.grb2f${fhr}
master2i=$COMINgfs/gfs.${cycle}.master.grb2if${fhr}

icnt=1
while [ $icnt -lt 1000 ]
do
if [[ -s $master2i && -s $wafs2i ]] ; then
break
fi

sleep 10
icnt=$((icnt + 1))
if [ $icnt -ge 180 ] ; then
msg="ABORTING after 30 min of waiting for the gfs wafs file!"
err_exit $msg
fi
done


########################################
echo "HAS BEGUN!"
########################################
Expand Down
15 changes: 0 additions & 15 deletions scripts/exwafs_grib2_1p25.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,6 @@ master2i=$COMINgfs/gfs.${cycle}.master.grb2if${fhr}
wafs2=$COMIN/${RUN}.${cycle}.master.f$fhr.grib2
wafs2i=$COMIN/${RUN}.${cycle}.master.f$fhr.grib2.idx

icnt=1
while [ $icnt -lt 1000 ]
do
if [[ -s $master2i && -s $wafs2i ]] ; then
break
fi

sleep 10
icnt=$((icnt + 1))
if [ $icnt -ge 180 ] ; then
msg="ABORTING after 30 min of waiting for the gfs master and wafs file!"
err_exit $msg
fi
done

########################################
echo "HAS BEGUN!"
########################################
Expand Down
22 changes: 0 additions & 22 deletions scripts/exwafs_upp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,28 +94,6 @@ if [ ${stime} = "anl" ]; then
########################## WAFS U/V/T analysis end ##########################
else
########################## WAFS forecast start ##########################
SLEEP_LOOP_MAX=`expr $SLEEP_TIME / $SLEEP_INT`

# Start Looping for the existence of the restart files
echo 'Start processing fhr='$fhr
set -x
ic=1
while [ $ic -le $SLEEP_LOOP_MAX ]
do
if [ -f $COMINgfs/$PREFIX.logf${fhr}.txt ] ; then
break
else
ic=`expr $ic + 1`
sleep $SLEEP_INT
fi
if [ $ic -eq $SLEEP_LOOP_MAX ] ; then
echo " *** FATAL ERROR: No model output in nemsio for f${fhr} "
export err=9
err_chk
fi
done
set -x

export VDATE=`${NDATE} +${fhr} ${PDY}${cyc}`
[[ -f flxfile ]] && rm flxfile ; [[ -f nemsfile ]] && rm nemsfile
if [ $OUTTYP -eq 4 ] ; then
Expand Down

0 comments on commit 207824d

Please sign in to comment.