import numpy as np def hli(irradiance : float, air_temperature : float, RH : float, wind_speed : float): """ Compute Heat Load Index (HLI), a thermal stress indicator for animals. Parameters ---------- irradiance : float Solar radiation [W.m-2] air_temperature : float Air temperature [°C] RH : float Relative humidity [%] wind_speed : float Wind speed [m.s-1] Returns ------- float Heat Load Index value. """ BGT = 0.01498*irradiance + 1.184*air_temperature - 0.0789*RH - 2.739 HLI = np.where(BGT >= 25, 1.55*BGT- 0.5*wind_speed + np.exp(2.4 - wind_speed)+8.62 + 0.38*RH, 1.30*BGT - wind_speed+10.66 + 0.28*RH) return HLI