how to read nc file ?
Afficher commentaires plus anciens
hi i have nc file which contain world ocean salinity data at various depth. i can collect lat(180) lon(360) data since it is vectors. but salinity data is in 3d format with depth. i.e. 360*180*102 double, means data 360*180 points at one level and there are 102 levels. i am not able see that file because it is crossing the display limit. i want to collect salinity data at only one level. so i can plot it in 2D. i wish i could get the data at specific level.
i have downloaded the file from :
4 commentaires
Walter Roberson
le 18 Sep 2017
"because it is crossing the display limit"
Do you mean that you are getting the message in the variable browser about being unable to display arrays of more than some large number of elements? If so then that does not prevent you from indexing the parts of the array you want to look at.
per isakson
le 18 Sep 2017
Modifié(e) : per isakson
le 18 Sep 2017

Try
s_mn = ncread('h:\m\cssm\woa13_A5B2_s01_04v2.nc','s_mn');
whos s_mn
image(s_mn(:,:,50))
colorbar

Is this in the right direction?
KSSV
le 19 Sep 2017
Have a look on this tool: https://www.giss.nasa.gov/tools/panoply/. Reading nc files is easy in MATLAB. It depends on want you want to do with the data.
pruth
le 23 Sep 2017
Réponses (0)
Catégories
En savoir plus sur Oceanography and Hydrology dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!