#!/bin/csh -bf # # CreateTPNML # # 1995/08/07 Created by W. Prescott and J. Svarc # # Modifications: # 1995/08/15 whp Eliminated Enhanced Polar Motion, # since it is already in qr_nml output. # # This script: # 1) Calls tp_nml to extract polar motion # # 2) then edits the EnhancedPolarMotionTemplate # inserting the observation date as the epoch time # # 3) Concatenates these. # Check for existence of date file # -------------------------------- if (! -e SaveObsDate) then echo " " echo "CreateTPNML: Could not find SaveObsDate" echo "Execute following command before calling this" echo "CreateObsDateFile yyyymmdd" exit 1 endif # Read variables from SaveObsDate # ------------------------------- # set dmym2 = `grep dmym3 SaveObsDate | awk '{print $2}'` set dmym2 = `grep dmym2 SaveObsDate | awk '{print $2}'` set dmyp1 = `grep dmyp1 SaveObsDate | awk '{print $2}'` set dmyobs = `grep dmyobs SaveObsDate | awk '{print $2}'` # Create TPNML file # ----------------- rm -f TPNML >& /dev/null tp_nml $dmym2 $dmyp1 > TPNML.temp1 # tp_nml 01-aug-1993 29-aug-1993 > TPNML.temp1 # Note: Enhanced polar motion is already in file produced by # qr_nml. We just need the output from tp_nml. # --------------------------------------------- cat /goa/local/templates/EnhancedPolarMotionTemplate > TPNML.temp2 sed 's/dd-mmm-yyyy/'$dmyobs'/' TPNML.temp2 > TPNML.temp3 cat TPNML.temp1 TPNML.temp3 > TPNML rm -f TPNML.temp* >& /dev/null