#! /bin/csh # process - C Shell script to remove processed OASIS data # and reprocess it all # set oasis = /oasis set cfg = $oasis/cfg set bin = $oasis/bin set tmp = /oasis/tmp set TRUE = 1 set FALSE = 0 set doM1 = $FALSE set doM2 = $FALSE set nonomatch @ i = 1 while ($i <= $#argv ) if ( ($argv[$i] == "m1") || ($argv[$i] == "M1") ) then set doM1 = $TRUE endif if ( ($argv[$i] == "m2") || ($argv[$i] == "M2") ) then set doM2 = $TRUE endif @ i++ end if ($doM1 == $TRUE) then set mooring = m1 cd $oasis/$mooring foreach name (adcp ctd fluor gf gps metsys oasis pco2 shutter0 specprr specprr.volts tstring isus abeta cbeta hs2 hr1 hr2 hr3 hr4) rm -f data/$name $tmp/$name.tmp cp $cfg/$mooring/$name.hdr data/$name foreach year (2000 2001) foreach file ($name/$year*) awk -f $bin/concat.awk -v year=$year $file >> $tmp/$name.tmp end sort $tmp/$name.tmp >> data/$name rm -f $tmp/$name.tmp end end cd $oasis/$mooring/data awk -f $bin/ctdmean.awk ctd > ctd.mean endif # Take everything but the comments and append it to the header #foreach name (nitrate) #rm -f data/$name #cp $cfg/$mooring/$name.hdr data/$name #foreach file ($name/2000* $name/2001*) #grep -v \# $file >> data/$name #end #end if ($doM2 == $TRUE) then set mooring = m2 cd $oasis/$mooring foreach name ( fluor gf gps hs2 metsys oasis shutter0 specprr specprr.volts pco2 adcp ctd tstring isus) rm -f data/$name $tmp/$name.tmp cp $cfg/$mooring/$name.hdr data/$name foreach year (2000 2001) foreach file ($name/$year*) awk -f $bin/concat.awk -v year=$year $file >> $tmp/$name.tmp end sort $tmp/$name.tmp >> data/$name rm -f $tmp/$name.tmp end end cd $oasis/$mooring/data awk -f $bin/ctdmean.awk ctd > ctd.mean endif #foreach mooring (m1 m2) # cd $oasis/$mooring/data # awk -f $bin/ctdmean.awk ctd > ctd.mean #end