From 87f5e379b61971f26f3947d75bd56c257fa8648d Mon Sep 17 00:00:00 2001 From: Baudouin Raoult Date: Tue, 26 Mar 2024 21:15:48 +0000 Subject: [PATCH] more documentation --- docs/building/sources/constants.rst | 14 ++++++++++++++ docs/building/sources/constants.yaml | 12 ++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 docs/building/sources/constants.yaml diff --git a/docs/building/sources/constants.rst b/docs/building/sources/constants.rst index 577344cd..93f93c67 100644 --- a/docs/building/sources/constants.rst +++ b/docs/building/sources/constants.rst @@ -11,9 +11,23 @@ Although this source is called `constants`, its purpose is to provide fields with values that only depend on the grid cell and/or the time. +Because the source needs to generate fields on the same grids as the +other, it requires a template field. This is provided in the recipe with +the `template` keyword: + +.. literalinclude:: constants.yaml + :language: yaml + +The value ``${input.join.0.source1}`` is the "path" to the first source, +starting from the root of the recipe. The path is composed of the of the +nodes in the recipe, separated by dots. If a node contains a list, the +index of the next node is added after the node name, starting from 0. + The is a mean to provide the model with with space and time information during training and inference. +The following fields are available: + latitude Each grid point has the value of its latitude in degrees. diff --git a/docs/building/sources/constants.yaml b/docs/building/sources/constants.yaml new file mode 100644 index 00000000..39650b28 --- /dev/null +++ b/docs/building/sources/constants.yaml @@ -0,0 +1,12 @@ +input: + join: + - source1: + args1: value1 + args2: value2 + + - constants: + template: ${input.join.0.source1} + params: + - insolation + - cos_julian_day + - sin_julian_day