Gradient problem using earth_relief_03s

Dear all,

I am trying to make the best of the time corona is giving me and therefore am building my own map of germany with the newly available earth reliefs. As long as I use a lower resolution than 15s everything works fine, but every time I try to use a higher resolution some problems with dimensions of the intensity grid in regard to the data grid arise.

To make my problem more comprehensible I created a minimum working example of my code:

  • grdgradient @earth_relief_03s -Nt0.6 -A315 -R5.6666/15.1666/47.1666/55.1666*

  • psbasemap -Bag1d -R5.6666/15.1666/47.1666/55.1666 -JM10/95c -X-0.2c -Y2c -P --PS_MEDIA=Custom_100cx135c -K -O >> *

  • psclip borderGermany.ASC -R5.6666/15.1666/47.1666/55.1666 -JM10/95c -K -O >>

  • grdimage -V @earth_relief_03s -R5.6666/15.1666/47.1666/55.1666 -JM10/95c -CWorld2.cpt -P -K -O >>*

  • psclip -C -K -O >>*

  • psxy borderGermany.ASC -R5.6666/15.1666/47.1666/55.1666 -JM10/95c -P -W1.2p -K -O >>*

  • psconvert -Tf -Vv*

The resulting error throws the message:

grdimage [ERROR]: Dimensions of intensity grid do not match that of the data grid!
GMT: Module return with failure while executing the command
grdimage -V @earth_relief_03s -R5.6666/15.1666/47.1666/55.1666 -JM10/95c -CWorld2.cpt -P -K -O >>

What is interesting about this problem ist, that the code runs without errors als long as the resolution is rougher than 15s. To be honest I am not able to comprehend why the resolution should be a problem. For convenience and to eliminate this point as possible error I already downloaded the higher resolutions for offline usage.

If somebody could please be so kind and give me hint what I have to change at my code to get it done I would be very thankful.

Best regards

P.S.: Here is my border-file I use to clip the region. (74.5 KB)

Looks like we are getting round-off in different directions. The reason is your -R is not a nice multiple of 3 arc seconds so it has to be rounded to the nearest multiple somewhere, but maybe in different directions. Worked fine if I used -R5.6625/15.16666666/47.1625/55.16666666 for instance.

Dear Mr. Wessel,

thank you very much for your support. Now it’s running just fine and the map is abolutely gorgeous.

Best regards

Dear Mr Wessel,
I’m writing again, because I recognized that even when taking care that the region is definied by a nice multiple of 1 arc seconds and even 3 arc seconds the problem arises again. I’ve played a litlle with the regions and as far as I can unterstand for example


is a nice multiple of 1 and 3 arc seconds (based on what input earth relief is used) but nervertheless the following error message occurs (the whole output on the console is given in the attached txt (1.7 KB) ):

grdimage [ERROR]: Dimensions of intensity grid do not match that of the data grid!
GMT: Module return with failure while executing the command
grdimage -V @earth_relief_01s -R7.4958/10.5041/47.4958/49.8333 -JM9/45c -CWorld2.cpt -P -K -O >> >>

Could you please tell me what I have to consider when choosing the regions? Something about my hypothesis that given region boarder must be an integer multiple of the used resolution of the earth relief seems to be not right. Thank you very much for your time.

Best regards

No quite. For example, 7.4958 = 7:29:44.88 but should be 7:29:45 to be a multiple of 1 or 3 arc secs. ROund-off and not enough decimals. Eaiest to use

-R7:29:45/10:30:15/… etc

Quite logical… I’m feeling a little bit stupid right now. :smiley:

Thank you for your support and to the whole team for such a great software.

Your’welcome, and thanks for posting.

Master repo updated with fix so that your original -R should work again.