How to make a file size smaller when export as a netcdf?

8 ビュー (過去 30 日間)
hinami
hinami 2021 年 1 月 15 日
回答済み: KSSV 2021 年 1 月 15 日
Hi all,
I'd like to export data as a netcdf file. Below is an example code:
dc=5000;dl=5000;
data=rand(dc,dl);
nccreate('test.nc','sample','Dimensions',{'r',dc,'c',dl},'DeflateLevel',6);
ncwrite('test.nc','sample',data);
Here, the file size of 'test.nc' is about 200 MB - this is too big. Could anyone tell me a way to make the file smaller?
Thanks

採用された回答

KSSV
KSSV 2021 年 1 月 15 日
Convert the variables to single and then write to nc file. Read about Single.

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by