Answers for "how to write to a netcdf file using xarray"

0

how to write to a netcdf file using xarray

#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')
Posted by: Guest on January-24-2021

Code answers related to "how to write to a netcdf file using xarray"

Python Answers by Framework

Browse Popular Code Answers by Language