Aloha.
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.
J.
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”.
2 Likes
Does
gdal_translate file.nc file.tif
Or
gmt grdconvert file.nc -Gfile.tif=gdal:GTIFF
work?
it’s -Gfile.tif=gd:GTiff
, not -Gfile.tif=gdal:GTIFF
1 Like
Mahalo for the replies. I’ll try them all.
J.