Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Reading large data files of Netcdf
Replies: 4   Last Post: Mar 11, 2013 1:21 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Shaik Ghouse Basha

Posts: 26
Registered: 6/15/09
Re: Reading large data files of Netcdf
Posted: Mar 11, 2013 1:21 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

yes Sir, my data is 4D with latitude, longitude, time and 20 pressure levels. I tried your command as mentioned previously but it is not working. please help me to get out of this problem

ideMan <mulgor@gmail.com> wrote in message <ca09a529-06d9-4c46-bb95-31cbaa8bb28c@googlegroups.com>...
> On Friday, March 8, 2013 5:54:06 PM UTC+13, Shaik Ghouse Basha wrote:
> > Dear Sir, I am trying to read data through netcdf and getnc
> >
> > ncid=netcdf.open(a,'NC_NOWRITE');
> >
> > [varname, xtype, varDimIDs, varAtts]=netcdf.inqVar(ncid,0);
> >
> > varid=netcdf.inqVarID(ncid,varname);
> >
> > data=netcdf.getVar(ncid,varid);
> >
> >
> >
> > % la=getnc(a,'lat');
> >
> > % lo=getnc(a,'lon');
> >
> > % le=getnc(a,'level');
> >
> > % ti=getnc(a,'time');
> >
> > % % tim=getnc(a,'time_bands');
> >
> > % tt=getnc(a,'air');
> >
> > Please help me how to read this data. please tell how to read this data by splitting...
> >
> >
> >
> > Thanking you sir
> >
> >
> >
> >
> >
> > TideMan <mulgor@gmail.com> wrote in message <a52ac249-7382-49e4-8852-9eda101245e6@googlegroups.com>...
> >

> > > On Thursday, March 7, 2013 7:26:05 PM UTC+13, Shaik Ghouse Basha wrote:
> >
> > > > Dear Friends, I am having 2 GB Netcdf file. when am reading this file its saying out of memory. Please help how to read large size of netcdf file in matlab.
> >
> > > >
> >
> > > > Thanking you
> >
> > >
> >
> > > How are you reading the file?
> >
> > > Show us your code.
> >
> > >
> >
> > > Don't try to read in all the data from the file at once.
> >
> > > Read them in in batches.
>
> I gather that your variable has 4 dimensions.
> Do you need all those data in core at once?
> Why not restrict it using the start and count arguments of getvar
> In my version, it would look like this:
> data=nc_varget(ncfile,varname,[0 0 0 0],[30 30 30 400]);
> to get the first 30 longitudes, latitudes and levels, and the first 400 times.
> Your version will have a similar facility. Read the manual.
>
> You need to think about what you're doing, not just blindly read in stuff you don't need.
>
> Also, don't top post. It makes the thread hard to follow.
> Put your reply UNDERNEATH.




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.