#! /bin/ksh # ** saveaday.scr ** Just make a yyddd subdir and copy dated gif files there. # (on cimss, in home2/www/goes/realtime/face/arc) # Update: # 25jun2002 -gsw- vers for Florida-area CRYSTAL experiment. # 07jun2002 -gsw- incl gsaih*.gif files to the copy. # 07jun2002 -gsw- add upihg11arc.scr (build list files for G11 gifs). # 06may2002 -gsw- add upihdpiarc.scr (build gif list text files to animate). # 28jan2002 -gsw- for IHOP, run for YDA at 02z tda. # 27sep2001 -gsw- actually no need at the moment for using yda. # 26sep2001 -gsw- make automatic (either yda(default) or entered day). #----- # Set the path. (setPATH/setMCPATH.scr by JPN) #----- ####export PATH=`setPATH.scr` #----- # Set up MCPATH. #----- ####export MCPATH=`setMCPATH.scr` command=$0 #----- # Display script name as well as time and date at the beginning of the script. #----- echo echo "**********************************************************************" echo echo " ** $command began at ..." echo echo " ** `date -u +\"%T UT on %a %d %b %Y {%j}\"` **" echo # -- If date is entered, use it (yyddd); otherwise, determine yesterday to use # as the default. (Transfers are only to be done after all of a day's # processing would be complete.) if [ -z "$1" ] then let yyyyddd=`date -u +%Y%j` # current system date # -- Determine date for YESTERDAY (with assumed default of today). # Only tricks are: 31 Dec from 1 Jan and # back to a leap year-or-not (after a 4-divisible yr). if [ yyyyddd%1000 -eq 1 ] then if [ yyyyddd%4 -eq 1 ] then let lastday=366 else let lastday=365 fi let lastyr=ccyyddd/1000-1 let lastyrx3=lastyr*1000 let yyyyyda=lastyrx3+lastday else let yyyyyda=yyyyddd-1 fi # -- Make sure yyddd variable, for YESTERDAY, is at least 5 digits wide. let yyyda=yyyyyda%100000 # -- ... switching date name back to just the one yyddd (from yyyda). cmd="yyddd=\`/home/www/bin/fullnumber.scr $yyyda 5\`" ; eval $cmd echo "($command) Note: using default date (ie, yesterday) of $yyddd" else yyddd=$1 cmd="yyddd=\`/home/www/bin/fullnumber.scr $yyddd 5\`" ; eval $cmd echo "($command) Note: using entered date of $yyddd" fi echo cd /home2/www/goes/realtime/face/arc mkdir $yyddd # -- copy files from realtime dir to new subdir. cd $yyddd cp ../../fc*$yyddd*.gif . #####cp ../../gsaih*$yyddd*.gif . # -- build text file of PW,LI,vis gifs for animating from this day (24 hrs). ../../upfcdpiarc.scr $yyddd pwd > whatran ls -l >> whatran echo " `date -u +\"%T UT on %a %d %b %Y {%j}\"`" >> whatran echo "list out what has been copied... " echo cat whatran echo echo "**********************************************************************" echo echo " ** $command ended at ..." echo echo " ** `date -u +\"%T UT on %a %d %b %Y {%j}\"` **" echo exit 0