how to read nc file ?
이전 댓글 표시
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
Walter Roberson
2017년 9월 18일
"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
2017년 9월 18일
편집: per isakson
2017년 9월 18일

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
2017년 9월 19일
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
2017년 9월 23일
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Data Import and Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!