#! /bin/sh set -xa # # <<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>> # <<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>> # << FSL_raob.run >> # << >> # <<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>> # <<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>> # # This script is called with arguments # Arg 1: the MADIS Run directory # Arg 2: the 9-character DB time (YYDDDHHMM) # Arg 3: the current minute (MM) # # Imported variables # CDY - Current day (like PDY but not based on com/date) # ############################################################################### # ASSIGN THE ARGUMENTS ############################################################################### ATIME=$2 MIN=$3 YYDDD=`echo $ATIME | cut -c1-5` HH=`echo $ATIME | cut -c6-7` CDATEHH=${CDY:?}${HH:?} ############################################################################### # The raob processing schedule: # # For HH = 00, 03, ..., 21; run every 10 minutes from HH + 2 minutes, through # HH + 122 minutes; and process at HH + 12 hours + 2 minutes. # ############################################################################### mkdir -p $DATA/raob ${COMOUT}/raob/bufr cd ${DATA}/raob TWO=`echo $MIN | cut -c2` if [ $TWO -lt 7 ] then CYCLE=3 # 3h cycle YYDDDHH=`echo $ATIME | cut -c1-7` #remove the minutes HH=`echo $YYDDDHH | cut -c6-7` #current hour REMC=`expr \( $HH % $CYCLE \)` YYDDDHH=`${USHmadis}/prevhour $YYDDDHH $REMC` #current raob run HHC=`echo $YYDDDHH | cut -c6-7` #current raob hour D=`expr $HH - $HHC` if [ $D -ne 2 -o $MIN -lt 12 ] then BUFRDIR=${COMOUT}/raob/bufr HOUR=$CDATEHH export SKIP_002004=1 SKIP_002005=1 SKIP_002006=1 SKIP_002007=1 SKIP_002008=1 export SKIP_002009=1 SKIP_002010=1 SKIP_002011=1 SKIP_002012=1 SKIP_002013=1 export SKIP_002014=1 SKIP_002015=1 SKIP_002016=1 export DTIM_earliest_vsndn=-7.0 export DTIM_latest_vsndn=0.5 HOUR=$CDATEHH RAD=2 DGRP="vsndn" ${DUMPJB:?} $HOUR $RAD $DGRP export err=$? if [[ $err -ne 11 && $err -ne 0 && $err -ne 22 ]] then err_chk fi mv ${DATA}/vsndn.ibm ${BUFRDIR}/${YYDDDHH}00.bufr_d if [ "$SENDDBN" = 'YES' ] ; then export DBNALERT_TYPE=${DBNALERT_TYPE:-DATA} $SIPHONROOT/bin/dbn_alert $DBNALERT_TYPE MADIS_DUMP $job ${BUFRDIR}/${YYDDDHH}00.bufr_d fi elif [ $HH -eq $HHC -a $MIN -lt 12 ]; then # WCOSS2 transition note # It seems this section was intended to do an extra 12-hr delayed dump every 3 hrs # from 0002 thru 2102, but: # 1) this section is unreachable. (perhaps it should be a new if rather than elif). # 2) if it was reached, HOUR on IBM-p1 and Dell-p3 was set to current time rather # than 12 hours ago. # Both left as they were on Dell-p3 for consistency as part of transition to WCOSS2. YYDDDHH12=`${USHmadis}/prevhour $YYDDDHH 12` #12-h old raob run BUFRDIR=${COMOUT}/raob/bufr HOUR=$CDATEHH export SKIP_002004=1 SKIP_002005=1 SKIP_002006=1 SKIP_002007=1 SKIP_002008=1 export SKIP_002009=1 SKIP_002010=1 SKIP_002011=1 SKIP_002012=1 SKIP_002013=1 export SKIP_002014=1 SKIP_002015=1 SKIP_002016=1 export DTIM_earliest_vsndn=-7.0 export DTIM_latest_vsndn=0.5 HOUR=$CDATEHH RAD=2 DGRP="vsndn" ${DUMPJB:?} $HOUR $RAD $DGRP export err=$? if [[ $err -ne 11 && $err -ne 0 && $err -ne 22 ]] then err_chk fi mv ${DATA}/vsndn.ibm ${BUFRDIR}/${YYDDDHH}00.bufr_d if [ "$SENDDBN" = 'YES' ] ; then export DBNALERT_TYPE=${DBNALERT_TYPE:-DATA} $SIPHONROOT/bin/dbn_alert $DBNALERT_TYPE MADIS_DUMP $job ${BUFRDIR}/${YYDDDHH}00.bufr_d fi fi fi