How can I merge two netCDF files?

5 ビュー (過去 30 日間)
Luis Caja
Luis Caja 2021 年 7 月 15 日
回答済み: KSSV 2021 年 7 月 15 日
Good morning for all.
I am trying to merge two netCDF files in one. One of the files has data from 26 of February to 28 February and the other has data from 28 February to 2 March, both from 2020. I am trying to create a new one from 26 February to 2 March. I have tried to merge with ncwriteschema and ncinfo but it doesnt what I want to do.
I am attaching the prove that I have done
I hope that you can help me.
Write me if you need the files
Thank you
Greetings
  2 件のコメント
KSSV
KSSV 2021 年 7 月 15 日
編集済み: KSSV 2021 年 7 月 15 日
One option is read each file's data and write a new one.
Luis Caja
Luis Caja 2021 年 7 月 15 日
Hi.
Can you explain me a bit how can i do that?
Thanks

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

回答 (1 件)

KSSV
KSSV 2021 年 7 月 15 日
To read ncfile data, just you need to know only two functions,
  1. ncdisp - this will give you information about what variables are present in the file, which will be later useful to read.
  2. ncread - this is used to read the variables into MATLAB.
To write data into ncfile, you need to know just two functions.
  1. nccreate - this is used to create a variable name and dimensions needed.
  2. ncwrite - this is used to write the data into creted variable.
You try out with these function. If not successfull you are welcome.

カテゴリ

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

タグ

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by