Usage: pgkyl select [OPTIONS]
Select part of a dataset by coordinate (``z0``-``z5``) and/or component.
Each selector accepts an int index, a float coordinate value, or a slice string
``"start:end"``; ``comp`` additionally accepts ``"a,b"``. Unspecified axes are kept in
full. The selected dimension is retained (length-1), matching the legacy behaviour.
Floats snap to the nearest stored point, or cell center on an edge grid; ties choose
the first index and out-of-domain coordinates snap to an endpoint. No values are
evaluated or interpolated. Modal DG selection copies whole cells with every
coefficient unchanged. ``comp`` on modal DG data selects whole physical fields,
retaining each field's complete basis coefficient block. Slice stops are exclusive.
A curvilinear axis (a multi-dimensional grid array, produced by ``.map()`` with
``space="conf"``) has no single 1-D coordinate array of its own to search -- a
coordinate value or slice string is resolved against a 1-D cross-section instead
(:func:`_curvilinear_coord_curve`), holding every other axis of the same mapped block
at cell 0, *unless* that axis was already narrowed to a single cell by an earlier
selector -- either in this same call, or in a prior ``select()`` call in the chain
(recorded the only place it needs to be: the dataset's own values shape). Selecting
one axis of a block also narrows every sibling axis' grid array along that same
relative axis, so the block stays internally consistent and a later selector on a
sibling sees the narrowed cross-section rather than the original full extent. If the
array still varies along an as-yet-unresolved sibling axis (a genuinely non-separable
map, e.g. a rotation), the coordinate/slice selector has no single answer and raises
-- pick an integer index for that sibling axis first (in the same call, or an earlier
one in the chain).
Options:
-c, --comp TEXT Component selector such as ``"0"``, ``"0:3"``, or ``"0,2"``.
-z, --z0 TEXT Selector for coordinate direction 0.
--z1 TEXT Selector for coordinate direction 1.
--z2 TEXT Selector for coordinate direction 2.
--z3 TEXT Selector for coordinate direction 3.
--z4 TEXT Selector for coordinate direction 4.
--z5 TEXT Selector for coordinate direction 5.
-i, --inplace [BOOLEAN] Mutate and return ``data`` instead of creating a dataset.
[default: False]
-t, --tag TEXT Optional tag for the returned dataset.
-l, --label TEXT Optional label for the returned dataset.
--help Show this message and exit.