Processing GPS Upto_01

   source gdp2001.env

The "p" stands for postprocessing of gipsy PPP results.
 

1. Getting the data

First, on grotte:
We see that ref.stacov does not contain the ASKE AVIL etc. Ashtech aliases.
In 99sep*.stacov most of them are there. Here is a dirty method, that will not
keep a uniform epoch for positions (I never care for absolute positions anyway).

Therefore
    stamrg -i ref.stacov 99sep*.stacov -o ref1.stacov

I added the last years, 00*.stacov and 01*.stacov, in a similar way:
    stamrg -i ref1.stacov 00j*.stacov -o ref2.stacov
    stamrg -i ref2.stacov 00d*.stacov -o ref3.stacov
    stamrg -i ref3.stacov 01j*.stacov 01m*.stacov -o ref4.stacov

Then was time to run statistics on all files
    statistics -r ref4.stacov -i 9*.stacov 0*.stacov -gds

Better data (time series mad by Jan) was on finn
/gpsdata/GIPSY/PPP_results/2001_itrf00
/gpsdata/GIPSY/PPP_results/$year_itrf00
SITE.rad SITE.lon SITE.lat

cd `SD 01`/..
collect_many_NEV `ls -d ITRF_9* ITRF_0*`
The reference file was in
asmund:/gps0/gipsy/BIFROST/RESULTS/all_itrf00.*
 

2. Reduced time series and Least-squares

cd ~/gps
rm -f $DDIR/*.gd.ep

# choose:
set showplot=
# or
unset showplot

foreach site ( `the-sites-of SWEPOS FINNNET IGSU` )
source analyze-site.env
end

where analyze-site.env is
if ( ! -r $DDIR/${site}.gd.ep ) then
   cd ~/gps
   gd2ren-0mp $site
endif
cd ~/tap
urtap-ss $site R E N
cd ~/gps
gdplot-ts $site
if ( ${?showplot} == 1 ) then
   ogv $DDIR/PS/${site}-gd-ts.ps
endif
Antenna reference jump
All SWEPOS sites (not: ONSA, SAAR) had their antenna reference point changed to
the bottom of the preamp, which is 71 mm below the old definition. The file
Upto_01/offsets.dat contains the approriate jump data.

No inter-frame rotations/translations
To reduce velocities only with respect to the itrf2000 (no inter-frame relative rot-trans),
update bin/gd2ren-0mp and set the first frame_switch_date to something early, but later
than the second etc. switch date..

However the "knee" (a V-signature in the time-series) in 1997.5-1998.0 may indicate
a stance for such a correction. It's mostly seen in the vertical; thus it's going to be mostly
a translation.

3. Collecting the rates and adjusting the error bars

cd $TAPDIR
# get a file sasm03.csh, e.g. from /Bifrost/hgs/tap/Upto_00/vfh00_93/
set components = ( ra ea no )
source ~/gps/errsca.env

cd $RDIR
ss_rates_data .ra -v \'HOFN REYK MATE\' > ra_rates.rsl
ss_rates_data .ea -v \'HOFN REYK MATE\' > ea_rates.rsl
ss_rates_data .no -v \'HOFN REYK MATE\' > no_rates.rsl

cat ra_rates.rsl ea_rates.rsl no_rates.rsl >! rates.rsl

rates_unc_sca -H -r ra_rates.rsl >! all_rates.tbl
rates_unc_sca    -e ea_rates.rsl >> all_rates.tbl
rates_unc_sca    -n no_rates.rsl >> all_rates.tbl

cd $RDIR
averotm.out \!averotm.ins
sshrrv.out \!sshrrv.ins

This set of commands is comprised in tcsh-source script ~/gps/collect_results.env

You may need

awk '{printf "%s,", "'"'"'"substr($1,1,4)"'"'"'"}; END{print}' ra_rates.rsl
to get a list of sites for  sshrrv.ins( q_all_sites=.false.,sites='SITA´','SITB', ...)
awk '{printf "%.4s %s\n", $1,$2}' ra_rates.rsl | xargs -l1 lola-of-site > vertical_rates.xyz

cd maps
mindist.out -X0,40,1 -Y50,75,1 -F../vertical_rates.xyz | xyz2grd -R4/36/52/72 -I1/1 -G../distance.grd

setenv CLR_REG -4/36/52/72
setenv CLR_PRJ m1:22000000
~/gps/maps/clr_vrates ../vertical_rates.grd ../distance.grd bifrost

source bstdghes-vels-1.env
 

4. Rates-versus-rates plots

cd $RDIR
setenv GEOIDRATES ~/Maxwell/prof/Bifrost-geoid.xyz
setenv RATESTBL ss_rates_vs_drtgg.dat
setenv TITLE "Std solution, PPP 2001"

awk '{print $1 ".ra:",$4,$5}' tap_rates.dat >! scld_ra_rates.rsl
rates_vs_rates_data -sf scld_ra_rates.rsl
rates_vs_rates_plot -s $RATESTBL

~/gps/bin/gps_vs_model_plot -o gps_vs_model.ps -r ew_adj_glenn.rsl
~/gps/bin/gps_vs_model_plot -o gps_vs_model.ps -e ew_adj_glenn.rsl
~/gps/bin/gps_vs_model_plot -o gps_vs_model.ps -n ew_adj_glenn.rsl

Don't be surprised! The script adds the component to the ps-file name to produce e.g.
gps_vs_model_r.ps
 

5. Prepare for the EOF stage

We process vertical component with air pressure loading
source ~/gps/define-apl.env
setenv TAPDIRR /w
setenv TDIR $TAPDIR/w_apl
setenv PSDIR $DDIR/w_apl/PS
setenv GDPLOT_DO R
foreach site ( `the-sites-of SWEPOS IGSU` )
foreach> urtap-ss $site -poi R
foreach> end
For the Finnish sites we need
setenv TAPNML "idate=1996,8,2,Q_Cut_At_Epoch=.true."
foreach site ( `the-sites-of FINNNET` )
foreach> urtap-ss $site -poi R
foreach> end

cd ~/gps
foreach site ( `the-sites-of SWEPOS FINNNET IGSU` )
foreach> gdplot-ts $site
foreach> end

6. Do EOF analysis for vertical component

set components = ( ra )
setenv TADD .apl
unseat TAPNML
cd $RDIR/../EOF # cd /home/hgs/gps/Upto_01/EOF
source setup.env
Adjust imported residuals and number of eigenvalues to delete. Experiment!
cd ~/tap
setenv MARGIN 0.4
foreach site ( `the-sites-of SWEPOS-N` )
foreach> urtap-eof-north $site -pu
foreach> end

foreach site ( `the-sites-of SWEPOS-S` )
foreach> urtap-eof-south $site -pu
foreach> end

foreach site ( `the-sites-of FINNNET` )
foreach> urtap-eof-fin $site -pu
foreach> end

cd ~/gps
foreach site ( `the-sites-in $TDIR .apl.ra.prl` )
foreach> gdplot-ts $site
foreach> end

Gather results and plot

     cd $TDIR
     # get a file sasm03.csh, e.g. from /Bifrost/hgs/tap/Upto_00/vfh00_93/
     set components = ( ra )
     source ./errsca.env

     cd $RDIR
     ss_rates_data -d $TDIR .ra >! ra_rates.rsl

     cat ra_rates.rsl ../std/ea_rates.rsl ../std/no_rates.rsl >! rates.rsl

     rates_unc_sca -H -r ra_rates.rsl >! ra_rates_unc_sca.tbl
 

     cd $RDIR
     sshrrv.out \!sshrrv.ins

     awk '{printf "%.4s %s\n", $1,$2}' ra_rates.rsl |\
          xargs -l1 lola-of-site >! vertical_rates.xyz
 
 

     cd maps
     rm -f ../vertical_rates.grd ../distance.grd
     mindist.out -X0,40,1 -Y50,75,1 -F../vertical_rates.xyz |\
         xyz2grd -R4/36/52/72 -I1/1 -G../distance.grd

     setenv CLR_REG -4/36/52/72
     setenv CLR_PRJ m1:22000000
     ~/gps/maps/clr_vrates ../vertical_rates.grd ../distance.grd bifrost
 

     cd $RDIR
     setenv GEOIDRATES ~/Maxwell/prof/Bifrost-geoid.xyz
     setenv RATESTBL ss_rates_vs_drtgg.dat
     setenv TITLE "EOF solution, PPP 2001"

     awk '{print $1 ".ra:",$4,$5}' tap_rates.dat >! scld_ra_rates.rsl
     rates_vs_rates_data -sf scld_ra_rates.rsl
     rates_vs_rates_plot -s $RATESTBL

     ~/gps/bin/gps_vs_model_plot -o gps_vs_model.ps -r ew_adj_glenn.rsl
 

.bye



Beyond is the old advice. Stop reading here!
cd ~/gps
source gdh2000.env
Jan's GPS data was on asmund:/gps0/gipsy/BIFROST/RESULTS/HEFL97_yyyy

For yy = 93, 94, ..., 00
copy  SITE.rad SITE.lon SITE.lat to `SD yyby ftp

cd `SD yy`/..
collect_many_NEV `ls -d HEFLIN_9?` HEFLIN_00
Some fixes that were necessary:
(1) I made an ITRF-style file out of Heflin's all.txt with
cd ~/IGS
posvel2ssc.pl heflin_00_00.posvel > heflin_00_00.ssc
where heflin_00_00.posvel is the local copy of all.txt

(2) Some gipsy nev files contained overrange values (***)

(3) New procedure ~/gps/bin/gd2ren-0mh

(4)   cat $SDIR/WETB.nev $SDIR/WTZR.nev > $SDIR/WETT.nev

      Some more stations that can be concatenated:

cd $DDIR
mv TROM.gd.ep TROO.gd.ep
cat TROO.gd.ep TRO1.gd.ep > TROM.gd.ep
      and the same for NYAL NYA1
 
cd ~/gps
many-gd2ren -0mh `the-sites-of SWEPOS FINNNET IGS` WETT

cd ~/tap
many-urtap-ss `the-sites-of SWEPOS FINNNET IGS` WETT
 

In order to create tap variants there are the following init scripts:
~/gps/define-apl.env
~/gps/define-tgg.env


Model versus Bifrost plots for the three components:

~/gps/bin/gps_vs_model_plot -o gps_vs_model.ps -r bstd_adj_glenn.rsl
~/gps/bin/gps_vs_model_plot -o gps_vs_model.ps -e bstd_adj_glenn.rsl
~/gps/bin/gps_vs_model_plot -o gps_vs_model.ps -n bstd_adj_glenn.rsl
(note: output ps-file name will be adjusted to contain _${comp})

EOF
  prepare (jobs without clim, but with air press load)
      source ~/gps/define-apl.env
      setenv TAPVARIANT /NoClim
      setenv KINDEVENTS all
      urtap-ss LEKS -poi R
      setenv BEGIN_DATE 1993,10,10
      collect-resid `cat the_EOF_sites_north `
      unseat BEGIN_DATE
      collect-resid `cat the_EOF_sites_south `
      cd $TAPDIR$TAPVARIANT
      source errsca.env
      setenv RDIR ~/gps/Upto_00/NoClim/with_apl
      cd $RDIR
      ss_rates_data -d $TAPDIR$TAPVARIANT .ra > ! rates.rsl
      rates_unc_sca -H -r rates.rsl > ! ra.rates_unc_sca.tbl
      setenv TDIR $TAPDIR/NCA
      setenv PSDIR /Bifrost/hgs/gps/Upto_00/vfh00-93/NoClim/with_apl
      setenv GDPLOT_DO R
      cd ~/gps
      gdplot-ts LEKS

 EOF proper
      setenv TAPVARIANT /NCA
      setenv TAPPPDIR /EOF
      setenv RDIR ~/gps/Upto_00/EOF
      setenv PSDIR $RDIR/PS
      setenv MARGIN 0.4
      setenv APLDIR /home/hgs/Oload/smhi/aplj
      setenv TAPAPL
      urtap_eof_north LEKS -pu
      cd $TAPDIR$TAPPPDIR
      rm -f acv.*.dat sca.*.dat chi.*.dat
      source errsca.env
      cd $RDIR
      setenv TDIR $TAPDIR$TAPPPDIR
      ss_rates_data -d $TDIR .apl.ra >! ra.rates.dat
      rates_unc_sca -H -r ra.rates.dat > ! ra.rates_unc_sca.tbl
      setenv TADDR .apl
      gdplot-ts LEKS
 

 prep horizontal (jobs without clim, no air press load)
      unseat TAPAPL APLDIR
      setenv TAPVARIANT /NoClim
      urtap_ss LEKS -pu E N
 

      setenv TAPPPJUMP
      setenv TAPPPNET N
      urtap-eof-horiz -pu N LEKS
      urtap-eof-horiz -pu N LEKS

      setenv TADD
      setenv TADDR .apl
      setenv TDIR $TAPDIR$TAPPPDIR
      cd gps
      gdplot-ts LEKS
 
 

BOBW (Best of both worlds (Lulu))
      cd /Bifrost/hgs/gps/Upto_00/bobw/
      source HOW.TO
 
 

PLOT RATES vs RATES
      setenv GEOIDRATES ~/Maxwell/prof/Bifrost-geoid.xyz
      setenv RATESTBL ra.rates_vs_drtgg.dat
      rates_unc_sca -r rates.rsl > ra.rates_unc_sca.tbl
      awk -f ~/gps/bin/scarates.awk ra.rates_unc_sca.tbl > sca_ra_rates.dat
      rates_vs_rates_data -sf sca_ra_rates.dat
      rates_vs_rates_plot -s $RATESTBL

      averotm.out
      sshrrv.out
      awk -v l=0.375 -v s=5 -f glennver.awk ~/Maxwell/GAM/rates_120120.dat > maps/glennver.vecs.dat
 

.bye

.bye