"gmtinfo -I-" outputs longitude in 0-360 degree range format?

Dear gurus,

Using gmtinfo -I- a.gmt I get:

-R275.38/287.74/-19.9399399399/-3.36336336336

I expected the following -R because the longitude values in the gmt file are in the form of -84.xxx/-72.yyy:

-R-84.62/-72.26/-19.9399399399/-3.36336336336

so, longitude values in the gmt file are not in a 0-360 degree output format. Please find the file enclosed here (rename it to a.gmt because it was not possible to upload it here unless it had a TXT file extension). Where is the issue here? I already solved this with the neat awk but I thought it was obvious to get that -R way directly from gmtinfo -I- (as expected).

GMT version is 6.4.0. Is this a bug? should I upgrade to version 6.5.0?

Thanks for your support,

a.gmt.txt (45.0 KB)

Are you making the daring proposition that none of the west and east values are in 0-360? It seems to me that 0 < 275.38 < 360 and 0 < 287.74 < 360, no?

Or are you expecting -R-84.62/-72.26/-19.9399399399/-3.36336336336, which is exactly the same area.

yes indeed! it is the output format, I changed a bit the title of this post, thanks!

What operation or mapping cares about -R-84.62/-72.26/-19.9399399399/-3.36336336336 vs -R275.38/287.74/-19.9399399399/-3.36336336336? It is the exact same region, no?

It is, about the operation I am using the -R output to modify the extent of the nc with grdedit, just that. Could you explain why the output of the gmtinfo is not -R-84.62/-72.26/-19.9399399399/-3.36336336336? I mean, longitude values in the gmt file are indeed in the form of -84.xxx/-72.yyy, where is the issue? Thanks again.

The issue is, what operation requires -R in negative land and what goes wrong if you give it positive longitudes?

Well, we have FORMAT_GEO_OUT that promises to output in [-180 180] by default.
I also wonder why it happens.

I remove the first line of the input file (# @VGMT1.0 @GPOLYGON) and I got:

-R-84.62/-72.26/-19.9399399399/-3.36336336336

1 Like

Yes FORMAT_GEO_OUT should have worked, but for most things in GMT it does not matter - that was what I was trying the OP to say.

Gracias Esteban!