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

2 次查看(过去 30 天)
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.

请先登录,再进行评论。

Community Treasure Hunt

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

Start Hunting!

Translated by