pywasp.wasp.calc_temp_scale(ds, revert_to_original=True, enhmix=1.0, use_humidity=False)[source]

Calculate temperature scale

This calculates a surface layer temperature scale that can be used to model the wind profile. Using the enhmix can be used to control mixing over land, because ERA5 has a large bias in $u_*$ over land. If you supply enhmix you will have to add a landmask because it is only applied over land. If use_humidity is true the humidity is used for calculating the air density.


This function is experimental and its signature may change.

  • ds (xarray.Dataset) – Dataset containing variables [“PSFC”, “T2”, “UST”, “HFX”, “LH”, “PBLH”] Can have any pywasp spatial structure

  • revert_to_original (bool) – Return the histogram input in original format from the input xarray.Dataset? If false, keeps the data in stacked point format which is more efficient when doing large calculations for numerical wind atlases.

  • enhmix (float) – Decrease mixing over land with this factor. If different from 1.0, requires a land mask variable “LANDMASK” since it is only applied over land.

  • use_humidity (bool) – If True, use the humdity for calculating the air density. If true, requires variable “elevation” (for the terrain elevation) and “Q2” to be present on the dataset. By default False


hist (DataArray) – DataArray ‘temp_scale’ with same dimensions as input