hydromt.workflows.forcing.temp#

hydromt.workflows.forcing.temp(temp, dem_model, dem_forcing=None, lapse_correction=True, freq=None, reproj_method='nearest_index', lapse_rate=-0.0065, resample_kwargs=None, logger=<Logger hydromt.workflows.forcing (WARNING)>)[source]#

Return lazy reprojection of temperature to model grid.

Use lapse_rate for downscaling, and resampling of time dimension to frequency.

Parameters:
  • temp (xarray.DataArray) – DataArray of temperature forcing [°C]

  • dem_model (xarray.DataArray) – DataArray of the target resolution and projection, contains elevation data

  • dem_forcing (xarray.DataArray) – DataArray of elevation at forcing resolution. If provided this is used with dem_model to correct the temperature downscaling using a lapse rate

  • lapse_correction (bool, optional) – If True, temperature is correctured based on lapse rate, by default True.

  • freq (str, Timedelta) – output frequency of timedimension

  • reproj_method (str, optional) – Method for spatital reprojection of precip, by default ‘nearest_index’

  • lapse_rate (float, optional) – lapse rate of temperature [C m-1] (default: -0.0065)

  • resample_kwargs – Additional key-word arguments (e.g. label, closed) for time resampling method

  • logger – The logger to use.

Returns:

t_out – processed temperature forcing

Return type:

xarray.DataArray (lazy)