フィルターのクリア

How to save the results of NetCDF as .nc file?

14 ビュー (過去 30 日間)
Jitesh Dadich
Jitesh Dadich 2019 年 4 月 10 日
コメント済み: Jitesh Dadich 2019 年 5 月 9 日
Hi all,
I have a .nc file containing lat, lon, time, and values of parameters.
After applying my conditions, i get the values of parameters in same [x y t] dimension, now i want to save my outputs as a different nc file having same lat, lon and time as it had before.
How to do it... could anyone help me?

採用された回答

ANKUR KUMAR
ANKUR KUMAR 2019 年 5 月 9 日
You can use nccreatewrite function to create a nc file having all the required variables. Example:
lon=(65:0.5:95)';
lat=(3:0.5:35)';
data=randi(20,65,61,365);
nccreatewrite('test1.nc','lat',{'lat','c'},lat)
nccreatewrite('test1.nc','lon',{'lon','c'},lon)
nccreatewrite('test1.nc','TC',{'lat','lon','days'},data)
The files created by matlab (either from this funciton or from the basic matlab function) won't work in grads. You have to write the descriptor file for the MATLAB created nc file.
  1 件のコメント
Jitesh Dadich
Jitesh Dadich 2019 年 5 月 9 日
Thank you @Ankur kumar....it really worked well...

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

その他の回答 (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