New Mexico Tech
Earth and Environmental Science

ERTH 455 / GEOP 555 - Geodetic Methods

Lab 5: gd2p.pl: static position estimation

"I like my crust deformed."
UNAVCO bumper sticker

Note that you DO have to work on redoubt today!

Introduction

Last week I had you go through the motions of adding a new station to GIPSY's sta_info database and get used to processing with gd2p.pl. The processing, however, was quite arbitrary. I got you to a point where you know how to look at the postfit residuals. This week we will look a bit more into the various knobs you can use to improve the processing. You will look at residuals a lot (last week you figured out how to plot them), which show you how much the solution improves.

At this point I assume that you have successfully completed lab 4. You may need to go back to its description to lookup some of the details; opening it in a second browser tab is likely a good idea.

To keep myself out of trouble I should note that this lab follows a JPL workshop, but we're using our own data.

Setup

Below I show the sequence of commands that should get us all to the same starting point. Note that anything between redoubt and > is part of the prompt and not to be typed. The commands you will use start at the first space and range until the '#', which I use to comment what that line does.

	redoubt:~> cd $GEOP555                               #go to working directory
	redoubt:/data/GEOP555/gps>                           #'gps' part should be your user name! I am working as user 'gps'
	redoubt:/data/GEOP555/gps> mkdir lab05               #create folder to work in this week
	redoubt:/data/GEOP555/gps> cd lab05                  #go there
	redoubt:/data/GEOP555/gps/lab05>setenv WORKDIR `pwd` #creates the variable WORKDIR to refer to this place
	redoubt:/data/GEOP555/gps/lab05>echo $WORKDIR        #print the contents of this variable
	/data/GEOP/[USERNAME]/lab05/                         #this should be your output (USERNAME IS YOUR USERNAME) I will use this variable below!	
	

Whenever you log out and log back in, make sure to have $WORKDIR set to the value above. Obviously you don't have to create the lab05 directory every single time, as it will remain there.

If your $WORKDIR contains gps, you're doing it wrong!

Processing: Add Zenith Troposphere

Make a new directory for this run:

	$> mkdir $WORKDIR/run2
	$> cd $WORKDIR/run2
	

From last week's lab, copy the run_again script into $WORKDIR/run2. I assume that you worked in $GEOP555/lab04/run1:

    $> cp $GEOP555/lab04/run1/run_again ./r2
    $> cat r2											#should give you the output below (the 'gps' subdir should be your name)
    #!/bin/csh -f  

    #The following environment variables were active:
    #setenv GOA /usr/local/GIPSY/goa-6.3

    #You may need the following source command to set your PATH if you have changed it
    #source  /usr/local/GIPSY/goa-6.3/rc_gipsy.csh
    ( gd2p.pl \
          -i /data/GEOP555/gps/lab04/abbz2000.15o \
          -n ABBZ \
          -d 2015-07-19 \
          -r 300 \
          -type s \
          -w_elmin 15 \
          -e "-a 20 -PC -LC -F" \
          -pb_min_slip 1.0e-3 \
          -pb_min_elev 30 \
          -amb_res 2 \
          -dwght 1.0e-5 1.0e-3 \
          -post_wind 5.0e-3 5.0e-5 \
          -trop_z_rw -1.0 \
          -tides \
          -orb_clk "flinnR /data/GEOP555/gps/lab04/orbit" \
          -sta_info /data/GEOP555/gps/sta_info \
     > gd2p.log ) |&  sed '/^Skipping namelist/d' > gd2p.err
	

No surprises here! Exactly what you've done last week. Note that the stdout and stderr log files now are gd2p.log and gd2p.err, while they used to be run1.log and run1.err. That's alright. No need to change things. As we will be keeping our results in separate directories, there is no danger of overwriting results / logs.

Let's get to the wet troposphere. The current -1.0 is a negative value for parameter -trop_z_rw. If you read the documentation, you know that a negative value for this parameter means that it won't be estimated. That's purely instructional. Change this value to 5.0e-8 [km/sqrt(sec)] - this is a random walk value that is recommended from (JPL's) experience.

Save and execute the script:

    $> ./r2
	

If you list your directory contents, you the file EDIT_POINT_FAILURE didn't show up. gd2p.err should contain only warnings, no serious errors - the edit cycle converged! Yay! If you now compare the postfit residuals (LC) you will find them to be much smaller and the outliers are gone:

    redoubt:/data/GEOP555/gps/lab05/run2> cat ../../lab04/run1/Postfit.sum             #OLD RUN1
       start time         stop time      type  user      postfit sigma npts outliers
 
    15JUL18 23:59:43   15JUL19 23:54:43   LC   ABBZ      1.9478E-05    2073    434
    15JUL18 23:59:43   15JUL19 23:54:43   PC   ABBZ      4.4347E-04    2507      0
	
    redoubt:/data/GEOP555/gps/lab05/run2> cat Postfit.sum                              #RUN 2
       start time         stop time      type  user      postfit sigma npts outliers
 
    15JUL18 23:59:43   15JUL19 23:54:43   LC   ABBZ      1.1021E-05    2507      0
    15JUL18 23:59:43   15JUL19 23:54:43   PC   ABBZ      4.4397E-04    2507      0
	

Let's look at the residuals. I provide a script that creates the 2 file for lc and pc residuals that can be used for the plotting preparation: geop555_make_residuals.sh. This wraps the residual generation, data extraction, and file renaming that you've done by hand last week:

    redoubt:/data/GEOP555/gps/lab05/run2> geop555_make_residuals.sh 
    created:  run2_lc_res.txt run2_pc_res.txt
	

Now you can make the plots that compare previous and current residuals (we'll do that a lot):

    $> gnup -p ../../lab04/run1/run1_lc_res.txt run2_lc_res.txt -xl 'Hours' -yl 'postfit LC residuals (cm)'
	

You should get something like this:



Clearly, the phase residuals are overall smaller, so we must have some wet troposphere, which our parameter represents better than no wet troposphere at all. Plot it with the script plot_wetz.sh that I provide (you need to provide the site ID as argument):

    $> plot_wetz.sh ABBZ
	

You should get something like this:



Definitely the code estimates some variation, with the most significant values at the beginning and end of the day (negative scale!).

The file tdp_* files contain information about the estimated parameters. The file tdp_final contains the final estimates:

rg <at> nmt <dot> edu | Last modified: September 20 2017 20:23.