You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per my email a while ago, the first line of both the identify_hw(ehfs:np.ndarray) and identify_semi_hw() functions identifies days and locations for which a heat event occurs. That is,
events = (ehfs>0.).astype(int)
. The ehfs > 0 condition is correct when ehfs is a view into the excess heat factor array, since EHF values are non-negative. However, when ehfs is instead a view into either the tmax or tmin exceedance arrays, the condition ehfs > 0 causes negative exceedances to be ignored. (Naturally, exceedances are temperature values, e.g., the 90th percentiles, and could, in principle, be negative). This issue might not matter a great deal in practice, since, presumably, exceedances are usually positive.
A simple fix would be to use np.nan values to mask-off values that are to be ignored during heatwave calculations, namely, non-positive ehfs values and values of tmax and tmin that are below the cutoff percentile. The condition ehfs > 0 would then be replaced with ehfs != np.nan.
The text was updated successfully, but these errors were encountered:
Hi Tammas,
Per my email a while ago, the first line of both the identify_hw(ehfs:np.ndarray) and identify_semi_hw() functions identifies days and locations for which a heat event occurs. That is,
events = (ehfs>0.).astype(int)
. The ehfs > 0 condition is correct when ehfs is a view into the excess heat factor array, since EHF values are non-negative. However, when ehfs is instead a view into either the tmax or tmin exceedance arrays, the condition ehfs > 0 causes negative exceedances to be ignored. (Naturally, exceedances are temperature values, e.g., the 90th percentiles, and could, in principle, be negative). This issue might not matter a great deal in practice, since, presumably, exceedances are usually positive.
A simple fix would be to use np.nan values to mask-off values that are to be ignored during heatwave calculations, namely, non-positive ehfs values and values of tmax and tmin that are below the cutoff percentile. The condition ehfs > 0 would then be replaced with ehfs != np.nan.
The text was updated successfully, but these errors were encountered: