Hello everyone,recently I have encoutered a strange question about netcdf;
in matlab;
>nc=netcdf('ncfile');(for example nc=netcdf('NECP_landmask.nc'))
Index exceeds the matrix dimensions
I just want to open the netcdf file ,and even the file is not so big.
I do no know anything abot the question .
the Linux netcdftoolbox I have been installed successful.and the nudump is ok,maybe only the netcdf is not ok
Can you help me?
thaks
a question with netcdf
-
- Posts: 17
- Joined: Wed Apr 22, 2009 6:01 pm
- Location: National Institute for Environmental Studies
Re: a question with netcdf
Hi slvester
> recently I have encoutered a strange question about netcdf; in matlab;
> >nc=netcdf('ncfile');(for example nc=netcdf('NECP_landmask.nc'))
> Index exceeds the matrix dimensions
> I just want to open the netcdf file ,and even the file is not so big.
> I do no know anything abot the question .
> the Linux netcdftoolbox I have been installed successful.and the nudump is ok,maybe only the
> netcdf is not ok
According to "NetCDF Toolbox Interface Descriptions":
http://mexcdf.sourceforge.net/netcdf_to ... guide.html
You should define 'mode' when you want to open NetCDF file like follows;
nc=netcdf('ncfile', 'nowrite')
I don't know whether this answer is correct or not, but why not trying?
Cheers, Hiroshi
> recently I have encoutered a strange question about netcdf; in matlab;
> >nc=netcdf('ncfile');(for example nc=netcdf('NECP_landmask.nc'))
> Index exceeds the matrix dimensions
> I just want to open the netcdf file ,and even the file is not so big.
> I do no know anything abot the question .
> the Linux netcdftoolbox I have been installed successful.and the nudump is ok,maybe only the
> netcdf is not ok
According to "NetCDF Toolbox Interface Descriptions":
http://mexcdf.sourceforge.net/netcdf_to ... guide.html
You should define 'mode' when you want to open NetCDF file like follows;
nc=netcdf('ncfile', 'nowrite')
I don't know whether this answer is correct or not, but why not trying?
Cheers, Hiroshi
-
- Posts: 32
- Joined: Mon Jun 01, 2009 12:59 pm
- Location: second institution of oceanography,state oceanic administration China
Re: a question with netcdf
Thank you hyy!I know you mean.But the question is the sameslvester wrote:You should define 'mode' when you want to open NetCDF file like follows;
nc=netcdf('ncfile', 'nowrite')
>nc=netcdf('NCEP_landmask.nc','nowrite')
Index exceeds the matrix dimensions
and even
>nc=netcdf('NCEP_landmask.nc','w')
Index exceeds the matrix dimensions
I don no konw why? I just want to open the nc file,and edit it.
may be the nctoolbox I haven't instlled successful.But everything is ok except the 'netcdf'
help
-
- Posts: 32
- Joined: Mon Jun 01, 2009 12:59 pm
- Location: second institution of oceanography,state oceanic administration China
Re: a question with netcdf
ok,thanks!
Now it is ok,but i still don't know the really reason for this question.
Now it is ok,but i still don't know the really reason for this question.