<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#! /bin/csh -f

set start_time = `date +%s`
source ~/.cshrc

set mi = `date -u +%M`
set hh = 05
set mm = `date -u +%m`
set dd = `date -u +%d`
set yy = `date -u +%y`
echo The Current Date Is $yy$mm$dd
set date = $yy$mm$dd

cd /network/rit/lab/mesonet/mesonet/recent
rm week.csv snowweek.csv *dat
scp nbassill@operations.nysmesonet.org:/home/nbassill/data/makeweek/week.csv .
scp nbassill@operations.nysmesonet.org:/home/nbassill/data/recentsnow/snowweek.csv .


set end_time   = `date  +%s`
@ length_time  = $end_time - $start_time
echo "It took this long to run download data: $length_time seconds"

rm *data
rm MRMS*html
cp /network/rit/lab/mesonet/mesonet/locations.html MRMS1dlocations.html
cp /network/rit/lab/mesonet/mesonet/locations.html MRMS2dlocations.html
cp /network/rit/lab/mesonet/mesonet/locations.html MRMS3dlocations.html

foreach station (SCHU WHIT WATE CSQR SPRA COLD JORD WEST BERK BELD ESSX CHES STEP OTIS LAUR GABR COBL TICO WFMB \
                 COPE BATA SBRI SHER DELE WOLC JOHN LOUI TULL WARW WALT CINC FRED BRAN WELL CAPE BELL WARS BELM \
                 COHO BURD TYRO PENN CLYM RAND OLEA BURT BROC SCHA REDF HARR OSCE WALL MORR CAMD ELMI PHIL POTS \
                 OSWE CHAZ SARA RUSH TUPP CLIF FAYE EDIN MEDI GROV OWEG NBRA DUAN ILAK OPPE REDH COPA ANDE HARP \
                 BROO EAUR YORK HART HERK ADDI SPRI MALO VOOR HAMM EDWA SUFF BSPA BEAC DEPO MEDU ROXB ELDR GFLD \
                 WGAT ELLE KIND WBOU OLDF NHUD SCIP BING NEWC CLAR ONTA CROG RAQU WANT SOUT HFAL DOVE GROT SCHO \
                 TANN SOME BUFF GFAL PISE BREW QUEE STAT BKLN MANH BRON STON)

grep -w $station week.csv &gt;! ${station}data
grep -w $station snowweek.csv &gt;! ${station}snowdata

cp /network/rit/lab/mesonet/mesonet/meta/$station.txt $station.ascii

end

ncl recent.ncl

set end_time   = `date  +%s`
@ length_time  = $end_time - $start_time
echo $length_time $date$hh$mi &gt;&gt; time
set mm = `date -u -d -${length_time}seconds +%m`
set dd = `date -u -d -${length_time}seconds +%d`
set yy = `date -u -d -${length_time}seconds +%y`

# make images
rm *png
foreach map (hi wc maxt mint maxdp gust precip minp maxp snow)
foreach day (1 2 3 5 7)

ncl ${map}${day}.ncl
convert -shave 232x362 plot.png ${map}${day}.png
end

end
ncl ratio1.ncl
convert -shave 232x362 plot.png ratio1.png
rm plot.png
scp *.png nbassill@operations.nysmesonet.org:/home/nbassill/public_html/plots/live

scp *png nbassill@operations.nysmesonet.org:/home/nbassill/public_html/archive/20$yy/$mm/$dd/recent
scp *ncl *csh nbassill@operations.nysmesonet.org:/home/nbassill/public_html/archive/20$yy/$mm/$dd/recent/scripts
cp *.dat ../dhses/daily
#cp *ncl* $date
#mv *.png $date

set mm = `date -u +%m`
set dd = `date -u +%d`
set yy = `date -u +%y`
sleep 15m
rm MRMS_MultiSensor_QPE_*
wget "http://mrms.ncep.noaa.gov/data/2D/MultiSensor_QPE_72H_Pass1/MRMS_MultiSensor_QPE_72H_Pass1_00.00_20${yy}${mm}${dd}-050000.grib2.gz"
wget "http://mrms.ncep.noaa.gov/data/2D/MultiSensor_QPE_48H_Pass1/MRMS_MultiSensor_QPE_48H_Pass1_00.00_20${yy}${mm}${dd}-050000.grib2.gz"
wget "http://mrms.ncep.noaa.gov/data/2D/MultiSensor_QPE_24H_Pass1/MRMS_MultiSensor_QPE_24H_Pass1_00.00_20${yy}${mm}${dd}-050000.grib2.gz"
gunzip MRMS_MultiSensor_QPE_24H_Pass1_00.00_20${yy}${mm}${dd}-050000.grib2.gz
gunzip MRMS_MultiSensor_QPE_48H_Pass1_00.00_20${yy}${mm}${dd}-050000.grib2.gz
gunzip MRMS_MultiSensor_QPE_72H_Pass1_00.00_20${yy}${mm}${dd}-050000.grib2.gz
mv MRMS_MultiSensor_QPE_72H_Pass1_00.00_20${yy}${mm}${dd}-050000.grib2 MRMS_GaugeCorr_QPE_72H_latest.grib2
mv MRMS_MultiSensor_QPE_48H_Pass1_00.00_20${yy}${mm}${dd}-050000.grib2 MRMS_GaugeCorr_QPE_48H_latest.grib2
mv MRMS_MultiSensor_QPE_24H_Pass1_00.00_20${yy}${mm}${dd}-050000.grib2 MRMS_GaugeCorr_QPE_24H_latest.grib2

foreach map (verification)
foreach day (1 2 3)

ncl ${map}${day}.ncl
convert -shave 465x725 plot.png MRMS${day}.png
convert MRMS${day}.png ../logo/filledmaplogo.png -geometry +50+50 -composite MRMS${day}.png
pngquant MRMS${day}.png
mv MRMS${day}-fs8.png MRMS${day}.png
end
end
rm plot.png
scp MRMS*.png nbassill@operations.nysmesonet.org:/home/nbassill/public_html/plots/live
scp MRMS*html nbassill@operations.nysmesonet.org:/home/nbassill/public_html/settings

scp MRMS*.png nbassill@operations.nysmesonet.org:/home/nbassill/public_html/archive/20$yy/$mm/$dd/MRMS

set end_time   = `date  +%s`
@ length_time  = $end_time - $start_time
echo "It took this long to run getrecent.csh: $length_time seconds"



</pre></body></html>