Command line tool¶
Installing climetlab also make available the climetlab
utility command line interface.
Usage¶
$ climetlab <command> [options]
$ climetlab
(climetlab) <command> [options]
Interactive prompt¶
climetlab
Running the climetlab
command with no argument starts the
interactive prompt. Autocompletion is enabled on the interactive
prompt. To exit the interactive prompt use Control+D.
$ climetlab (climetlab) <command> [options] (climetlab)
benchmark (experimental)¶
Usage¶
climetlab benchmark [-h] [--indexedurl] [--all]Run predefined benchmarks, for CliMetLab development purposes.
Optional arguments¶
-h, --help show this help message and exit --indexedurl Benchmark on using indexed URL (byte-range) and various servers. --all Run all benchmarks.
cache¶
Usage¶
climetlab cache [-h] [--json] [--all] [--path] [--sort KEY] [--reverse] [--match STRING] [--newer DATE] [--older DATE] [--accessed] [--larger SIZE] [--smaller SIZE]Cache command to inspect the CliMetLab cache. The selection arguments are the same as for the
climetlab decache
deletion command.
Examples¶
climetlab cache --all
Optional arguments¶
-h, --help show this help message and exit --json produce a JSON output --all --path print the path of cache directory and exit --sort KEY sort output according to increasing values of KEY. --reverse reverse the order of the sort, from larger to smaller --match STRING TODO --newer DATE TODO --older DATE TODO --accessed use the date of last access instead of the creation date --larger SIZE consider only cache entries that are larger than SIZE bytes --smaller SIZE consider only cache entries that are smaller than SIZE bytesSIZE can be expressed using suffixes such a K, M, G, etc. For example
--larger 1G
will match all cache entries larger than 1 GiB.DATE can be expressed as absolute time like
2021-10-10T22:59:00`
or relative such as1h
(one hour ago) or2d
(two days ago).The
--older
and--newer
consider the creation date of cache entries, unless--accessed
is specified. In this case the time of last access is used.Example, to remove large files not accessed for one week:
decache --accessed --older 1w --larger 1G
check (experimental)¶
Usage¶
climetlab check [-h]Experimental script to help debugging.
Optional arguments¶
-h, --help show this help message and exit
decache¶
Usage¶
climetlab decache [-h] [--all] [--match STRING] [--newer DATE] [--older DATE] [--accessed] [--larger SIZE] [--smaller SIZE]Cache deletion command (decache) to clean the cache from selected files. The selection arguments are the same as for the
climetlab cache
query command.
Optional arguments¶
-h, --help show this help message and exit --all --match STRING TODO --newer DATE TODO --older DATE TODO --accessed use the date of last access instead of the creation date --larger SIZE consider only cache entries that are larger than SIZE bytes --smaller SIZE consider only cache entries that are smaller than SIZE bytesSIZE can be expressed using suffixes such a K, M, G, etc. For example
--larger 1G
will match all cache entries larger than 1 GiB.DATE can be expressed as absolute time like
2021-10-10T22:59:00`
or relative such as1h
(one hour ago) or2d
(two days ago).The
--older
and--newer
consider the creation date of cache entries, unless--accessed
is specified. In this case the time of last access is used.Example, to remove large files not accessed for one week:
decache --accessed --older 1w --larger 1G
index_gribs¶
Usage¶
climetlab index_gribs [-h] [--baseurl BASEURL] PATH_OR_URL [PATH_OR_URL ...]
- Create index files for grib files.
If the option –baseurl is provided, create an index for multiple gribs. See https://climetlab.readthedocs.io/contributing/grib.html for details.
Positional arguments¶
PATH_OR_URL list of files or directories or urls to index
Optional arguments¶
-h, --help show this help message and exit --baseurl BASEURL Base url to use as a prefix to happen on each PATHS_OR_URLS to build urls.
libraries¶
Usage¶
climetlab libraries [-h] [--json]
Optional arguments¶
-h, --help show this help message and exit --json produce a JSON output
plugins¶
Usage¶
climetlab plugins [-h] [--json]List the available plugins
Optional arguments¶
-h, --help show this help message and exit --json produce a JSON output
settings¶
Usage¶
climetlab settings [-h] [--json] [SETTING [SETTING ...]]Display or change CliMetLab settings. See https://climetlab.readthedocs.io/guide/settings.html for more details.
Examples¶
climetlab settings cache-directory /big-disk/climetlab-cache
Positional arguments¶
SETTING
Optional arguments¶
-h, --help show this help message and exit --json produce a JSON output
settings_reset¶
Usage¶
climetlab settings_reset [-h] [--all] [SETTING [SETTING ...]]Display or change CliMetLab settings. See https://climetlab.readthedocs.io/guide/settings.html for more details.
Examples¶
climetlab settings cache-directory /big-disk/climetlab-cache
Positional arguments¶
SETTING
Optional arguments¶
-h, --help show this help message and exit --all All settings
versions¶
Usage¶
climetlab versions [-h] [--json] [--all] [PACKAGE [PACKAGE ...]]List the versions of important Python packages.
Positional arguments¶
PACKAGE optional list of Python packages
Optional arguments¶
-h, --help show this help message and exit --json produce a JSON output --all