#!/bin/csh

cd /archive/garner/campaigns/norcal2004/raw/2004
foreach day ( 245 246 247 251 252 253 254 257 258 260 261 264 )
 mkdir /archive/garner/campaigns/norcal2004/rinex/obs/2004/${day}
 mkdir /archive/garner/campaigns/norcal2004/rinex/nav/2004/${day}
 cd $day
 foreach file (*.DAT)
  dbRinexGeodeticOccupation.pl -v -f $file -campaign_code NORCAL2004
  compress *04o *04n
  mv *04o.Z /archive/garner/campaigns/norcal2004/rinex/obs/2004/${day}/
  mv *04n.Z /archive/garner/campaigns/norcal2004/rinex/nav/2004/${day}/
 end
 cd ..
end
