Matlab slowing down while reading netcdf (in for loop)

4 ビュー (過去 30 日間)
oceanmod
oceanmod 2020 年 2 月 11 日
編集済み: per isakson 2021 年 5 月 31 日
This seems to be a problem that has cropped up once or twice on this forum but I am not sure I saw a satisfactory answer. I am reading many netcdf files in a for loop using ncread. With each successive iteration, matlab slows down considerably and is crawling by iteration 4 or 5. Within each iteration, I am doing the following:
(i) Read four 3d matrices that are not even huge (122x122x62)
(ii) Read two 2d matrices (122x122)
(iii) A few calculations
(iv) No figures
And that's it! Any help is appreciated.
PS: I will try reading using netcdf.getVar instead of ncread to see if that makes a difference.
  20 件のコメント
Dardag
Dardag 2020 年 5 月 19 日
I was using NCO before, perhaps I should return to just using that.
I work with curvilinear grid and ncks works for that like you said.
Themistoklis Chronis
Themistoklis Chronis 2021 年 5 月 30 日
hey guys did you find a solution to this? I have an identical problem. MATLAB starts crawling after opening a couple of hundred netcdf files...

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeNetCDF についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by