hydromt_wflow.WflowModel.setup_temp_pet_forcing#
- WflowModel.setup_temp_pet_forcing(temp_pet_fn: str | Dataset, pet_method: str = 'debruin', press_correction: bool = True, temp_correction: bool = True, wind_correction: bool = True, wind_altitude: int = 10, reproj_method: str = 'nearest_index', dem_forcing_fn: str | DataArray = None, skip_pet: str = False, chunksize: int | None = None, **kwargs) None [source]#
Generate gridded temperature and reference evapotranspiration forcing.
If temp_correction is True, the temperature will be reprojected and then downscaled to model resolution using the elevation lapse rate. For better accuracy, you can provide the elevation grid of the climate data in dem_forcing_fn. If not present, the upscaled elevation grid of the wflow model is used (‘wflow_dem’).
To compute PET (skip_pet is False), several methods are available. Before computation, both the temperature and pressure can be downscaled. Wind speed should be given at 2m altitude and can be corrected if wind_correction is True and the wind data altitude is provided in wind_altitude [m]. Several methods to compute pet are available: {‘debruin’, ‘makkink’, ‘penman-monteith_rh_simple’, ‘penman-monteith_tdew’}.
Depending on the methods, temp_pet_fn 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].
Adds model layer:
pet: reference evapotranspiration [mm]
temp: temperature [°C]
- Parameters:
temp_pet_fn (str, xarray.Dataset) –
Name or path of RasterDataset source with variables to calculate temperature and reference evapotranspiration, see data/forcing_sources.yml.
Required variable for temperature: ‘temp’ [°C]
Required variables for De Bruin reference evapotranspiration: ‘temp’ [°C], ‘press_msl’ [hPa], ‘kin’ [W/m2], ‘kout’ [W/m2]
Required variables for Makkink reference evapotranspiration: ‘temp’ [°C], ‘press_msl’ [hPa], ‘kin’[W/m2]
Required variables for daily Penman-Monteith reference evapotranspiration: either {‘temp’ [°C], ‘temp_min’ [°C], ‘temp_max’ [°C], ‘wind’ [m/s], ‘rh’ [%], ‘kin’ [W/m2]} for ‘penman-monteith_rh_simple’ or {‘temp’ [°C], ‘temp_min’ [°C], ‘temp_max’ [°C], ‘temp_dew’ [°C], ‘wind’ [m/s], ‘kin’ [W/m2], ‘press_msl’ [hPa], ‘wind10_u’ [m/s],”wind10_v” [m/s]} for ‘penman-monteith_tdew’ (these are the variables available in ERA5)
pet_method ({'debruin', 'makkink', 'penman-monteith_rh_simple', 'penman-monteith_tdew'}, optional) – Reference evapotranspiration method, by default ‘debruin’. If penman-monteith is used, requires the installation of the pyet package.
press_correction (bool, optional) – If True pressure, temperature are corrected using elevation lapse rate, by default False.
temp_correction (bool, optional) – If True pressure, temperature are corrected using elevation lapse rate, by default False.
dem_forcing_fn (str, default None) –
Elevation data source with coverage of entire meteorological forcing domain. If temp_correction is True and dem_forcing_fn is provided this is used in combination with elevation at model resolution to correct the temperature.
Required variable: ‘elevtn’ [m+REF]
wind_correction (bool, optional) – If True wind speed is corrected to wind at 2m altitude using
wind_altitude
. By default True.wind_altitude (int, optional) – Altitude of wind speed [m] variable, by default 10. Only used if
wind_correction
is True.skip_pet (bool, optional) – If True calculate temp only.
reproj_method (str, optional) – Reprojection method from rasterio.enums.Resampling. to reproject the climate data to the model resolution. By default ‘nearest_index’.
chunksize (int, optional) – Chunksize on time dimension for processing data (not for saving to disk!). If None the data chunksize is used, this can however be optimized for large/small catchments. By default None.