#!/bin/sh # # Update the hurricane database # # TRM 1994-08-02 Root="/data1/WWW/Tropical/Bin" DataDir="/data1/WWW/Tropical/Data" MailRoot="/data1/WWW/Tropical/WXTropl" MailFile="/data1/WWW/Tropical/inmail" MailLockFile="/data1/WWW/Tropical/inmail.lock" TFile="/data1/WWW/Tropical/Data/tropical" SProbArchive="/data1/WWW/Tropical/StrikeProb/Archive" FileExt="WX" DaysToKeep=15 TempFile="${Root}/WXUpdate.WX.$$" RCP="/usr/ucb/rcp" DATE="/usr/bin/date" WXFile="${MailRoot}/"`date -u +%y%m%d`".${FileExt}" TempMailFile="${MailRoot}/"`date -u +%y%m%d`".${FileExt}.$$" year=`$DATE +%y` YEAR=`$DATE +%Y` BeforeSize=`cat $TFile | wc -l` # Most reliable site should go last #${Root}/urlhurr http://www.met.fsu.edu/Data/archive/weather/HURR/ | ${Root}/hurricane >> $TFile # Be very careful with the UCSD site. It stores old advisories in new files #${Root}/urlhurr http://meteora.ucsd.edu/climate/ | ${Root}/hurricane >> $TFile #${Root}/urlhurr http://www.npmoc.navy.mil/jtwc/warnings/ | ${Root}/hurricane >> $TFile # The unisys site is too slow #${Root}/urlhurr http://weather.unisys.com/hurricane/archive/ | ${Root}/hurricane >> $TFile #${Root}/urlhurr ftp://ftp.met.fsu.edu/pub/weather/tropical/WTNT2/ | ${Root}/hurricane >> $TFile #${Root}/urlhurr ftp://ftp.met.fsu.edu/pub/weather/tropical/WTPZ2/ | ${Root}/hurricane >> $TFile #${Root}/urlhurr ftp://ftp.met.fsu.edu/pub/weather/tropical/GuamStuff/ | ${Root}/hurricane >> $TFile ${Root}/urlhurr http://www.met.fsu.edu/ftp/weather/tropical/WTNT2/ | ${Root}/hurricane >> $TFile ${Root}/urlhurr http://www.met.fsu.edu/ftp/weather/tropical/WTPZ2/ | ${Root}/hurricane >> $TFile #${Root}/urlhurr http://www.met.fsu.edu/ftp/weather/tropical/GuamStuff/ | ${Root}/hurricane >> $TFile #${Root}/urlhurr http://asp1.sbs.ohio-state.edu:80/text/severe/tropadv/ | ${Root}/hurricane >> $TFile #${Root}/urlhurr http://asp1.sbs.ohio-state.edu:80/text/tropical/ | ${Root}/hurricane >> $TFile ${Root}/urlhurr http://asp1.sbs.ohio-state.edu:80/text/tropical/atlantic/ | ${Root}/hurricane >> $TFile ${Root}/urlhurr http://asp1.sbs.ohio-state.edu:80/text/tropical/pacific/ | ${Root}/hurricane >> $TFile ${Root}/urlhurr http://asp1.sbs.ohio-state.edu:80/text/tropical/indian/ | ${Root}/hurricane >> $TFile ${Root}/urlhurr http://asp1.sbs.ohio-state.edu:80/text/tropical/atlantic/advisories/ | ${Root}/hurricane >> $TFile ${Root}/urlhurr http://asp1.sbs.ohio-state.edu:80/text/tropical/atlantic/advisories/${YEAR}/ | ${Root}/hurricane >> $TFile ${Root}/urlhurr http://asp1.sbs.ohio-state.edu:80/text/tropical/pacific/advisories/ | ${Root}/hurricane >> $TFile ${Root}/urlhurr http://asp1.sbs.ohio-state.edu:80/text/tropical/indian/advisories/ | ${Root}/hurricane >> $TFile #${Root}/urlhurr http://asp1.sbs.ohio-state.edu:80/text/tropical/atlantic/discussions/ | ${Root}/hurricane >> $TFile #${Root}/urlhurr http://asp1.sbs.ohio-state.edu:80/text/tropical/pacific/discussions/ | ${Root}/hurricane >> $TFile #${Root}/urlhurr http://asp1.sbs.ohio-state.edu:80/text/tropical/indian/discussions/ | ${Root}/hurricane >> $TFile ${Root}/urlhurr http://weather.noaa.gov/pub/data/raw/wt/ | ${Root}/hurricane >> $TFile # Deal with incoming email #${Root}/mailhurr -delete | ${Root}/hurricane >> $TFile if [ -s $MailFile ]; then #echo "Trying to lock $MailLockFile" lockfile -l 1200 $MailLockFile #ls -l $MailLockFile mv $MailFile $TempMailFile rm -f $MailLockFile #echo "Done with $MailLockFile" #ls -l $TempMailFile $TFile ${Root}/hurricane $TempMailFile >> $TFile cat $TempMailFile >> $WXFile rm -f $TempMailFile #ls -l $TFile fi # Clean-up. Should not be necessary, but here for safety. rm -f ${MailRoot}/*.${FileExt}.* # Keep only the latest "DaysToKeep" *.Ext mail files: Count=0 for i in `ls -t ${MailRoot}/*.${FileExt}`; do Count=`expr $Count + 1` if [ $Count -gt $DaysToKeep ]; then rm -f $i fi done # Done with email AfterSize=`cat $TFile | wc -l` if [ $AfterSize -gt $BeforeSize ]; then ${Root}/NameCheck $TFile | ${Root}/remdup -SaveOldForecasts | ${Root}/sortropical > $TempFile if [ -s $TempFile ]; then mv $TempFile $TFile if [ -f $TempFile ]; then cp ${TFile}${year} $TFile else cp $TFile ${TFile}${year} fi else rm -f $TempFile fi fi ${Root}/CurrentStorms ${TFile} > ${Root}/current.storms ${Root}/CurrentStormsClip ${TFile} ${Root}/CurrentStormsWML ${TFile} /bin/cat /data1/WWW/Tropical/HTML/tropical.1 /data1/WWW/Tropical/Bin/current.storms /data1/WWW/Tropical/HTML/tropical.2 > /data1/WWW/Tropical/tropical.html if [ -s $TFile ]; then ${Root}/MakeMaps fi ${Root}/MakeArchiveHTML > /data1/WWW/Tropical/summary.html ${Root}/MakeGifArchiveHTML > /data1/WWW/Tropical/archive.html ${Root}/MakeForecastHTML > /data1/WWW/Tropical/forecast.html ${Root}/CheckForecasts -delete $DataDir >> ${DataDir}/forecasts${year} ${Root}/rmprobs & Last modified: Wed Jan 7 13:43:04 HST 2009