#!/bin/csh -bf # # GetUNAVCOData # # This script automatically logs onto UNAVCO's computer # to get UNAVCO data for all havenot stations in GetLog. # # 2000/09/21 JL Svarc Modified from GetPangaData # Verify existence of SaveObsDate # ------------------------------- if (! -e SaveObsDate) then echo GetUNAVCOData: SaveObsDate not found. Script stops. echo " Run CreateObsDateFile first." exit 1 endif # Verify existence of GetLog # ------------------------------------ if (! -e GetLog) then echo GetUNAVCOData: 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 GetUNAVCOData: 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 "UNAVCO" data not found on the local archive # Exit if list is zero-length # -------------------------------------------------------- set stalist = `grep unavco 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/ps_out/$longyr/$doy > unavco.fil echo "prompt" >> unavco.fil echo "binary" >> unavco.fil @ i=1 while ($i <= $#stalist) echo get $stalist[$i]${doy}0.${yr}o.Z >> unavco.fil @ i=$i + 1 end # Retrieve files from UNAVCO archive # ---------------------------------- ftp.retrieve unavco.fil archive.unavco.ucar.edu # Uncompress files # ---------------- uncompress -f *.Z # Change CAST to CSTL # ------------------- mv cast${doy}0.${yr}o cstl${doy}0.${yr}o replace CAST CSTL cstl${doy}0.${yr}o # Change CEDA to CDDR # ------------------- mv ceda${doy}0.${yr}o cddr${doy}0.${yr}o replace CEDA CDDR cddr${doy}0.${yr}o # 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