hydroflows.methods.climate.climatology#
Method for creating monthly climatology from gridded climate data.
- class hydroflows.methods.climate.climatology.MonthlyClimatology(region: ~pathlib.Path, model: str, scenario: str, horizon: ~typing.Annotated[list[list[int]], ~pydantic.functional_validators.BeforeValidator(func=~hydroflows._typing.<lambda>, json_schema_input_type=PydanticUndefined)], catalog_path: ~pathlib.Path | None = None, output_dir: ~pathlib.Path = PosixPath('data/climatology'), **params)[source]#
Create monthly climatology from climate model data.
- Parameters:
region (Path) – Path to the region vector file.
catalog_path (Path) – Path to the data catalog. Should contain the the clim_source data.
model (str) – Model name of the climate model (e.g. ‘NOAA-GFDL_GFDL-ESM4’, ‘INM_INM-CM5-0’). Depends on the climate source.
scenario (str) – Scenario name of the climate model (e.g. historical, ssp245, ssp585). Depends on the climate source.
horizon (ListOfListOfInt) – The horizon(s) of the future scenario (e.g. [[2090, 2100]]).
output_dir (Path) – The output directory of the climatology dataset.
**params – Additional parameters to pass to the MonthlyClimatology instance. See
climatology Params
.
- pydantic model hydroflows.methods.climate.climatology.Input[source]#
Input parameters.
This class represents the input data required for the
MonthlyClimatology
method.Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- pydantic model hydroflows.methods.climate.climatology.Output[source]#
Output parameters.
This class represents the output data generated by the
MonthlyClimatology
method.Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Fields:
- pydantic model hydroflows.methods.climate.climatology.Params[source]#
Parameters for the
MonthlyClimatology
.Instances of this class are used in the
MonthlyClimatology
method to define the required settings.Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Fields:
- field clim_source: Literal['cmip6', 'cmip5', 'isimip3'] = 'cmip6'#
The source of the climate data (e.g. ‘cmip6’, ‘cmip5’, ‘isimip3’). Must be one of the available sources in the catalog_path.
- field horizon: <lambda>, json_schema_input_type=PydanticUndefined)] [Required]#
The horizon of the future scenario (e.g. [[2090, 2100]]).
- field members: <lambda>, json_schema_input_type=PydanticUndefined)] = ['r1i1p1f1']#
List of member names of the climate model (e.g. r1i1p1f1). Depends on the climate source.
- field model: str [Required]#
Model name of the climate model (e.g. ‘NOAA-GFDL_GFDL-ESM4’, ‘INM_INM-CM5-0’). Depends on the climate source.
- field output_dir: Annotated[Path, AfterValidator(func=outputdirpath_validator)] = PosixPath('data/climatology')#
The output directory of the climatology dataset.
- field predefined_catalogs: <lambda>, json_schema_input_type=PydanticUndefined)] | None = None#
List of predefined catalogs to use.