Effacer les filtres
Effacer les filtres

Need to save subset of netCDF file

4 vues (au cours des 30 derniers jours)
John
John le 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..

Réponse acceptée

John
John le 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 commentaire
John
John le 28 Sep 2012
Thank you. I may give this a try later on, but have found a workaround to my problem.

Connectez-vous pour commenter.

Plus de réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by