#!/bin/csh -bf # # gp.MergePointStacovs # # Create the stacov file from gipsy point positioning output. # W. H. Prescott # 1998 April 11 - Adapted from gp.CreateStacov # # Modifications: jls 19980922 Merge bias fixed stacov file with point # positions for Track network if they exist. # 1999/01/19 whp Fixed bug that put all stations into Track stacov # instead of just Track stations. # CHECK NUMBER OF ARGUMENTS # ------------------------- echo " " echo "gp.MergePointStacovs running---" if ($#argv != 1) then echo "Usage: gp.MergePointStacovs FileNameFile" echo "where" echo "FileNameFile is a file containing" echo " the name of the merged stacov file" exit 1 endif set FileNameFile = $1 set Date = `grep datelong SaveObsDate | awk '{print $2}'` set CampaignList = /attic/CampaignList mkdir StacovDir.$$ # Put stacovs in a subdirectory # ----------------------------- set SolPath = `ap so $Date` set Campaign_Name = `gp.CreateCampaignPrefix` if ($Campaign_Name == "Track") then foreach Sta (`grep ^Track\[^A-Za-z0-9\#_\] /attic/CampaignList | awk '{print $2}'`) cp $Sta.$Date.stacov.point StacovDir.$$ end else cp fix.stacov StacovDir.$$ # cp free_STACOV StacovDir.$$ if (-e $SolPath/Track.$Date.stacov.point.Z) then cp $SolPath/Track.$Date.stacov.point.Z StacovDir.$$ uncompress StacovDir.$$/Track.$Date.stacov.point.Z else if (-e $SolPath/Track.$Date.stacov.point) then cp $SolPath/Track.$Date.stacov.point StacovDir.$$ else echo "No Tracking stacov file was found for this date" echo "Run Track Campaign then rerun this data!!" endif endif # Construct stacov name, merge point stacovs into single file # ------------------------------------------------------------ set Prefix = `gp.CreateCampaignPrefix` set StacovName = $Prefix.$Date.stacov.point rm $StacovName >& /dev/null if ($Campaign_Name == "Track") then stamrg -i StacovDir.$$/*.$Date.stacov.point -o $StacovName grep -i antenna StacovDir.$$/[a-z]*stacov.point | sed 's/^.*://' >> $StacovName else stamrg -i StacovDir.$$/Track.$Date.stacov.point fix.stacov -o $StacovName # stamrg -i StacovDir.$$/Track.$Date.stacov.point free_STACOV -o $StacovName grep -i antenna StacovDir.$$/Track.$Date.stacov.point | sed 's/^.*://' >> $StacovName grep -i antenna StacovDir.$$/fix.stacov | sed 's/^.*://' >> $StacovName # grep -i antenna StacovDir.$$/free_STACOV | sed 's/^.*://' >> $StacovName endif echo $StacovName > $FileNameFile # echo " " # echo "-------------------------------------------------------------" exit