Stack nc files of 100 years
Show older comments
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
Jan
on 19 Mar 2016
What is an "nc file" and what do you mean by "stacking"?
Muhammad Usman Saleem
on 19 Mar 2016
format your question and tell how you like that?
per isakson
on 19 Mar 2016
Edited: per isakson
on 19 Mar 2016
"What is an "nc file" ... "   most likely NetCDF
Tanmoyee Bhattacharya
on 20 Mar 2016
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?
See   NetCDF Files   and   TUTORIAL: how to ask a question (on Answers) and get a fast answer
KSSV
on 21 Mar 2016
Tell the format of nc files.......else attach the files...it is pretty straight forward to create nc file in MATLAB.
Tanmoyee Bhattacharya
on 22 Mar 2016
per isakson
on 22 Mar 2016
Edited: per isakson
on 22 Mar 2016
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"   means that the files are small and that probably all data fits in memory
"Daily rainfall values"   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
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.
Tanmoyee Bhattacharya
on 22 Mar 2016
Answers (0)
Categories
Find more on NetCDF in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!