Bug #1151

mgd77header outputs the wrong survey departure and arrival dates

Added by Mike 2 months ago. Updated 15 days ago.

Status:ClosedStart date:2017-09-18
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Affected version:6.x-svn Platform:Mac OS X

Description

For this example, a headerless mgd77 file, 06050075.a77, is attached. This file has been truncated to only 1001 records for this bug report. The temporal extents of the data are 1984-07-19 to 1984-07-26.

This worked in GMT4.5.15, e.g.,
% gmtswitch gmt4
% mgd77header 06050075.a77 -Mf
06050075 Survey_Departure_Year : 1984
06050075 Survey_Departure_Month : 07
06050075 Survey_Departure_Day : 19
06050075 Survey_Arrival_Year : 1984
06050075 Survey_Arrival_Month : 07
06050075 Survey_Arrival_Day : 26
...

However the wrong dates are output in GMT5:
% gmtswitch gmt5
% mgd77header --version
6.0.0_r18825M
% mgd77header 06050075.a77 -Mf | grep Survey
06050075 Survey_Departure_Year : 1999
06050075 Survey_Departure_Month : 07
06050075 Survey_Departure_Day : 20
06050075 Survey_Arrival_Year : 1999
06050075 Survey_Arrival_Month : 07
06050075 Survey_Arrival_Day : 27
...

-Mike

06050075.a77 - partial a77 file (115 KB) Mike, 2017-09-18 19:57

History

#1 Updated by Paul about 1 month ago

  • Status changed from New to Feedback

When I run that command on your datafile it seems to work:

gmt mgd77header 06050075 -Mf | grep Survey
06050075                            Survey_Identifier : 06050075
06050075                     Parameters_Surveyed_Code : 55511
06050075                        Survey_Departure_Year : 1984
06050075                       Survey_Departure_Month : 07
06050075                         Survey_Departure_Day : 19
06050075                          Survey_Arrival_Year : 1984
06050075                         Survey_Arrival_Month : 07
06050075                           Survey_Arrival_Day : 26

Not sure why you would get 1999 (off by 15) and 20 and 27 (off by 1). The internal min/max time is formatted to absolute time string (e.g., 1984-07-26T01:30:00) and we grab the selections from there. However, that format is controlled by GMT default settings so perhaps yours have been set for other choices and you get junk?

#2 Updated by Mike about 1 month ago

I had set TIME_SYSTEM to S1985 and was getting junk as a result.

Seems it's a feature, not a bug...

Thanks!

#3 Updated by dan about 1 month ago

(Link spam removed)

#4 Updated by Paul 15 days ago

  • Status changed from Feedback to Closed
  • Affected version changed from 5.x-svn to 6.x-svn

Closed, not a bug.

Also available in: Atom PDF