extracting variable for specific time from netCDF

조회 수: 1 (최근 30일)
Tanziha Mahjabin
Tanziha Mahjabin 2020년 1월 29일
Hi,
I want to cut some time from a bid data, using ncread(source,varname,start,count).
for your information,
UCUR_sd
Size: 69x69x45588
Dimensions: J,I,TIME
Datatype: single
Attributes:
long_name = 'Standard deviation of sea water velocity U component values in 1 hour.'
units = 'm s-1'
valid_min = -10
valid_max = 10
cell_methods = 'TIME: standard_deviation'
coordinates = 'TIME LATITUDE LONGITUDE'
_FillValue = 999999
ancillary_variables = 'NOBS1 NOBS2 UCUR_quality_control'
Now if i write, u=ncread(ncfile,'UCUR',[1 1 1],[Inf Inf 44931]); it takes the command as the start time is from the start.
But what should i write if i want cut the time from somewhere middle?
I tried to define index,
ind=find(time>=datenum(2017,02,16,0,0,0)&time<=datenum(2017,02,17,0,0,0))
u=ncread(ncfile,'UCUR',[1 1 ind],[Inf Inf 44931]);
But it is not working. Any helpful suggestion please.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Import and Export에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by