parcels
parcels copied to clipboard
Updates properties for xarray API change
xarray.Dataset.dims
currently returns a dictionary mapping from dimension names to lengths. However, xarray
developers are seeking to change that behavior, instead returning a set with only dimension names and keeping the previous behavior in xarray.Dataset.sizes
. This change is planned to be implemented as soon as September, and deprecation warnings can already be found when running the code.
This PR changes dims
to sizes
in several locations in the core parcels code. Since xarray.Dataset.sizes
already replicates the current behavior of xarray.Dataset.dims
, this change should be fully backwards compatible.