File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -24,9 +24,14 @@ Breaking changes
2424
2525New Features
2626~~~~~~~~~~~~
27+
28+ - Support new h5netcdf backend keyword `phony_dims ` (available from h5netcdf
29+ v0.8.0 for :py:class: `~xarray.backends.H5NetCDFStore `.
30+ By `Kai Mühlbauer <https://github.com/kmuehlbauer >`_.
2731- implement pint support. (:issue: `3594 `, :pull: `3706 `)
2832 By `Justus Magin <https://github.com/keewis >`_.
2933
34+
3035Bug fixes
3136~~~~~~~~~
3237- Use ``dask_array_type `` instead of ``dask_array.Array `` for type
Original file line number Diff line number Diff line change 11import functools
2+ from distutils .version import LooseVersion
23
34import numpy as np
45
@@ -117,13 +118,22 @@ def open(
117118 lock = None ,
118119 autoclose = False ,
119120 invalid_netcdf = None ,
121+ phony_dims = None ,
120122 ):
121123 import h5netcdf
122124
123125 if format not in [None , "NETCDF4" ]:
124126 raise ValueError ("invalid format for h5netcdf backend" )
125127
126128 kwargs = {"invalid_netcdf" : invalid_netcdf }
129+ if phony_dims is not None :
130+ if LooseVersion (h5netcdf .__version__ ) >= LooseVersion ("0.8.0" ):
131+ kwargs ["phony_dims" ] = phony_dims
132+ else :
133+ raise ValueError (
134+ "h5netcdf backend keyword argument 'phony_dims' needs "
135+ "h5netcdf >= 0.8.0."
136+ )
127137
128138 if lock is None :
129139 if mode == "r" :
You can’t perform that action at this time.
0 commit comments