hydroflows.methods.wflow.wflow_update_factors#

Downscale a climate change factor dataset to the resolution of a wflow model and add to settings file.

class hydroflows.methods.wflow.wflow_update_factors.WflowUpdateChangeFactors(change_factor_dataset: Path, wflow_toml: Path, output_dir: Path, **params)[source]#

Downscale a climate change factor dataset to the resolution of a wflow model and add to settings file.

Parameters:
  • change_factor_dataset (Path) – Path to the to be downscaled dataset.

  • wflow_toml (Path) – Path to the wflow settings toml that needs to be adjusted.

  • **params – Additional parameters to pass to the WflowDownscale instance. See wflow_update_factors Params.

See also

wflow_update_factors Input wflow_update_factors Output wflow_update_factors Params

pydantic model hydroflows.methods.wflow.wflow_update_factors.Input[source]#

Input parameters.

This class represents the input data required for the WflowUpdateChangeFactors 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:
field change_factor_dataset: Path [Required]#

The path to the to be change factor dataset.

field wflow_toml: Annotated[Path, AfterValidator(func=filedir_validator)] [Required]#

The path to the wflow settings toml that will be updated.

model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

pydantic model hydroflows.methods.wflow.wflow_update_factors.Output[source]#

output parameters.

this class represents the output data generated by the WflowUpdateChangeFactors 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:
field wflow_change_factors: Path [Required]#

Path to the change factor dataset at wflow model resolution.

field wflow_out_toml: Annotated[Path, AfterValidator(func=filedir_validator)] [Required]#

The path to the updated wflow settings toml.

model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

pydantic model hydroflows.methods.wflow.wflow_update_factors.Params[source]#

Parameters for the WflowUpdateChangeFactors.

Instances of this class are used in the WflowUpdateChangeFactors 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 copy_model: bool = False#

Create full copy of model or create rel paths in model config.

field output_dir: Annotated[Path, AfterValidator(func=outputdirpath_validator)] [Required]#

Output location relative to the workflow root. The updated model will be stored in <output_dir>.

field resample_method: str = 'nearest'#

Method of resampling the low(er) res dataset.

model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.