Extracting variable data at specified location from .nc file
2 次查看(过去 30 天)
显示 更早的评论
I am trying to extract variable data from a .nc file off the server
How do I specify the location by i and j
0 个评论
采纳的回答
Walter Roberson
2022-8-7
loc = [i j 1 1];
count = [1 1 inf inf];
varname = 'temp';
tempdata = ncread( ncfile, varname, loc, count);
However I do not know if ncread will be able tell the remote side what it wants to read, or if it has to read the whole thing and then select from it.
Also it would not surprise me if you need j i instead of i j
2 个评论
Walter Roberson
2022-8-7
编辑:Walter Roberson
2022-8-7
ncfile = sprintf('https://dapds00.nci.org.au/thredds/dodsC/fx3/gbr1_bgc_GBR1_H2p0_B3p2_Cfur_Dnrt/gbr1_bgc_simple_2021-11-%02d.nc', DAYNUMBER);
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Manage Products 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!