set -xa ##################################################### # The following variable could be defined in the # loadleveler submission script (the sms script), if # not it will take the default values which is set # for the NCO running enviroment ##################################################### export SENDSMS=${SENDSMS:-YES} if [ $SENDSMS = YES ] then $SMSBIN/smsinit $LOADL_STEP_ID fi min=`date -u +%M` jid=`echo $LOADL_STEP_OUT | cut -f2 -d.` COM_OUTPUT_ROOT=${COM_OUTPUT_ROOT:-/com/output/${w2run}/today} mv $LOADL_STEP_OUT $COM_OUTPUT_ROOT/${job}.${jid} ########################### # Specify NET and RUN Name ########################### export NET=${NET:-ingest} export RUN=${RUN:-goes_radsnd} if [ $envir = "prod" ] then export SENDDBN=${SENDDBN:-YES} export SENDDBN_GB2=${SENDDBN_GB2:-YES} export jlogfile=${jlogfile:-/com/logs/jlogfile} export DCOMROOT=${DCOMROOT:-/dcom} export USERDIR=${USERDIR:-${DCOMROOT}/us007003/ingest_hist} export TANKDIR=${TANKDIR:-${DCOMROOT}/us007003} export OUTDIR=${OUTDIR:-${DCOMROOT}/us007003} export TABLEDIR=${TABLEDIR:-/nwprod/fix} else export SENDDBN=${SENDDBN:-NO} export SENDDBN_GB2=${SENDDBN_GB2:-NO} export jlogfile=${jlogfile:-/com/logs/${envir}/jlogfile} export DCOMROOT=/dcom export USERDIR=${USERDIR:-${DCOMROOT}/us007003/${envir}/ingest_hist} export TANKDIR=${TANKDIR:-${DCOMROOT}/us007003/${envir}} export OUTDIR=${OUTDIR:-${DCOMROOT}/us007003/${envir}} export TABLEDIR=${TABLEDIR:-/nw${envir}/fix} fi ################################# # SET SHELL PROCESSING VARIABLES ################################# export PS4='$SECONDS + ' date ######################################################### # obtain unique process id (pid) and make temp directory ######################################################### export pid=$$ export DATA_IN=${DATA_IN:-/tmpnwprd} export DATA=${DATA:-$DATA_IN/igoes_radsnd.${pid}} rm -r -f $DATA mkdir -p $DATA cd $DATA ################### # File To Log Msgs ################### export jlogfile=${jlogfile:-/com/logs/jlogfile} ###################################### # Determine Job Output Name on System ###################################### export outid="LL$job" [ $envir != prod ] && export outid="LL${job}_${envir}" export jobid="${outid}.o${pid}" export pgmout="OUTPUT.${pid}" ############################################################### # SENDCOM=YES--Copy output file to /com # SENDSMS=YES--Allow to talk back to SMS # SENDDBN=YES--Alert output file to TOC, set to NO for testing # SENDBB=YES --Allow to talk back to Big Brother # GET_IOPROFILE - Run I/O statistics ############################################################### export SENDCOM=${SENDCOM:-YES} export SENDSMS=${SENDSMS:-YES} export SENDDBN=${SENDDBN:-YES} # need to set to NO for testing only export SENDBB=${SENDBB:-YES} export GET_IOPROFILE=${GET_IOPROFILE:-NO} export HOMEingest=${HOMEingest:-/nw${envir}} export FIXingest=${FIXingest:-$HOMEingest/fix} export SCRIPTSingest=${SCRIPTSingest:-$HOMEingest/scripts} ########################## # Specify Execution Areas ########################## export HOMEbufr=${HOMEbufr:-/nwprod} export EXECbufr=${EXECbufr:-${HOMEbufr}/exec} export FIXbufr=${FIXbufr:-${HOMEbufr}/fix} export PARMbufr=${PARMbufr:-${HOMEbufr}/parm} export USHbufr=${USHbufr:-${HOMEbufr}/ush} export DATATYPE=${DATATYPE:-GOES_RADSND} export USERDIR=${USERDIR:-${DCOMROOT}/us007003/ingest_hist} export TANKDIR=${TANKDIR:-${DCOMROOT}/us007003} export OUTDIR=${OUTDIR:-${DCOMROOT}/us007003} export TABLEDIR=${TABLEDIR:-/nwprod/fix} ####################### # Set up the UTILITIES ####################### export ushscript=${ushscript:-/nwprod/ush} export utilscript=${utilscript:-/nwprod/util/ush} export utilparm=${utilparm:-/nwprod/util/parm} export utilexec=${utilexec:-/nwprod/util/exec} ################################################################ # Run setup to initialize working directory and utility scripts ################################################################ sh $utilscript/setup.sh #################################### # Set-up ingest processing families #################################### export MACHINE=${MACHINE:-satepsdist1e.nesdis.noaa.gov} export FTYPE=${FTYPE:-bufr} export HISTLENMIN=${HISTLENMIN:-3900} export HISTLENMAX=${HISTLENMAX:-4200} export ndayarch=${ndayarch:-4} export DELAFTPROC=${DELAFTPROC:-NO} export TANKPROTECT=${TANKPROTECT:-NO} export DEBUGSCRIPTS=${DEBUGSCRIPTS:-ON} export HOURS2ALARM=${HOURS2ALARM:-6} export log=${log:-$OUTDIR/tranjb_ingest_goes_radsnd.out} # This script is generalized to allow the order for processing to be # determined by the cycle time. # # When this job runs at 24 or 25 min past the hour: # Only attempt 1 unsuccessful file query and file get from the remote machine # before giving up (otherwise use the default of 2 unsuccessful attempts # before giving up). # Do not transfer and process any new files for a particular file family if # more than 8 new files are present on the remote machine for this file # family (otherwise use the default of 999 new files in a family). # Only process families 1X1CLD 1X1SND LGYCLD (in this order) since the RAP # (previously RUC) does not use data from the IMGR family (otherwise process # families 1X1SND 1X1CLD LGYCLD IMGR, in this order). # This job must finish in time for the RAP (previously RUC) dump which begins # at 26 min past the hour. # ----------------------------------------------------------------------------- if [ $min -eq 24 -o $min -eq 25 ]; then export ITRIES_MAX_QUERY=${ITRIES_MAX_QUERY:-1} export ITRIES_MAX_GET=${ITRIES_MAX_GET:-1} export IFILES_MAX_GET=${IFILES_MAX_GET:-8} PROCESSING_FAMILIES=${PROCESSING_FAMILIES:-"1X1CLD 1X1SND LGYCLD"} else export ITRIES_MAX_QUERY=${ITRIES_MAX_QUERY:-2} export ITRIES_MAX_GET=${ITRIES_MAX_GET:-2} export IFILES_MAX_GET=${IFILES_MAX_GET:-999} PROCESSING_FAMILIES=${PROCESSING_FAMILIES:-"1X1SND 1X1CLD LGYCLD IMGR"} fi set $PROCESSING_FAMILIES export ngroup=$# n=0 for dtyp do n=`expr $n + 1` if [ "$dtyp" = '1X1SND' ]; then # The 1x1 FOV (SFOV) GOES Sounding Family (1X1SND) (GOES-E and -W satellites) # --------------------------------------------------------------------------- eval ORBITLIST${n}=\${ORBITLIST${n}:-satsound1x1.hrlylist} eval REMOTEDSNGRP${n}=\${REMOTEDSNGRP${n}:-'"concatenate_families \ /retcld/ret1/satsnd.goesW.D??????????.T????Z.1B1 \ /retcld/ret1/satsnd.goesE.D??????????.T????Z.1B1"'} eval TANKFILE${n}=\${TANKFILE${n}:-b003/xx003} eval EXECUTE${n}=\${EXECUTE${n}:-bufr_transsnd} eval BUFRTABLE${n}=\${BUFRTABLE${n}:-bufrtab.003} eval FORGNTABLE${n}=\${FORGNTABLE${n}:-bufr_goes.sounding_1x1.bufrtable} eval UNCOMPRESS_UNIX${n}=\${UNCOMPRESS_UNIX${n}:-NO} eval CRITICAL${n}=\${CRITICAL${n}:-YES} elif [ "$dtyp" = '1X1CLD' ]; then # The 1x1 FOV (SFOV) GOES Cloud Family (1X1CLD) (GOES-E and -W satellites) # ------------------------------------------------------------------------ eval ORBITLIST${n}=\${ORBITLIST${n}:-goescld.hrlylist} eval REMOTEDSNGRP${n}=\${REMOTEDSNGRP${n}:-'"concatenate_families \ /retcld/cld/goesW.RMD.D?????.T????.Z \ /retcld/cld/goesE.RMD.D?????.T????.Z"'} # new science cloud ########## /awips/dpisdev/goesW.RMD.D?????.T????Z.Z \ ########## /awips/dpisdev/goesE.RMD.D?????.T????Z.Z"'} # old science cloud eval TANKFILE${n}=\${TANKFILE${n}:-b003/xx002} eval EXECUTE${n}=\${EXECUTE${n}:-bufr_trangoescld} eval BUFRTABLE${n}=\${BUFRTABLE${n}:-bufrtab.003} eval FORGNTABLE${n}=\${FORGNTABLE${n}:-bufr_goes.cloud.bufrtable} # File is unix-compressed on remote machine eval UNCOMPRESS_UNIX${n}=\${UNCOMPRESS_UNIX${n}:-YES} eval CRITICAL${n}=\${CRITICAL${n}:-YES} elif [ "$dtyp" = 'IMGR' ]; then # The 11x17 FOV GOES Imager Radiance Family (Gaussian form) (IMGR) # {GOES-15 (W) and -13 (E) satellites} #----------------------------------------------------------------- eval ORBITLIST${n}=\${ORBITLIST${n}:-goesimg.hrlylist} eval REMOTEDSNGRP${n}=\${REMOTEDSNGRP${n}:-'"concatenate_families \ /csbt/bufr/gicsbt.???????.????.goes15NB \ /csbt/bufr/gicsbt.???????.????.goes13NB"'} eval TANKFILE${n}=\${TANKFILE${n}:-b021/xx041} eval EXECUTE${n}=\${EXECUTE${n}:-bufr_tranimgr} eval BUFRTABLE${n}=\${BUFRTABLE${n}:-bufrtab.021} eval FORGNTABLE${n}=\${FORGNTABLE${n}:-bufr_goes.imgrdn.bufrtable} eval UNCOMPRESS_UNIX${n}=\${UNCOMPRESS_UNIX${n}:-NO} eval CRITICAL${n}=\${CRITICAL${n}:-NO} elif [ "$dtyp" = 'LGYCLD' ]; then # The 1x1 FOV (SFOV) GOES Cloud Family from NASA/LANGLEY (LGYCLD) # {GOES-13 (E) and -15 (W) satellites} # --------------------------------------------------------------- eval MACHINE${n}=\${MACHINE${n}:-integrity.larc.nasa.gov} LGYCLD_MACHINE_CHECK=${LGYCLD_MACHINE_CHECK:-YES} if [ $LGYCLD_MACHINE_CHECK = 'YES' ]; then #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # If machine is set to primary LaRC server "integrity", check to see if it is # up and contains data files - if it is, then pull files from it - otherwise, # attempt to pull files from backup LaRC server "typhoon" eval machine=\$MACHINE${n} if [ $machine = integrity.larc.nasa.gov ]; then rm $DATA/ftp_temp_machine.output$$ ftp -vi $machine <