Skip to content
Snippets Groups Projects
Commit 71533523 authored by Frisinghelli Daniel's avatar Frisinghelli Daniel
Browse files

Set time encoding: calendar.

parent 6382ec11
No related branches found
No related tags found
No related merge requests found
...@@ -176,6 +176,9 @@ if __name__ == '__main__': ...@@ -176,6 +176,9 @@ if __name__ == '__main__':
# read multiple netcdf files using xarray and dask # read multiple netcdf files using xarray and dask
ds = xr.open_mfdataset(group, parallel=True).compute() ds = xr.open_mfdataset(group, parallel=True).compute()
# set encoding of time: calendar
ds.time.encoding = ds.time_bnds.encoding
# save aggregated netcdf file # save aggregated netcdf file
LOGGER.info('Saving aggregated NetCDF: {}'.format(filename)) LOGGER.info('Saving aggregated NetCDF: {}'.format(filename))
ds.to_netcdf(filename) ds.to_netcdf(filename)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment