Skip to content

Commit

Permalink
Merge pull request #641 from MetOffice/documentation_tidy_up
Browse files Browse the repository at this point in the history
Tidy up documentation around recipes and cset bake command, introducing examples
  • Loading branch information
jfrost-mo authored Jul 23, 2024
2 parents cce0d35 + f06e067 commit 2bf7cf6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
11 changes: 11 additions & 0 deletions docs/source/reference/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ page.
-s STYLE_FILE, --style-file STYLE_FILE
colour bar definition to use
Here is an example to run a recipe making use of the templated variable ``VARNAME`` in the recipe.
The '-v' is optional to give verbose output::

.. code-block:: text
cset -v bake -i INPUT_DIR -o OUTPUT_DIR -r generic_surface_histogram_series.yaml --VARNAME 'air_pressure_at_sea_level' --VALIDITY_TIME '2024-01-16T06:00Z'
When running `cset bake` multiple times for the same recipe it can cause issues with merging data into
a single cube if output from a previous `cset bake` run exists in the chosen `OUTPUT_DIR`. In
this case you need to delete the output data from the previous run.

.. _cset-cookbook-command:

cset cookbook
Expand Down
15 changes: 13 additions & 2 deletions docs/source/reference/recipe-format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ Recipe Format
=============

The recipes are text files written in `YAML 1.2`_, a configuration language that
is widely used. They are saved with the ``.yaml`` extension. Below is a
commented example recipe:
is widely used. They are saved with the ``.yaml`` extension.

Currently we develop separate recipes for similar diagnostics for Unified Model data and
LFRic data. Recipes are also separately developed for surface diagnostics and
diagnostics on vertical levels.

Below is a commented example recipe:

.. code-block:: yaml
Expand Down Expand Up @@ -103,6 +108,12 @@ for example:
cset bake -i input -o output -r recipe.yaml --MY_VARIABLE='value'
Alternatively a space can be used between the variable and value:

.. code-block:: bash
cset bake -i input -o output -r recipe.yaml --MY_VARIABLE value
The given value will be templated into the parameter so what runs is actually:

.. code-block:: yaml
Expand Down

0 comments on commit 2bf7cf6

Please sign in to comment.