|
|
Re: Reading large data files of Netcdf
Posted:
Mar 8, 2013 2:47 AM
|
|
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.
|
|