フィルターのクリア

Remove data from 4D .netcdf files through a for loop

1 回表示 (過去 30 日間)
Mario
Mario 2021 年 1 月 13 日
コメント済み: Ayush 2023 年 3 月 3 日
Hi,
I am wondering if anyone could help me to find a practical, and fast, solution to remove "layers" from .netcdf files that have 4 dimensions. Specifically, my files have size (X, Y, Z, Time):
The original size is: 360x180x33x1980
and my goals is to reduce the 3rd dimension (Z), leaving me a new file with size: 360x180x10x1980
Here I would like to keep the first 10 (Z) layers and remove layers 11 to 33. Then save the file with the same name.
I have hundreds of files where I need to do the same removal, so ideally I would like to find a solution where I can use the script through a loop.
Thank you for your help in advance!
  1 件のコメント
Ayush
Ayush 2023 年 3 月 3 日
You can do this using MATLAB's built-in ncread and ncwrite functions.
You can read more about it from the links below:

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

回答 (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