ewatercycle.esmvaltool.schema

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 = None
start_year: int | None = None
end_year: int | None = None
ensemble: str | None = None
exp: str | None = None
mip: str | None = None
realm: str | None = None
shift: str | None = None
tier: Literal[1, 2, 3] | None = None
type: str | None = None
grid: str | None = None
model_config
class ewatercycle.esmvaltool.schema.Variable

Bases: pydantic.BaseModel

ESMValTool variable section.

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

Bases: pydantic.BaseModel

ESMValTool script section.

model_config
script: str
class ewatercycle.esmvaltool.schema.Diagnostic

Bases: pydantic.BaseModel

ESMValTool diagnostic section.

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

Bases: pydantic.BaseModel

ESMValTool documentation section.

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

Bases: pydantic.BaseModel

ESMValTool recipe.

documentation: Documentation
datasets: list[Dataset] | None = None
preprocessors: dict[str, dict[str, Any]] | None = None
diagnostics: dict[str, Diagnostic] | None = 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.

Parameters:

path – Path to save recipe to.

class ewatercycle.esmvaltool.schema.ClimateStatistics

Bases: pydantic.BaseModel

Arguments of climate_statistics().

operator: Literal['mean', 'std', 'min', 'max', 'median', 'sum'] = 'mean'
period: Literal['hour', 'day', 'month', 'year'] = 'day'
ewatercycle.esmvaltool.schema.ExtractRegion

Arguments for the extract_region() preprocessor.

class ewatercycle.esmvaltool.schema.TargetGrid

Bases: TypedDict

Type of target_grid argument of regrid().

Initialize self. See help(type(self)) for accurate signature.

start_longitude: float
end_longitude: float
start_latitude: float
end_latitude: float
step_longitude: float
step_latitude: float