MGD77 format (.a77) with pygmt

Hello everyone!
I have this question:
How can I open a MGD77 format (.a77) file with pygmt? it is already posible?

I would like to use data from but it is has this format.

if somebody knows how can I open MGD77 format file with python I would really apreciate it.

I think it is plain text.

I’m not familiar with the MGD77 format though I see it mentioned in the GMT docs sometimes. Could you post the first few lines using head file.a77 perhaps? PyGMT should be able to handle any file that GMT can handle (if not, it’s a bug).

In terms of ‘opening’ a file, PyGMT doesn’t really do just file opening and reading by itself. What you can do though, is to pass the filename of your MGD77 file as a string (e.g. /path/to/file.a77) to a PyGMT module (e.g. grdtrack, info, etc). The PyGMT function should be able to read the input data and run whatever data processing task the module does on that file just like in GMT.

That said, if you do want to ‘open’ the file and read the contents, try something like pandas.read_table to read it into a dataframe table. Let us know if any of that helps :smiley: