Skip to content

Commit

Permalink
Corrects example of a CLI in the Read the Doc documentation (#1673)
Browse files Browse the repository at this point in the history
* Update to the Example use of a CLI on ReadtheDocs

* Adding name to Contributing file

* Updates to CLI Example in Read the Docs

* Updates to CLI example

* Updates to CLI example

Co-authored-by: Marcus Spelman <marcus.spelman@metoffice.gov.uk>
  • Loading branch information
mspelman07 and mspelman07 authored Feb 21, 2022
1 parent 4ab4120 commit c630416
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ below:
* Caroline Sandford (Met Office, UK)
* Victoria Smart (Met Office, UK)
* Eleanor Smith (Met Office, UK)
* Marcus Spelman (Met Office, UK)
* Belinda Trotta (Bureau of Meteorology, Australia)
* Tomasz Trzeciak (Met Office, UK)
* Mark Worsfold (Met Office, UK)
Expand Down
11 changes: 6 additions & 5 deletions doc/source/about.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,15 @@ Here we give a simple example of using an IMPROVER CLI to threshold data, moving

.. code:: console
bin/improver threshold input_file.nc output_file.nc 5 10 15 20 --threshold_units m/s
bin/improver threshold input.nc --threshold-values 5,10,15,20 --threshold-units m/s --output output.nc
* input_file.nc is a netCDF file containing a forecast diagnostic data cube, e.g. wind speeds across an x-y grid at a given time.
* threshold is the name of the CLI to be called. In cases where the name of the CLI has underscores these should be written as hyphens e.g. snow_fraction would be written as snow-fraction.
* input.nc is a netCDF file containing a forecast diagnostic data cube, e.g. wind speeds across an x-y grid at a given time.
* for each threshold specified (5, 10, 15, 20 m/s) a new x-y grid of data will be created. Each point in the grid will contain a 0 if the input wind speed at that point was below the threshold, or 1 if it was above the threshold.
* output_file.nc will be a new netCDF file containing the resulting data cube with an additional leading dimension that corresponds to the given thresholds (5, 10, 15, 20 m/s).
* the threshold units specifies the units of the provided thresholds (m/s) and these will be converted to match the units of the original cube before thresholding the input cube.
* output.nc will be a new netCDF file containing the resulting data cube with an additional leading dimension that corresponds to the given thresholds (5, 10, 15, 20 m/s).

This simple example covers one step in a processing chain. Additional information about using any CLI can be found on the command line using `\\-\\-help` (or `-h`), e.g.:
This simple example covers one step in a processing chain. Additional information about using any CLI can be found on the command line using `\-\-help` (or `-h`), e.g.:

.. code:: console
Expand Down

0 comments on commit c630416

Please sign in to comment.