# Change default grid format from NetCDF to GeoTIFF

**URL:** <https://forum.generic-mapping-tools.org/t/change-default-grid-format-from-netcdf-to-geotiff/6404>\
**Category:** Q&A\
**Created:** [April 20, 2026, 7:18am UTC](https://forum.generic-mapping-tools.org/t/change-default-grid-format-from-netcdf-to-geotiff/6404 "2026-04-20T07:18:58Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andreas](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@Andreas](https://forum.generic-mapping-tools.org/u/Andreas)\
**Post date:** [April 20, 2026, 7:18am UTC](https://forum.generic-mapping-tools.org/t/change-default-grid-format-from-netcdf-to-geotiff/6404/1 "2026-04-20T07:18:58Z")

</div>

NetCDF is the default grid format produced by GMT, but is there any way to change this?

I would like GMT _always_ to create GeoTIFFs; not NetCDF. I.e., it would be great if I don’t need to specify `=gdal:GTiff` every time.

Is this possible? I didn’t see any obvious options for this in [gmt.conf](https://docs.generic-mapping-tools.org/latest/gmt.conf.html#gmt-conf).

---

<div class="post-metadata">

**Author:** ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)\
**Post date:** [April 20, 2026, 9:56am UTC](https://forum.generic-mapping-tools.org/t/change-default-grid-format-from-netcdf-to-geotiff/6404/2 "2026-04-20T09:56:17Z")

</div>

Not that I know off.

---

<div class="post-metadata">

**Author:** ![mkononets](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/mkononets/32/4029_2.png) [@mkononets](https://forum.generic-mapping-tools.org/u/mkononets)\
**Post date:** [April 20, 2026, 12:11pm UTC](https://forum.generic-mapping-tools.org/t/change-default-grid-format-from-netcdf-to-geotiff/6404/3 "2026-04-20T12:11:57Z")

</div>

[**IO\_GRIDFILE\_FORMAT**](https://docs.generic-mapping-tools.org/latest/gmt.conf.html#term-IO_GRIDFILE_FORMAT)

I did not try it myself

---

<div class="post-metadata">

**Author:** ![Andreas](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@Andreas](https://forum.generic-mapping-tools.org/u/Andreas)\
**Post date:** [April 20, 2026, 12:24pm UTC](https://forum.generic-mapping-tools.org/t/change-default-grid-format-from-netcdf-to-geotiff/6404/4 "2026-04-20T12:24:21Z")

</div>

How on earth did I miss that one. Thanks @mkononets, looks just right. Will test.

---

<div class="post-metadata">

**Author:** ![mkononets](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/mkononets/32/4029_2.png) [@mkononets](https://forum.generic-mapping-tools.org/u/mkononets)\
**Post date:** [April 20, 2026, 12:30pm UTC](https://forum.generic-mapping-tools.org/t/change-default-grid-format-from-netcdf-to-geotiff/6404/5 "2026-04-20T12:30:19Z")

</div>

An important related parameter that does not seem to be configurable via `gmt.conf` is the default gridline grid registration (the `-rp|g` option). `gdal` that is used to produce geotiff files assumes grids are always is pixel-registered, which `gmt` apparently distinguish between gridline and pixel registration. This can result in lots of confusion (it used to confuse me a lot).

---

<div class="post-metadata">

**Author:** ![Andreas](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@Andreas](https://forum.generic-mapping-tools.org/u/Andreas)\
**Post date:** [April 20, 2026, 12:51pm UTC](https://forum.generic-mapping-tools.org/t/change-default-grid-format-from-netcdf-to-geotiff/6404/6 "2026-04-20T12:51:37Z")

</div>

I see now that [IO\_GRIDFILE\_FORMAT](https://docs.generic-mapping-tools.org/latest/gmt.conf.html#term-IO_GRIDFILE_FORMAT) refers to [grdconvert](https://docs.generic-mapping-tools.org/latest/grdconvert.html)’s way of specifying the format. The identifier for gdal is ``gd`` for “Import/export through GDAL”. Not sure if this applies to the ‘new’ way of specifying output formats (I think **grdconvert** is ‘old’), e.g. `grid.tif=gdal:GTIFF`. I also suspect that [IO\_GRIDFILE\_FORMAT](https://docs.generic-mapping-tools.org/latest/gmt.conf.html#term-IO_GRIDFILE_FORMAT) only applies to **grdconvert**.

```auto
$ gmt set IO_GRIDFILE_FORMAT gd

$ gmt grdcut @earth_faa_01m -RSJ -Gsj_faa2.tif
grdconvert [ERROR]: Cannot find file (null)
grdblend [ERROR]: Unable to resample file (null).
grdcut [ERROR]: Cannot write with GDAL without knowing which driver to use.

$ gmt set IO_GRIDFILE_FORMAT gd:GTIFF

$ gmt grdcut @earth_faa_01m -RSJ -Gsj_faa2.tif
grdconvert [ERROR]: Cannot find file (null)
grdblend [ERROR]: Unable to resample file (null).
grdcut [ERROR]: Cannot write with GDAL without knowing which driver to use.

```

---

<div class="post-metadata">

**Author:** ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)\
**Post date:** [April 20, 2026, 1:40pm UTC](https://forum.generic-mapping-tools.org/t/change-default-grid-format-from-netcdf-to-geotiff/6404/7 "2026-04-20T13:40:12Z")

</div>

> [@mkononets](#):
>
> `gdal` that is used to produce geotiff files assumes grids are always is pixel-registered, which `gmt` apparently distinguish between gridline and pixel registration. This can result in lots of confusion (it used to confuse me a lot).

GMT is older than GDAL.

- GMT default’s is grid registration (there was a time where we barely could find pixel-registered grids (mainly nc) in the wild
- GDAL default is report everything as pixel registered. But it also has both mothers, though I’m yet to find a “Pixel is Point” product
- When accessing GDAL library from GMT (which is different from using GDAL directly) we made the decision that, from within GMT the defaults should maintain (grid reg) and so we adjust whatever comes from GDAL LIB. At the time, that avoid a bad bug where Surfer grids, that don’t even have the concept of pixel registration, were reported with wrong limits.

---

<div class="post-metadata">

**Author:** ![mkononets](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/mkononets/32/4029_2.png) [@mkononets](https://forum.generic-mapping-tools.org/u/mkononets)\
**Post date:** [April 20, 2026, 2:46pm UTC](https://forum.generic-mapping-tools.org/t/change-default-grid-format-from-netcdf-to-geotiff/6404/8 "2026-04-20T14:46:59Z")

</div>

What does the use of the gridline grid reg actually offer over the pixel reg?

Quarter-size corner grid cell, half-size edge cells… I am surely missing something important.

---

<div class="post-metadata">

**Author:** ![Andreas](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@Andreas](https://forum.generic-mapping-tools.org/u/Andreas)\
**Post date:** [April 21, 2026, 10:28am UTC](https://forum.generic-mapping-tools.org/t/change-default-grid-format-from-netcdf-to-geotiff/6404/9 "2026-04-21T10:28:44Z")

</div>

Note: (at least) **grdmath** picks up **IO\_GRIDFILE\_FORMAT** in `gmt.conf`, so it does not just apply to **grdconvert**.
