# Img2grd problem with topo\_24.1.img

**URL:** <https://forum.generic-mapping-tools.org/t/img2grd-problem-with-topo-24-1-img/3539>\
**Category:** Q&A\
**Created:** [December 13, 2022, 12:09am UTC](https://forum.generic-mapping-tools.org/t/img2grd-problem-with-topo-24-1-img/3539 "2022-12-13T00:09:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hellyj](https://avatars.discourse-cdn.com/v4/letter/h/82dd89/32.png) [@hellyj](https://forum.generic-mapping-tools.org/u/hellyj)\
**Post date:** [December 13, 2022, 12:09am UTC](https://forum.generic-mapping-tools.org/t/img2grd-problem-with-topo-24-1-img/3539/1 "2022-12-13T00:09:52Z")

</div>

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]

---

<div class="post-metadata">

**Author:** ![pwessel](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/pwessel/32/30_2.png) [@pwessel](https://forum.generic-mapping-tools.org/u/pwessel)\
**Post date:** [December 13, 2022, 11:26am UTC](https://forum.generic-mapping-tools.org/t/img2grd-problem-with-topo-24-1-img/3539/2 "2022-12-13T11:26:55Z")

</div>

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**

---

<div class="post-metadata">

**Author:** ![hellyj](https://avatars.discourse-cdn.com/v4/letter/h/82dd89/32.png) [@hellyj](https://forum.generic-mapping-tools.org/u/hellyj)\
**Post date:** [December 13, 2022, 9:41pm UTC](https://forum.generic-mapping-tools.org/t/img2grd-problem-with-topo-24-1-img/3539/3 "2022-12-13T21:41:49Z")

</div>

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.
