#!/bin/ksh USAGE="usage: $MEMBER" export vertime="2000-03-17 0640L" VERS="version:$USHutil/$MEMBER $vertime " #______________________________________________________________________________ # NAME : fncacafos # Author : Peter Henrichsen # Purpose : This script is the child of "runcacaf".This script has two # children scripts they are: # 1. The "cacafos.sh" script runs program cacafos to # make two AFOS maps, # 6KA, "DROUGHT/WET INDEX" and # 6KB, "CROP MOIST INDEX", # from the input file. # These AFOS maps are then sent using snd2forgn. # 2. The "afstoawp.sh" script runs program afstoawp # to convert the AFOS maps 6KA and 6KB into AWIPS Redbook # formatted maps: PYWS46 and PYWS47. # These AWIPS maps are then sent using snd2forgn. # # History : 98-04-21 Peter Henrichsen # : 98-09-18 Peter Henrichsen modify to change permissions on the # /com/foreign/prod/output/$PDY to 775. # : 1999-06-30 Peter Henrichsen modify to run on IMB ncosp # : 1999-12-02 Peter Henrichsen modify to use USHutil # : 2000-03-17 Peter Henrichsen modify to run under dnbnet. # # # Location : This script is found on hp36 as: # : /tmp_mnt/export/sgi73/peterhen/util/scripts/ibm/ # fncacafos # : & on ncosp as # : /nwprod/util/ush/fncacafos or # : /nfsuser/g01/wx12ph/util/ush/fncacafos # # #_______________________________________________________________________________ # print "$USAGE" print "$VERS" cd $DATA set -x # integer istat INCARDS=`basename ${INFILE}` export INCARDS cp $INFILE $DATA/$INCARDS # obtain a new unique process id (pid) msg="$MEMBER HAS STARTED!" postmsg "$jlogfile" "$msg" # ---------------------------------------------------------------- # 1st setup and run cacafos with $INFILE to make # afos pils: ${pilist} # ---------------------------------------------------------------- set +x echo " " echo "######################################" echo " MAKE AFOS MAPS ${pilist} " echo "######################################" echo " " set -x AFOSCAC=${NAME}.${PDY}.${job} member=cacafos.sh export member AFOSCAC $USHutil/$member $DATA/$INCARDS $AFOSCAC "${pilist}" set +x echo " " echo "######################################" echo " CONVERT AFOS MAPS ${pilist} INTO AWIPS" echo "######################################" echo " " set -x # ---------------------------------------------------------------- # 2nd setup and run afstoawp.sh to convert the afos maps # ${pilist} to awips redbook format. # ---------------------------------------------------------------- export member=afstoawp.sh $USHutil/$member $DATA/$AFOSCAC.$pid "${pilist}" read awiprc < $DATA/$jobid.awiprc if test $awiprc -eq '0' then msg="$pilist Converted to AWIPS!" else msg="ERROR $pilist NOT Converted to AWIPS!" postmsg "$jlogfile" "$msg" fi msg="$MEMBER HAS ENDED!" postmsg "$jlogfile" "$msg" outcom=$comout/foreign.$PDY chmod 775 $DATA/$pgmout mkdir -m 775 -p $outcom >/dev/null 2>&1 cp $DATA/$pgmout $outcom/$pgmout