how to read a time series data at a particular (x, y) grid cell in a netcdf file

조회 수: 1 (최근 30일)
Kuo-Hsien
Kuo-Hsien 2013년 4월 25일
댓글: Damith 2014년 3월 26일
Dear all,
The netcdf file was composited a dimension of x = 570 and y = 480.
How to extract a time series data at a particular grid cell in Matlab?
I've tried the nctoolbox, however the results are not identical with that in ncview. (ps. I guess the nctoolbox regard the (x, y) is the real longitude and latitude!?) So, I need to find the other solutions. Please see the attached the file at http://db.tt/WIqIt2u1
Please help me on this.
Thanks a lot.
Michael

답변 (1개)

Ashish Uthama
Ashish Uthama 2013년 4월 25일
편집: Ashish Uthama 2013년 4월 25일
Look at ncread (and ncdisp) if your version of MATLAB had it.
% time series of lon 120, lat 250
tpix = squeeze(ncread('/tmp/wetd.mon.nc','wetd',[120, 250, 1, 1], [1,1,1,12]))
tpix =
10.8050
8.4050
8.9470
6.0860
9.6200
11.8550
13.4120
11.5200
10.4780
7.6780
10.1200
9.4700
  댓글 수: 1
Damith
Damith 2014년 3월 26일
hi,
I wanted to extract data using a netCDF file for a selected lat and long coordinate but this code did not work. Please see the attached file.
Any help is appreciated.
Thanks.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 NetCDF에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by