Need to save subset of netCDF file

8 views (last 30 days)
John
John on 27 Sep 2012
I have a netCDF file that has 21 variables (some variables are 3 dimensional) and contains global data (800+MB). I only need data for an area about 1/8 of the globe. Is there a way to open the file, and then save just a portion of it to a new netCDF file? If you could give me an example using lat, lon, temp, height I could take it from there. Lat(721x1), lon(1152x1), temp(1152x721x72x1), height(same as temp).
Thanks for any help..

Accepted Answer

John
John on 27 Sep 2012
If you have R2011a or more recent, look at the 2nd example for NCWRITESCHEMA. It is at least similar to what you want to do. In your case you will want to modify the Dimensions fields before writing the schema back out to the new file.
  1 Comment
John
John on 28 Sep 2012
Thank you. I may give this a try later on, but have found a workaround to my problem.

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!