ESMValTool recipe schema and preprocessor types.

The classes and their attributes in this module are based on the ESMValTool recipe schema at https://github.com/ESMValGroup/ESMValCore/blob/main/esmvalcore/_recipe/recipe_schema.yml .

Module Contents

class ewatercycle.esmvaltool.schema.Dataset

Bases: pydantic.BaseModel

ESMValTool dataset section.

dataset: str
project: str | None
start_year: int | None
end_year: int | None
ensemble: str | None
exp: str | None
mip: str | None
realm: str | None
shift: str | None
tier: Literal[1, 2, 3] | None
type: str | None
grid: str | None
class ewatercycle.esmvaltool.schema.Variable

Bases: pydantic.BaseModel

ESMValTool variable section.

project: str | None
start_year: int | None
end_year: int | None
ensemble: str | list[str] | None
timerange: str | None
exp: str | list[str] | None
mip: str | None
preprocessor: str | None
reference_dataset: str | None
alternative_dataset: str | None
fx_files: list[str] | None
additional_datasets: list[Dataset] | None
short_name: str | None
class ewatercycle.esmvaltool.schema.Script

Bases: pydantic.BaseModel

ESMValTool script section.

script: str
class ewatercycle.esmvaltool.schema.Diagnostic

Bases: pydantic.BaseModel

ESMValTool diagnostic section.

scripts: dict[str, Script] | None
additional_datasets: list[Dataset] | None
title: str | None
description: str | None
themes: list[str] | None
realms: list[str] | None
variables: dict[str, Variable] | None
class ewatercycle.esmvaltool.schema.Documentation

Bases: pydantic.BaseModel

ESMValTool documentation section.

title: str
description: str
authors: list[str]
projects: list[str] | None
references: list[str] | None
class ewatercycle.esmvaltool.schema.Recipe

Bases: pydantic.BaseModel

ESMValTool recipe.

documentation: Documentation
datasets: list[Dataset] | None
preprocessors: dict[str, dict[str, Any]] | None
diagnostics: dict[str, Diagnostic] | None
classmethod load(path: pathlib.Path) Recipe

Load recipe from path.

classmethod from_yaml(recipe_string: str) Recipe

Load recipe from YAML string.

to_yaml() str

Return recipe as YAML string.

save(path: pathlib.Path) None

Save recipe to path.


path – Path to save recipe to.

class ewatercycle.esmvaltool.schema.ClimateStatistics

Bases: pydantic.BaseModel

Arguments for the climate_statistics() preprocessor.

operator: Literal[mean, std, min, max, median, sum] = 'mean'
period: Literal[hour, day, month, year] = 'day'

Arguments for the extract_region() preprocessor.


Type for target_grid argument for the regrid() preprocessor.