Img2grd problem with topo_24.1.img

Aloha.
This is embarrassing but I’m just getting back to gmt6 and updated to Dave’s latest topo and can’t figure out how to read it. I’ve seen JL’s comments about img2grd NEEDs a grid type so I’ve tried adding =ni, =nd on the output grid but I don’t understand what to specify to make it happy. I’m reusing some old code so I suspect its a GMT6-thing but I can’t grok it.

gmt6 img2grd topo_24.1.img -R-156.843/-155.858343/20.4/21.50 -GHI_Maui_Background.nc=ni -T1 -S1 -m1 -D -V -n+c

grdproject (gmtapi_export_grid): Not a supported grid format [HI_Maui_Background.nc=ni]

Hi John sorry cannot reproduce. I happened to have grav_23.1.img here and used that instead and no errors and output in expected format:

HI_Maui_Background.nc: Grid file format: ni = GMT netCDF format (32-bit integer), CF-1.7

t turns out that I specified the path incorrectly and there was a missing directory in the path for the output file (-G). So it seems that error case is being aliased with the ‘invalid format’ case. I corrected the path and it works fine now.