a question with netcdf

Discussion about analysis, visualization, and collaboration tools and techniques

Moderators: arango, robertson

Post Reply
Message
Author
slvester
Posts: 32
Joined: Mon Jun 01, 2009 12:59 pm
Location: second institution of oceanography,state oceanic administration China

a question with netcdf

#1 Unread post by slvester »

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

hyy
Posts: 17
Joined: Wed Apr 22, 2009 6:01 pm
Location: National Institute for Environmental Studies

Re: a question with netcdf

#2 Unread post by hyy »

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

slvester
Posts: 32
Joined: Mon Jun 01, 2009 12:59 pm
Location: second institution of oceanography,state oceanic administration China

Re: a question with netcdf

#3 Unread post by slvester »

slvester wrote:You should define 'mode' when you want to open NetCDF file like follows;
nc=netcdf('ncfile', 'nowrite')
Thank you hyy!I know you mean.But the question is the same
>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

slvester
Posts: 32
Joined: Mon Jun 01, 2009 12:59 pm
Location: second institution of oceanography,state oceanic administration China

Re: a question with netcdf

#4 Unread post by slvester »

ok,thanks!
Now it is ok,but i still don't know the really reason for this question.

Post Reply