フィルターのクリア

Extracting variable data at specified location from .nc file

3 ビュー (過去 30 日間)
Sophia
Sophia 2022 年 8 月 7 日
編集済み: Walter Roberson 2022 年 8 月 7 日
I am trying to extract variable data from a .nc file off the server
How do I specify the location by i and j

採用された回答

Walter Roberson
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 件のコメント
Sophia
Sophia 2022 年 8 月 7 日
That worked great thanks so much!
I need to create a loop whereby I add one day onto the initial file (01/11/21) - there are files on the server for each day
This is so that i can extract the same data for each day over the course of a month (Nov 2021) - into a matrix
Do you have any ideas on how to go about this? I am unsure how to do this from a server file
Walter Roberson
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 ExchangeManage Products についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by