#!/bin/csh -bf # # GetPangaData # # This script automatically logs onto CWU's computer # to get PANGA data for all havenot stations in GetLog. # # 1999/01/20 JL Svarc Modified from GetRegionalData # Verify existence of SaveObsDate # ------------------------------- if (! -e SaveObsDate) then echo GetPangaData: SaveObsDate not found. Script stops. echo " Run CreateObsDateFile first." exit 1 endif # Verify existence of GetLog # ------------------------------------ if (! -e GetLog) then echo GetPangaData: File GetLog not found. Script stops. echo " Run CreateGetLog first." exit 1 endif # Verify existence of NameTrans # -------------------------------- if (! -e /goa/sta_info/NameTrans) then echo GetPangaData: File /goa/sta_info/NameTrans not found. Script stops. exit 1 endif # Set date strings # ---------------- set yr = `grep yrobs SaveObsDate | awk '{print $2}'` set longyr = `grep longyr SaveObsDate | awk '{print $2}'` set doy = `grep doy SaveObsDate | awk '{print $2}'` set datejpl = `grep datejpl SaveObsDate | awk '{print $2}'` # Get list of "panga" data not found on the local archive # Exit if list is zero-length # ---------------------------------------------------------- set stalist = `grep panga GetLog | grep havenot | awk '{print $1}'` if ($#stalist == 0) then exit endif # Set up command file to get rinex data from PANGA archive # -------------------------------------------------------- echo cd pub/rinex/$longyr/$doy > panga.fil echo "prompt" >> panga.fil echo "binary" >> panga.fil @ i=1 while ($i <= $#stalist) echo get $stalist[$i]${doy}0.${yr}o.Z >> panga.fil @ i=$i + 1 end # Retrieve files from PANGA # ------------------------- ftp.retrieve panga.fil panga.cwu.edu # Uncompress files # ---------------- uncompress -f *.Z # Change file names to JPL form. # ------------------------------ GetData.stnd2jpl # Change to canonical station names, if necessary. # In GetLog, change havenot to have for canonical names and all alternates. # ------------------------------------------------------------------------- GetData.ChangeNames # Clean up and copy regional rinex files to /attic # ------------------------------------------------ set current_campaign = `cat CampaignsToInclude` if ($current_campaign != "Track") then mkdir rinex @ i=1 while ($i <= $#stalist) cp $datejpl$stalist[$i]____??.rnx rinex @ i=$i + 1 end compress -f rinex/* echo Y | DataToAttic.pl rm -r rinex endif