Combining multiple Netcdf files

1 回表示 (過去 30 日間)
LEwart
LEwart 2017 年 5 月 3 日
編集済み: Mudambi Srivatsa 2017 年 5 月 9 日
I have seven Netcdf files (*.nc) each with identical structures, dimensions, variables and attributes. Each file has the following dimensions and dimensions sizes:
dimensions:
WaveHeights = 1;
Periods = 16;
Damping = 1;
Friction = 1;
Bodynumber = 18;
Each file gives the results of a physical model test, each run with a different "Damping" value. I would like to combine the seven files into a single file - so instead of having seven files each with a Damping = 1, I would like a single file with a Damping = 7. Can anyone tell me how I can do this?
Thank you

回答 (1 件)

Mudambi Srivatsa
Mudambi Srivatsa 2017 年 5 月 9 日
編集済み: Mudambi Srivatsa 2017 年 5 月 9 日
One way to achieve that would be to create a new file with the existing schema (structures, dimensions, variables and attributes) of old files using "ncwriteschema".
Then you can write data to this newly created file using "ncwrite".
https://www.mathworks.com/help/matlab/ref/ncwrite.html

カテゴリ

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