Converting nc files to geotiff. Is it still possible?


After a long hiatus working on other things, I’m back to gmt6.

I am trying to convert a *.nc file output from surface to a geotiff but don’t seem to be able to do that anymore with gdal or ogr2ogr. Either my memory (and code) are flaky or things have changed with gdal/ogr.

Can anyone advise me as to the current state-of-play in the conversion wars? None of my old methods seem to work.


Recent versions of GDAL no longer read the older GMT NetCDF grid formats. I found that I had to use GMT to read some of my older grids and save them again to get GMT to write them into a modern NetCDF file that GDAL can read. An easy trick is to use “grdmath oldGrd 1 MUL = newGrd”.



gdal_translate file.tif


gmt grdconvert -Gfile.tif=gdal:GTIFF


Or write the grid directly in geotiff

it’s -Gfile.tif=gd:GTiff, not -Gfile.tif=gdal:GTIFF

1 Like

Right, sorry.

Mahalo for the replies. I’ll try them all.

Negative. Does not work.

grdconvert works.