Extracting variable data at specified location from .nc file
조회 수: 3 (최근 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!