#!/bin/csh -bf # # gp.save # # Store processing results. # N.E. King # April 1994 # # Modifications: # April 1995 Modified to run GIPSY R3 on swave, and save results on /attic. # 1995/10/17 whp Adapted from bard script to gp.save # Changed some of calls and added # DataList updating. # 1995/11/02 whp Moved stacov manipulation to gp.results # 1996/02/07 whp Cleaned up compressing of postfit.nio and stacov # 1997/01/15 jls Check to see if solution is final or preliminary # If it is preliminary do not save the *.eci file. # 1997/10/29 jls Save copy of ambigon.out as ambigon_out in local # directory. # 1997/11/25 kjw Modified to save the preliminary *.eci file. # 1998/02/18 whp Save PRN_GPS in intermediate. # 1998/04/11 whp Adapted to handle point position cases # 1998/05/27 kjw Saved a copy of CampaignsToInclude and ProcessFlags # in the local directory for reruns. # Check number of arguments # ------------------------- echo " " if ($#argv != 0) then echo Usage: gp.save exit 1 endif # Set some parameters # ------------------- set Point = `grep PointPosition ProcessFlags | awk '{print $2}'` set Date = `grep datelong SaveObsDate | awk '{print $2}'` set orbit = `grep OrbitType ProcessFlags | awk '{print $2}'` set yyyy = `grep longyr SaveObsDate | awk '{print $2}'` set yy = `grep yrobs SaveObsDate | awk '{print $2}'` set mm = `grep moobs SaveObsDate | awk '{print $2}'` set dd = `grep dayobs SaveObsDate | awk '{print $2}'` set ymdobs = `grep ymdobs SaveObsDate | awk '{print $2}'` set SolutionList = "/attic/SolutionList" set StaSolutionList = "/attic/StaSolutionList" set Prefix = `gp.CreateCampaignPrefix` set solnpath = `ap so $Date` set intpath = `ap in $Date` # Handle ProcessFlags, CampaignsToInclude # --------------------------------------- cp CampaignsToInclude CampaignsToInclude.KeepHere cp ProcessFlags ProcessFlags.KeepHere gp.rename $Prefix ProcessFlags gp.rename $Prefix CampaignsToInclude mv $Prefix.ProcessFlags $intpath mv $Prefix.CampaignsToInclude $intpath mv CampaignsToInclude.KeepHere CampaignsToInclude mv ProcessFlags.KeepHere ProcessFlags # Handle stacov files # ------------------- if ($Point == "yes") then set StacovName = $Prefix.$Date.stacov.point cp $StacovName $solnpath else set StacovName = $Prefix.$Date.stacov.fixed cp $StacovName $solnpath endif compress -f $solnpath/$StacovName echo $StacovName >> $SolutionList echo $StacovName > $$.TempName UpdateStaSolList.pl $$.TempName rm -f $$.TempName # echo " " # echo "-------------------------------------------------------------" exit