Adds the methods Convention.selector_for_indexes(), Convention.select_indexes, and Convention.select_points(). These allow for more efficient extraction of multiple points at the same time. These are similar to their singular counterparts, but take lists of indexes or points instead.
This introduces some changes which are backwards incompatible. These incompatibilities are hopefully minor.
Convention.selector_for_indexes() is a new required abstract method, while Convention.selector_for_index() now has a default implementation. emsarray-smc will need updating (https://github.com/csiro-coasts/emsarray-smc/issues/2)
The return type of :meth:.Convention.selector_for_index() has been changed from a dict to an :class:xarray.Dataset, but this new value is also designed to be passed directly to :meth:Dataset.isel() <xarray.Dataset.isel>. The output of Convention.selector_for_index() has always been a convention-specific dict whos only purpose was to be passed to Dataset.isel(), now it is a convention-specific dataset whos only purpose is to be passed to Dataset.isel().
:meth:.Convention.select_index() and :meth:.Convention.select_indexes() have a new drop_geometry flag which defaults to True. Previously these methods would act as if drop_geometry was False, but this led to convention-dependent results as to which geometry variables were returned. The fragmented geometry variables from different conventions often did not contain enough data to be useful. By dropping geometry the results are more consistent across all conventions and do not contain potentially fragmented geometry information.
Adds the methods
Convention.selector_for_indexes()
,Convention.select_indexes
, andConvention.select_points()
. These allow for more efficient extraction of multiple points at the same time. These are similar to their singular counterparts, but take lists of indexes or points instead.This introduces some changes which are backwards incompatible. These incompatibilities are hopefully minor.
Convention.selector_for_indexes()
is a new required abstract method, whileConvention.selector_for_index()
now has a default implementation.emsarray-smc
will need updating (https://github.com/csiro-coasts/emsarray-smc/issues/2).Convention.selector_for_index()
has been changed from adict
to an :class:xarray.Dataset
, but this new value is also designed to be passed directly to :meth:Dataset.isel() <xarray.Dataset.isel>
. The output ofConvention.selector_for_index()
has always been a convention-specific dict whos only purpose was to be passed toDataset.isel()
, now it is a convention-specific dataset whos only purpose is to be passed toDataset.isel()
..Convention.select_index()
and :meth:.Convention.select_indexes()
have a newdrop_geometry
flag which defaults to True. Previously these methods would act as ifdrop_geometry
was False, but this led to convention-dependent results as to which geometry variables were returned. The fragmented geometry variables from different conventions often did not contain enough data to be useful. By dropping geometry the results are more consistent across all conventions and do not contain potentially fragmented geometry information.Fixes #106