How to convert dat to gmt

Skip to first unread message

Juan Diaz-Naveas

May 23, 2021, 4:02:54 PM5/23/21
to mirone
Dear Joaquim,

I would like to use gmtedit, but because the module to convert .dat files to .gmt files is not longer available in GMT I don't know how to input my data, which consists of lon, lat, depth values.

I tried  using gmt convert on GMT6.2, but I don't know what type of fields is gmtedit expecting and Mirone sent the message:

An error occurred in the callback : mirone('GeophysicsImportGmtFile_CB',guidata(
The error message caught was      : A memory allocation request failed.

I edit the file OPTcontrol.txt and inserted the line MIR_GMTEDIT -Vlon,lat,depth, but it doesn't work either.

Any help will be very much appreciated.

Best wishes

Juan Diaz-Naveas

Joaquim Manuel Freire Luís

May 23, 2021, 7:13:44 PM5/23/21

Hi Juan


It’s been a while since I last used the old .gmt format. I have somewhere a matlab program to convert to .gmt but this format needs also date and time besides the lon, lat, GMT

I think the option you have is to use the new netCDF format provided by the mgd77 GMT supplement. gmtedit can read those nc files as well.


Best regards



You received this message because you are subscribed to the Google Groups "mirone" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Juan Diaz-Naveas

May 25, 2021, 10:18:34 AM5/25/21
to mirone
Dear Joaquim,

Thank you very much for your hints. After reading GMT's MGD77 documentation I managed to create the .nc files and to load them into Mirone's gmtedit.

However, there was something that didn't worked (although this point is not related to Mirone but to GMT). I could not produce MGD77 headers with the mgd77header comand:

# gmt mgd77header AMLR90T -HAMLR90.txt -Mf -V > AMLR90T.h77
mgd77header [INFORMATION]: Now processing cruise AMLR90T
mgd77header [ERROR]: NetCDF: Not a valid ID

Do you have any idea about what is going on here?

Best wishes

Juan Diaz-Naveas
Reply all
Reply to author
0 new messages