-
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.
- Loading branch information
Showing
32 changed files
with
514 additions
and
368 deletions.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
# TODO |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
######### | ||
compare | ||
######### | ||
compare | ||
======= | ||
|
||
Use this command to compatre two datasets: | ||
Use this command to compare two datasets. | ||
|
||
.. code:: bash | ||
The command will run a quick comparison of the two datasets and output a summary of the differences. | ||
|
||
% anemoi-datasets compare dataset1.zarr dataset2.zarr | ||
.. warning:: | ||
|
||
This command will not compare the data in the datasets, only some of the metadata. | ||
Subsequent versions of this command may include more detailed comparisons. | ||
|
||
|
||
.. argparse:: | ||
:module: anemoi.datasets.__main__ | ||
:func: create_parser | ||
:prog: anemoi-datasets | ||
:path: compare |
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 |
---|---|---|
@@ -1,7 +1,27 @@ | ||
###### | ||
copy | ||
###### | ||
copy | ||
==== | ||
|
||
.. code:: bash | ||
|
||
% anemoi-datasets copy dataset1.zarr dataset2.zarr | ||
Copying a dataset from one location to another can be error-prone and time-consuming. | ||
This command-line script allows for incremental copying. | ||
When the copying process fails, it can be resumed. | ||
It can be used to copy files from a local directory to a remote server, from a remote server to a local directory as long as there is a zarr backend to read and write the data. | ||
|
||
The script uses multiple threads to make the process faster. | ||
However, it is important to consider that making parallel requests to the same server may not be ideal, for instance if the server internally uses a limited number of threads to handle requests. | ||
|
||
The option to rechunk the data is available, which can be useful when the data is stored on a platform that does not support having may small files or many file on the same directory. | ||
However keep in mind that rechunking has a huge impact on the performance when reading the data: | ||
The chunk pattern for the source dataset has been defined for good reasons, and changing it is very likey to have a negative impact on the performance. | ||
|
||
.. warning:: | ||
|
||
When resuming the copying process (using ``--resume``), calling the script with the same arguments for ``--block-size`` and ``--rechunk`` is recommended. | ||
Using different values for these arguments to resume copying the same dataset may lead to unexpected behavior. | ||
|
||
|
||
.. argparse:: | ||
:module: anemoi.datasets.__main__ | ||
:func: create_parser | ||
:prog: anemoi-datasets | ||
:path: copy |
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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
######## | ||
create | ||
######## | ||
create | ||
====== | ||
|
||
Use this command to create a dataset from a recipe file: | ||
Use this command to create a dataset from a recipe file. | ||
The syntax of the recipe file is described in :doc:`building datasets <../building/introduction>`. | ||
|
||
.. code:: bash | ||
% anemoi-datasets create recipe.yaml dataset.zarr | ||
.. argparse:: | ||
:module: anemoi.datasets.__main__ | ||
:func: create_parser | ||
:prog: anemoi-datasets | ||
:path: create |
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 |
---|---|---|
@@ -1,7 +1,27 @@ | ||
######### | ||
inspect | ||
######### | ||
inspect | ||
======= | ||
|
||
.. code:: bash | ||
|
||
% anemoi-datasets inspect dataset.zarr | ||
Anemoi datasets are stored in a zarr format and can be located on a local file system or on a remote server. | ||
The `inspect` command is used to inspect the contents of a dataset. | ||
This command will output the metadata of the dataset, including the variables, dimensions, and attributes. | ||
|
||
.. code:: console | ||
$ anemoi-datasets inspect dataset.zarr | ||
which will output something like the following. The output should be self-explanatory. | ||
|
||
.. literalinclude:: ../building/yaml/building1.txt | ||
:language: console | ||
|
||
********************* | ||
Command line usage | ||
********************* | ||
|
||
.. argparse:: | ||
:module: anemoi.datasets.__main__ | ||
:func: create_parser | ||
:prog: anemoi-datasets | ||
:path: inspect |
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 |
---|---|---|
@@ -1,23 +1,28 @@ | ||
############## | ||
Introduction | ||
############## | ||
Introduction | ||
============ | ||
|
||
When you install the `anemoi-datasets` package, this will also install | ||
command line tool called ``anamois-datasets`` this can be used to manage | ||
the zarr datasets. | ||
When you install the `anemoi-datasets` package, this will also install command line tool | ||
called ``anemoi-datasets`` which can be used to manage the zarr datasets. | ||
|
||
The tools can provide help with the ``--help`` options: | ||
The tool can provide help with the ``--help`` options: | ||
|
||
.. code:: bash | ||
.. code-block:: bash | ||
% anamoi-datasets --help | ||
% anemoi-datasets --help | ||
The commands are: | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:maxdepth: 1 | ||
|
||
create | ||
inspect | ||
copy | ||
compare | ||
compare | ||
copy | ||
create | ||
inspect | ||
scan | ||
|
||
.. argparse:: | ||
:module: anemoi.datasets.__main__ | ||
:func: create_parser | ||
:prog: anemoi-datasets | ||
:nosubcommands: |
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,10 @@ | ||
scan | ||
==== | ||
|
||
Use this command to scan for GRIB files | ||
|
||
.. argparse:: | ||
:module: anemoi.datasets.__main__ | ||
:func: create_parser | ||
:prog: anemoi-datasets | ||
:path: scan |
Oops, something went wrong.