X2SYS_CROSS time recognition

Added by Mark 4 months ago

Hello everyone,

I am trying to use the GMT x2sys package to report the crossover error in marine gravity track data. There seems to be an error when my data is read with X2Sys. X2sys_cross will report the crossover location from my track files; however, there has been a reoccurring problem where some of my data fields are not processed. Either all data fields are read in with dummy times or just the time field is read without any other field.

My question are:

How should I format my def file so all data fields can be read in?
How can I tell x2sys_cross to look at all of my data fields? Is there syntax I might have missed?

Here are the first few lines of my track file:

lat, lon, Free air, test level, time

62.000638 192.658933 5.22 6.00 1501146780.000
62.004294 192.661068 5.24 6.02 1501146840.000
62.007947 192.663234 5.28 6.06 1501146900.000
62.011598 192.665423 5.30 6.08 1501146960.000
62.015264 192.667560 5.28 6.06 1501147020.000
62.018929 192.669707 5.28 6.06 1501147080.000
62.022597 192.671887 5.26 6.04 1501147140.000
62.026266 192.674023 5.24 6.02 1501147200.000
62.029929 192.676148 5.23 6.01 1501147260.000
62.033575 192.678323 5.23 6.01 1501147320.000
62.037228 192.680501 5.23 6.01 1501147380.000
62.040884 192.682679 5.22 6.00 1501147440.000
62.044556 192.684798 5.23 6.01 1501147500.000
62.048226 192.686929 5.26 6.04 1501147560.000
62.051874 192.689121 5.25 6.03 1501147620.000
62.055518 192.691285 5.22 6.00 1501147680.000
62.059172 192.693433 5.18 5.96 1501147740.000
62.062835 192.695564 5.11 5.89 1501147800.000
62.066497 192.697728 4.92 5.70 1501147860.000
62.070155 192.699928 4.65 5.43 1501147920.000
62.073818 192.702072 4.34 5.12 1501147980.000
62.077480 192.704216 3.88 4.66 1501148040.000
62.081139 192.706343 3.59 4.38 1501148100.000
62.084797 192.708510 3.26 4.05 1501148160.000
62.088453 192.710688 2.92 3.71 1501148220.000
62.092110 192.712837 2.29 3.08 1501148280.000
62.095768 192.715008 1.70 2.49 1501148340.000

When I execute the command:

x2sys_cross $X2SYS_HOME/cross_over/"$dataf"_adj.dat -J$map_proj -T$TAG -Qi -Sl1.0 -Su40.0 -Il -Z -V

with my def file as:

#ASCII # File is ASCII
#GEO # Data are geographic
#MULTISEG #Data are multi-segment
#name type NaN NaN-proxy scale offset oformat
lat a N 0 1 0 %9.6f
lon a N 0 1 0 %10.6f
grav a N 0 1 0 %6.2f
level a N 0 1 0 %6.2f
rtime a N 0 1 0 %14.3f

I receive the output below. This uses dummy times:

  1. Command : x2sys_cross /Volumes/Sea-g/cross_over/splitHealy_2017_221_hold65.dat_adj.dat -JS0/90/62/10 -TCANADA_BASIN -Qi -Sl1.0 -Su40.0 -Il →Z -V
  2. Tag: CANADA_BASIN
  3. Command: x2sys_cross /Volumes/Sea-g/cross_over/splitHealy_2017_221_hold65.dat_adj.dat -JS0/90/62/10 -TCANADA_BASIN -Qi -Sl1.0 -Su40.0 -Il →Z -V
  4. lon lat i_1 i_2 dist_1 dist_2 head_1 head_2 vel_1 vel_2 grav_1 grav_2 level_1 level_2 rtime_1 rtime_2
    /Volumes/Sea-g/cross_over/splitHealy_2017_221_hold65.dat_adj 0 /Volumes/Sea-g/cross_over/splitHealy_2017_221_hold65.dat_adj 0 NaN/NaN/20453 >NaN/NaN/20453
    -167.3393752 62.0035350 0.7923969 16124.7251969 0.3348048 4114.8323721 195.3528469 269.4616447 NaN NaN 5.2358479 >5.5988113 6.0158479 5.4719373 1501146827.5438159 1503428948.7969246
    -167.3394309 62.0034398 0.7663433 35973.9978605 0.3237966 9587.9269219 195.3528469 273.4577628 NaN NaN 5.2353269 >6.7775268 6.0153269 5.9776980 1501146825.9805951 1505985758.0710089
    -167.3230000 62.0036138 60819.5695270 16124.8755702 15925.9899006 4115.6903529 195.2300109 269.4616447 NaN NaN >6.6600000 6.4093236 5.9900000 6.1877144 1508496094.1716208 1503687891.8339016

When I change rtime to time in def file:

#ASCII # File is ASCII
#GEO # Data are geographic
#MULTISEG #Data are multi-segment
#name type NaN NaN-proxy scale offset oformat
lat a N 0 1 0 %9.6f
lon a N 0 1 0 %10.6f
grav a N 0 1 0 %6.2f
level a N 0 1 0 %6.2f
time a N 0 1 0 %14.3f

I am returned this output. All data fields are reported as NaN but, my time field is recognized and converted into a different form.

  1. Command : x2sys_cross dataf_adj.dat -JS0/90/62/10 -TCANADA_BASIN -Qi -Sl1.0 -Su40.0 -Il -Z -V
  2. Tag: CANADA_BASIN
  3. Command: x2sys_cross dataf_adj.dat -JS0/90/62/10 -TCANADA_BASIN -Qi -Sl1.0 -Su40.0 -Il -Z -V
  4. lon lat t_1 t_2 dist_1 dist_2 head_1 head_2 vel_1 vel_2 grav_1 grav_2 Level_1 Level_2
    dataf_adj 0 dataf_adj 0 15011-01-01T00:00:00/15097-01-01T00:00:00/20453 15011-01-01T00:00:00/15097-01-01T00:00:00/20453
    -175.2010887 62.0487389 15053-01-01T00:00:00 15052-01-01T00:00:00 9174.3815444 9171.3149353 NaN NaN NaN NaN NaN NaN NaN NaN
    -167.2821169 62.0733018 15084-01-01T00:00:00 15059-01-01T00:00:00 15934.0458505 9596.8668076 NaN NaN NaN NaN NaN NaN NaN NaN
    -167.2816641 62.0740688 15059-01-01T00:00:00 15084-01-01T00:00:00 9596.9554978 15934.1345466 NaN NaN NaN NaN NaN NaN NaN NaN
    -167.2668458 62.0993670 15059-01-01T00:00:00 15084-01-01T00:00:00 9599.8793221 15937.0584490 NaN NaN NaN NaN NaN NaN NaN NaN
    -167.2654824 62.1016651 15059-01-01T00:00:00 15084-01-01T00:00:00 9600.1451552 15937.3243038 NaN NaN NaN NaN NaN NaN NaN NaN
    -167.2573057 62.1156943 15059-01-01T00:00:00 15084-01-01T00:00:00 9601.7659664 15938.9451262 NaN NaN NaN NaN NaN NaN NaN NaN
    -167.2565842 62.1169284 15084-01-01T00:00:00 15059-01-01T00:00:00 15939.0877229 9601.9085659 NaN NaN NaN NaN NaN NaN NaN NaN

I have observed this in both GMT 4.15.18 and GMT 5.4.5. Any advice on how to process my data and report the crossover error with time would be greatly appreciated.

Thanks,

Mark

Here is an example of my script:

TAG=CANADA_BASIN

mawk '{if ($3>62) printf"%.6f %.6f %.2f %.2f %.3f \n",$3,$4,$5,$6,$2}' $file > $X2SYS_HOME/cross_over/"$dataf"_adj.dat
##Crossovers

x2sys_init $TAG -V -G -DARCTIC/$TAG.def -F -Ce -Ndk -Nsk -I1m -Edat -Wt30

vecho $X2SYS_HOME > $X2SYS_HOME/$TAG/$TAG_paths.txt

echo $X2SYS_HOME/cross_over >> $X2SYS_HOME/$TAG/$TAG_paths.txt
echo $X2SYS_HOME/cross_over/$TAG >> $X2SYS_HOME/$TAG/$TAG_paths.txt

echo $X2SYS_HOME/cross_over/"$dataf"_adj.dat > $X2SYS_HOME/$TAG/$TAG.lis

x2sys_binlist -T$TAG -V :$X2SYS_HOME/$TAG/$TAG.lis > $X2SYS_HOME/$TAG/$TAG.tbf
x2sys_put $X2SYS_HOME/$TAG/$TAG.tbf -T$TAG -V

##gmt x2sys_cross - Find and compute Cross-Over Errors
x2sys_cross $X2SYS_HOME/cross_over/"$dataf"_adj.dat -J$map_proj -T$TAG -Qi -Sl1.0 -Su40.0 -Il -Z -V > $X2SYS_HOME/cross_over/XOE_"$dataf".txt

GMT config file: #

GMT 5.4.5 Defaults file #
FONT Parameters #
FONT_ANNOT_PRIMARY = 12p,Helvetica,black
FONT_LABEL = 12p,Helvetica,black #
FORMAT Parameters #
FORMAT_GEO_MAP = dddF
FORMAT_FLOAT_OUT = %.7f #
Projection Parameters #
PROJ_ELLIPSOID = WGS-84
PROJ_LENGTH_UNIT = inch #
PostScript Parameters #
PS_CHAR_ENCODING = ISOLatin1+
PS_MEDIA = a0 #
Calendar/Time Parameters #
TIME_EPOCH = 1970-01-01T00:00:00
TIME_IS_INTERVAL = off
TIME_UNIT = s
TIME_WEEK_START = Sunday