Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issues when reading a .nc file

Tags:

matlab

I got this .nc file. However, when I read the file like this

ncid = netcdf.open(ncfile)

It gives me only a number. It was supposed to contain some data. I am not sure what's wrong with it.
Can anyone please provide some information?

like image 597
user34790 Avatar asked Dec 16 '25 17:12

user34790


1 Answers

According to the documentation, netcdf.open only returns the NetCDF ID, not the data:

ncid = netcdf.open(source) opens source, which can be the name of a NetCDF file or the URL of an OPeNDAP NetCDF data source, for read-only access. Returns a NetCDF ID in ncid.

You probably want to use ncread.

like image 170
am304 Avatar answered Dec 19 '25 13:12

am304



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!