hydroflows.methods.wflow.wflow_update_forcing#
Method to update the Wflow meteorological forcing.
- class hydroflows.methods.wflow.wflow_update_forcing.WflowUpdateForcing(wflow_toml: ~pathlib.Path, start_time: ~datetime.datetime, end_time: ~datetime.datetime, output_dir: str, catalog_path: ~pathlib.Path | None = None, predefined_catalogs: ~typing.Annotated[list[str], ~pydantic.functional_validators.BeforeValidator(func=~hydroflows._typing.<lambda>, json_schema_input_type=PydanticUndefined)] | None = None, **params)[source]#
Method to update the Wflow meteorological forcing.
Wflow updated toml along with the forcing are stored in a simulations subdirectory of the basemodel.
- Parameters:
wflow_toml (Path) – The file path to the Wflow basemodel configuration file (toml).
start_time (datetime) – The start time of the period for which we want to generate forcing.
end_time (datetime) – The end time of the period for which we want to generate forcing
output_dir (str) – Output location of updated model
catalog_path (Optional[Path], optional) – The path to the data catalog file (.yml) that contains the data sources specified in the config file. If None (default), a predefined data catalog should be provided.
predefined_catalogs (Optional[ListOfStr], optional) – A list containing the predefined data catalog names.
**params – Additional parameters to pass to the WflowUpdateForcing instance. See
wflow_update_forcing Params
.
- pydantic model hydroflows.methods.wflow.wflow_update_forcing.Input[source]#
Input parameters for the
WflowUpdateForcing
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.
- field catalog_path: Annotated[Path, AfterValidator(func=filedir_validator)] | None = None#
The file path to the data catalog. This is a file in yml format, which should contain the data sources for precipitation, temperature, elevation grid of the climate data (optionally) and potential evaporation (PET) estimation.
- pydantic model hydroflows.methods.wflow.wflow_update_forcing.Output[source]#
Output parameters for the
WflowUpdateForcing
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.wflow.wflow_update_forcing.Params[source]#
Parameters for the
WflowUpdateForcing
method.See also
hydromt_wflow.WflowModel
For more details on the WflowModel used in hydromt_wflow.
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 dem_forcing_src: str = 'era5_orography'#
The source for the elevation grid of the climate data. The temperature will be reprojected and then downscaled to model resolution using the elevation lapse rate. If not present, the upscaled elevation grid of the wflow model is used (‘wflow_dem’).
- field end_time: datetime [Required]#
The end time of the period for which we want to generate forcing.
- 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 predefined_catalogs: <lambda>, json_schema_input_type=PydanticUndefined)] | None = None#
List of predefined data catalogs containing the data sources specified in the config file.
- field start_time: datetime [Required]#
The start time of the period for which we want to generate forcing.
- field temp_pet_src: str = 'era5_daily_zarr'#
The source for temperature and potential evaporation estimation data. Depending on PET estimation method the temp_pet_src should contain temperature ‘temp’ [°C], pressure ‘press_msl’ [hPa], incoming shortwave radiation ‘kin’ [W/m2], outgoing shortwave radiation ‘kout’ [W/m2], wind speed ‘wind’ [m/s], relative humidity ‘rh’ [%], dew point temperature ‘temp_dew’ [°C], wind speed either total ‘wind’ or the U- ‘wind10_u’ [m/s] and V- ‘wind10_v’ components [m/s]. Required variables for De Bruin reference evapotranspiration: ‘temp’ [°C], ‘press_msl’ [hPa], ‘kin’ [W/m2], ‘kout’ [W/m2].