Plotting A Magnetic Anomaly Map from a .grd file with grdread2

Hi,
I want to plot a magnetic anomaly map in Alaska with my data on top of it. I have downloaded the magnetic map from this URL: ftp://ftpext.usgs.gov/pub/cr/co/denver/musette/pub/open-file-reports/ofr-02-0414
Then, I am trying to plot this data on my map by using :
[mx, my]=grdread2('NAmag_origmrg.grd');
pb=surfm(my,mx);
However, after a while I get the following output error:
Error using netcdflib
The NetCDF library encountered an error during execution of 'open' function - 'Unknown file format (NC_ENOTNC)'.
Error in netcdf.open (line 67)
[varargout{:}] = netcdflib ( 'open', filename, varargin{1} );
Error in grdread2 (line 61)
ncid = netcdf.open(file, 'NC_NOWRITE');
Can anyone help me, please? I do not understand what format it is talking about, I cannot find these lines in the grdread2 function, and I cannot open the file I have downloaded with anything on my computer except by doing this.
Thank you in advance for your help.
Vince

1 Comment

Hi, were you able to solve this? I am having the same issue. If you were able to open the .grd file, please share. Thanks!

Sign in to comment.

Answers (0)

Products

Release

R2020a

Asked:

on 23 Jul 2020

Commented:

on 10 Jun 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!