hydroflows.methods.climate.change_factor#
Method for calculating future change factors.
- class hydroflows.methods.climate.change_factor.ClimateChangeFactors(hist_climatology: ~pathlib.Path, future_climatology: ~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)], output_dir: ~pathlib.Path = PosixPath('data/climatology'), **params)[source]#
Create gridded climate change factors from monthly climatology.
- Parameters:
hist_climatology (Path) – Path to the file with historical climate climatology.
future_climatology (Path) – Path to the file with future climate climatology.
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 of the future scenario (e.g. [[2090, 2100]]).
output_dir (Path) – The output directory of the change factor dataset.
**params – Additional parameters to pass to the ClimateChangeFactors instance. See
change_factor Params
.
Create a new expand method instance.
- pydantic model hydroflows.methods.climate.change_factor.Input[source]#
Input parameters.
This class represents the input data required for the
ClimateChangeFactors
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.change_factor.Output[source]#
output parameters.
this class represents the output data generated by the
ClimateChangeFactors
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.change_factor.Params[source]#
Parameters for the
ClimateChangeFactors
.Instances of this class are used in the
ClimateChangeFactors
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 convert_to_fraction: bool = True#
Whether or not to convert the change factors from percentages to fractions.
- field horizon: <lambda>, json_schema_input_type=PydanticUndefined)] [Required]#
The horizon of the future scenario (e.g. [[2090, 2100]]).
- field model: str [Required]#
The specific climate model to be merged (e.g. ‘NOAA-GFDL_GFDL-ESM4’, ‘INM_INM-CM5-0’).
- field output_dir: Annotated[Path, AfterValidator(func=outputdirpath_validator)] [Required]#
The output directory of the dataset.