Bug #1260

grdview does not correctly handle periodicity at poles

Added by Lars O about 3 years ago. Updated about 3 years ago.

Status:In ProgressStart date:2018-07-24
Priority:NormalDue date:
Assignee:Paul% Done:


Target version:-
Affected version:5.4.2 Platform:


When plotting polar projections (-Jp) of the pole regions, grdimage connects the 0° and 360° longitudes correctly if the grid contains geographical data. grdview does not follow this behavior, there is a gap between x=0° and 360°. Enforcing periodicity with -nl+bpx or -nl+bg does not help.

The attached image shows the problem (plus some z-ordering issue). It was created with the attached grid and the following command:

gmt grdview test.grd -JP10c/-90 -Bg10a30p/g10a10p -Ctest.cpt -Jz2 -pz130/30 -P -Rtest.grd -f0x,1y -n+bpx > test.ps

Cheers, Lars.
grdview output

test.png - grdview output (62.8 KB) Lars O, 2018-07-24 22:58

test.grd - grdview input (6.94 KB) Lars O, 2018-07-24 22:59


#1 Updated by Paul about 3 years ago

  • Status changed from New to In Progress
  • Assignee set to Paul

Thanks Lars, you demonstrate the problem well. I will see what can be done for this kind of issue.

#2 Updated by Paul about 3 years ago

I have added a new test script (that currently fails) to remind us to fix this. Actually, running your -JP in GMT6 trunk shows two other problems as well that I need to fix - all highlighted by grdview/wrap.sh test script.

Also available in: Atom PDF