-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow selection of one or more members in an ensemble dataset (#156)
* select one of more members in an ensemble zarr
- Loading branch information
Showing
8 changed files
with
130 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ds = open_dataset( | ||
dataset, | ||
number=1, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ds = open_dataset( | ||
dataset, | ||
number=[1, 3, 5], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
.. _selecting-members: | ||
|
||
################### | ||
Selecting members | ||
################### | ||
|
||
This section describes how to subset data that are part of an ensemble. | ||
To combine ensembles, see :ref:`ensembles` in the | ||
:ref:`combining-datasets` section. | ||
|
||
.. _number: | ||
|
||
If a dataset is an ensemble, you can select one or more specific members | ||
using the `number` option. You can also use ``numbers`` (which is an | ||
alias for ``number``), and ``member`` (or ``members``). The difference | ||
between the two is that ``number`` is **1-based**, while ``member`` is | ||
**0-based**. | ||
|
||
Select a single element: | ||
|
||
.. literalinclude:: code/number1_.py | ||
:language: python | ||
|
||
... or a list: | ||
|
||
.. literalinclude:: code/number2_.py | ||
:language: python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters