#!/bin/ksh #---------------------------------------------------------------------------- # cur24hr.ksh 05/23/2006 Paul McKee #-script to run on martha from cron immediately following the inter-reg. # precip graphics script... make_1 at /home/rfcshare/rxmrg/scripts # #-copies the latest 24hr precip image from the appropriate date directory structure to # the "cur" directory. This provides a static location for referencing the latest 24hr # precip image in other applications (ie. kml, etc.) # #--------------------------------------------------------------------------- #The following needs to be base dir on martha for ../rfcshare/p_images_new #PRECIPDIR=`get_apps_defaults precip_dir` PRECIPDIR=/data/p_images_new echo $PRECIPDIR #typeset -Z3 monvar typeset -Z2 dayvar typeset -Z2 currmonth yrvar=$(date -u +%Y) print "yrvar = $yrvar" #monvar=$(date +%b) #monvar=May monvar=$(date -u +%m) #monvar=05 print "monvar = $monvar" dayvar=$(date -u +%d) print "dayvar = $dayvar" cd $PRECIPDIR/$yrvar/$yrvar$monvar/$yrvar$monvar$dayvar print $PRECIPDIR/$yrvar/$yrvar$monvar/$yrvar$monvar$dayvar #file format is usa1_YYYYMMDD_1_obs.gif print "...copying usa1_$yrvar$monvar$dayvar"_1_obs.gif "---> $PRECIPDIR/cur/usa_cur24hr.gif" cp -f "usa1_"$yrvar$monvar$dayvar"_1_obs.gif" $PRECIPDIR"/cur/usa_cur24hr.gif"