# Strange problem with grdimage

**URL:** <https://forum.generic-mapping-tools.org/t/strange-problem-with-grdimage/6327>\
**Category:** Q&A\
**Created:** [January 23, 2026, 5:48pm UTC](https://forum.generic-mapping-tools.org/t/strange-problem-with-grdimage/6327 "2026-01-23T17:48:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JDN](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/jdn/32/23_2.png) [@JDN](https://forum.generic-mapping-tools.org/u/JDN)\
**Post date:** [January 23, 2026, 5:48pm UTC](https://forum.generic-mapping-tools.org/t/strange-problem-with-grdimage/6327/1 "2026-01-23T17:48:07Z")

</div>

After re-installing succesfully MB-System, I got strange figures when using grdiamge.

I explain. I used GMT 6.4 and an old version of MB-System. So I decided to re-installe MB-System using the instructions given by them. Because I used Ubuntu 20.4 they are:  
sudo apt upgrade

sudo apt install build-essential

sudo apt install gmt libgmt5 libgmt-dev gmt-common   
proj-bin proj-data libproj-dev libgdal-dev   
libfftw3-3 libfftw3-dev libmotif-dev   
xfonts-100dpi libglu1-mesa-dev gfortran

After that I ran a script containing grdimage and the result was an empty map.

Just to be sure I decided to run Tutorial Example 15:

```auto
####################
gmt begin GMT_tut_15
    gmt set GMT_THEME cookbook
    gmt makecpt -Crainbow -T1000/5000
    gmt grdimage @earth_relief_30s -R-108/-103/35/40 -JM6i -B -BWSnE
    gmt colorbar -DJTC -I0.4 -Bxa -By+lm
gmt end show
####################

```

I attach the figure to let you what I mean.

Please, any help will be very much appreciated.

Juan  
[GMT\_tut\_15.pdf](https://forum.generic-mapping-tools.org/uploads/short-url/uDg7uTveerKgkqxjE8ueacIsKsp.pdf) (127.1 KB)

---

<div class="post-metadata">

**Author:** ![Esteban82](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/esteban82/32/54_2.png) [@Esteban82](https://forum.generic-mapping-tools.org/u/Esteban82)\
**Post date:** [January 23, 2026, 6:24pm UTC](https://forum.generic-mapping-tools.org/t/strange-problem-with-grdimage/6327/2 "2026-01-23T18:24:20Z")

</div>

Hello. I suspect there might be an issue with the `@earth_relief_30s` grid. Could you try using `@earth_relief_06m` instead and see if the problem persists?

---

<div class="post-metadata">

**Author:** ![JDN](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/jdn/32/23_2.png) [@JDN](https://forum.generic-mapping-tools.org/u/JDN)\
**Post date:** [January 25, 2026, 2:18am UTC](https://forum.generic-mapping-tools.org/t/strange-problem-with-grdimage/6327/3 "2026-01-25T02:18:58Z")

</div>

Dear Esteban,

Indeed. You were absoutely right.

The region selected (-R-108/-103/35/40) encompass 2 files:

- N30W105.earth\* \_relief\_30s\_p.nc
- N30W120.earth\_relief\_30s\_p.nc

Using grdinfo I checked their contents and I discovered that:

- N30W105.earth\_relief\_30s\_p.nc is OK
- N30W120.earth\_relief\_30s\_p.nc has only 0 values, so it is spoiled and should be repaired.

See below the output of grdinfo.

Regarding the previous script, the one it was the cause for testing grdimage with something easy as GMT\_tut\_15, now is running. Very strange. I guess it could have been a lack of RAM, because if I remeber well I was working with my notebook several days without shutting down. And now I had to start up the notebook, because it went down due to lack of battery, so now RAM was “fresh”. Maybe it could be the explanation for crushing before and running now. Maybe…

In any case, Esteban, thank you very much indeed for your help

Bets regards

Juan Diaz-Naveas

N30W105.earth\_relief\_30s\_p.nc: Title: Produced by grdconvert  
N30W105.earth\_relief\_30s\_p.nc: Command:  
N30W105.earth\_relief\_30s\_p.nc: Remark:  
N30W105.earth\_relief\_30s\_p.nc: Pixel node registration used [Geographic grid]  
N30W105.earth\_relief\_30s\_p.nc: Grid file format: ns = GMT netCDF format (16-bit integer), CF-1.7  
N30W105.earth\_relief\_30s\_p.nc: x\_min: -105 x\_max: -90 x\_inc: 0.00833333333333 (30 sec) name: longitude n\_columns: 1800  
N30W105.earth\_relief\_30s\_p.nc: y\_min: 30 y\_max: 45 y\_inc: 0.00833333333333 (30 sec) name: latitude n\_rows: 1800  
N30W105.earth\_relief\_30s\_p.nc: v\_min: -11.5 v\_max: 3883 name: z  
N30W105.earth\_relief\_30s\_p.nc: scale\_factor: 0.5 add\_offset: 0 packed z-range: [-23,7766]  
N30W105.earth\_relief\_30s\_p.nc: format: netCDF-4 chunk\_size: 129,129 shuffle: on deflation\_level: 9  
N30W105.earth\_relief\_30s\_p.nc: Default CPT: geo

N30W120.earth\_relief\_30s\_p.nc: Title: Produced by grdconvert  
N30W120.earth\_relief\_30s\_p.nc: Command:  
N30W120.earth\_relief\_30s\_p.nc: Remark:  
N30W120.earth\_relief\_30s\_p.nc: Pixel node registration used [Geographic grid]  
N30W120.earth\_relief\_30s\_p.nc: Grid file format: ns = GMT netCDF format (16-bit integer), CF-1.7  
N30W120.earth\_relief\_30s\_p.nc: x\_min: -120 x\_max: -105 x\_inc: 0.00833333333333 (30 sec) name: longitude n\_columns: 1800  
N30W120.earth\_relief\_30s\_p.nc: y\_min: 30 y\_max: 45 y\_inc: 0.00833333333333 (30 sec) name: latitude n\_rows: 1800  
N30W120.earth\_relief\_30s\_p.nc: v\_min: 0 v\_max: 0 name: z  
N30W120.earth\_relief\_30s\_p.nc: scale\_factor: 0.5 add\_offset: 0 packed z-range: [0,0]  
N30W120.earth\_relief\_30s\_p.nc: format: netCDF-4 chunk\_size: 129,129 shuffle: on deflation\_level: 9  
N30W120.earth\_relief\_30s\_p.nc: Default CPT: geo

---

<div class="post-metadata">

**Author:** ![Esteban82](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/esteban82/32/54_2.png) [@Esteban82](https://forum.generic-mapping-tools.org/u/Esteban82)\
**Post date:** [January 25, 2026, 9:59pm UTC](https://forum.generic-mapping-tools.org/t/strange-problem-with-grdimage/6327/4 "2026-01-25T21:59:34Z")

</div>

Hi JDN.

> [@JDN](#):
>
> - N30W120.earth\_relief\_30s\_p.nc has only 0 values, so it is spoiled and should be repaired.

The most common cause in these cases is a problem during the download of `N30W120.earth_relief_30s_p.nc`.

I would suggest deleting that file from your local GMT cache so it gets downloaded again cleanly, and then rerunning the script.

---

<div class="post-metadata">

**Author:** ![JDN](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/jdn/32/23_2.png) [@JDN](https://forum.generic-mapping-tools.org/u/JDN)\
**Post date:** [January 25, 2026, 11:40pm UTC](https://forum.generic-mapping-tools.org/t/strange-problem-with-grdimage/6327/5 "2026-01-25T23:40:15Z")

</div>

Dear Esteban,

Again, you were right.

I deleted my local file N30W120.earth\_relief\_30s\_p.nc, then I rerun the script and everything went smooth.

Thanks a lot

Juan Diaz-Naveas
