#! /bin/csh -f

set start_time = `date +%s`
#source /aca1/nb965428/.cshrc

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

#cd /aca1/nb965428/wrf2gem/mesonet/climate

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 SIFKIL QNASTO QNCORO QNMASP QNSOZO \
                 QNLICI QNTLCC QNDKIL QNHBEA MHALPH MHCHEL MHMHIL MHLSQR BKMAPL BKBROW BKNYRD BXVNST T090M2440 T090M2617 T090M2862 \
                 T090M4232 T090M4305 T090M4324 T090M4362 T090M4449 T090M4554 T090M4678 T090M4945 T190M0005)

cp ../meta/$station.txt station.ascii
ncl getclimate.ncl
convert $station.png -gravity North -chop 0x100 temp.png
convert -shave 150x60 temp.png $station.png
end

#cp *.png /home/nb965428/public_html/climate

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