📜  如何使用 xarray 写入 netcdf 文件 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:46.473000             🧑  作者: Mango

代码示例1
#import xarray
import xarray as xr

ds = xr.open_dataset(file_name.nc)

#by now you may have performed some computations and ds is a new dataset

ds.to_netcdf('/directory_to_file/file_name.nc', format='NETCDF4_CLASSIC')