https://github.com/fatiando/magali/blob/main/magali/_input_output.py The function also supports netcdf.