#!/bin/csh -bf # # GetDixieData # # This script automatically logs onto Pasadena's Dixie computer # to get Parkfield continuous data for all havenot stations in GetLog. # # 2001/07/06 KJWendt Modified from GetPangaData # Verify existence of SaveObsDate # ------------------------------- if (! -e SaveObsDate) then echo GetDixieData: SaveObsDate not found. Script stops. echo " Run CreateObsDateFile first." exit 1 endif # Verify existence of GetLog # ------------------------------------ if (! -e GetLog) then echo GetDixieData: 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 GetDixieData: 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 "regional" data not found on the local archive # Exit if list is zero-length # ---------------------------------------------------------- set stalist = `grep dixie GetLog | grep havenot | awk '{print $1}'` if ($#stalist == 0) then echo GetDixieData: All dixie data already found. Script stops. exit endif # Set up command file to get rinex data from PANGA archive # -------------------------------------------------------- echo cd /pub/usgs1/rinex > dixie.fil echo "prompt" >> dixie.fil echo "binary" >> dixie.fil @ i=1 while ($i <= $#stalist) set stationname = `echo $stalist[$i] | tr '[a-z]' '[A-Z]'` echo get $stationname${doy}0.${yr}O.Z >> dixie.fil @ i=$i + 1 end # Retrieve files from Dixie # ------------------------- echo "Starting to ftp from Pasadena archive now...." ftp.retrieve dixie.fil 131.215.66.177 # Uncompress files # ---------------- uncompress -f *.Z # Change file names to lower case # ------------------------------ lcnames *O # Replace incorrect elements in rinex files # ----------------------------------------- replace " ASH701945_2 SCIS" " ASH701945B_M SCIS" *o replace " ASH701945B_M NONE" " ASH701945B_M SCIS" *o replace " ASH701945B_M SCIT" " ASH701945B_M SCIT" *o # Change CAND to CANP # ------------------- mv cand${doy}0.${yr}o canp${doy}0.${yr}o replace CAND CANP canp${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