extracting variable for specific time from netCDF
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 NetCDF 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!