Stack nc files of 100 years

I have four nc files and each nc file is daily and three variables are there lat,lon and RF. I have to stack 2000 nc files like that.How can we stack them.

10 Comments

What is an "nc file" and what do you mean by "stacking"?
format your question and tell how you like that?
per isakson
per isakson on 19 Mar 2016
Edited: per isakson on 19 Mar 2016
"What is an "nc file" ... " &nbsp most likely NetCDF
Ya netcdf files.I want to append them in matlab.
per isakson
per isakson on 20 Mar 2016
Edited: per isakson on 20 Mar 2016
It's not clear to me what you mean by "to stack 2000 nc files" and "to append them in matlab".
You can inspect, ncdisp, and read, ncread, the data stored in the NetCDF files. And with the data in Matlab there are many possibilities. However, to get help here you need to give more background and more specfic questions. What specific problems do you encounter?
Tell the format of nc files.......else attach the files...it is pretty straight forward to create nc file in MATLAB.
Sir I have 100 netcdf files.Daily rainfall values.They contain latitude,Longitude and rainfall.I want to append the nc files so that one nc file contain 100 daily rainfall value.
What kind of answer do you expect us to give based on the meager description of the problem?
"each nc file is daily and three variables" &nbsp means that the files are small and that probably all data fits in memory
"Daily rainfall values" &nbsp I assume you want to create some kind of time series.
I can scribble down a pseudocode based on the information I have.
create a list of the filespecs
sort the list with respect to time
loop over all filespecs in time order
read data from filespec
write data to target file
end loop
but that's about all. Why should I start guessing about things you know? (The details on reading and writing NetCDF files are in the documentation.)
KSSV
KSSV on 22 Mar 2016
Edited: per isakson on 22 Mar 2016
All the 100 nc files have the same format? Do they have same lat, lon? At least attach one nc file.
Yes sir.All the files have same format.

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!