Skip to content

v2.1.0 — hydroRaVENS

Choose a tag to compare

@awickert awickert released this 04 May 13:54
· 267 commits to master since this release

Corrections and refactoring of the Thorntwaite–Chang (2019) evapotranspiration implementation, prompted by a close reading of Chang et al. (2019).

Bug fixes

  • Tmin was incorrectly read from the maximum-temperature column; now correctly reads from minimum temperature
  • Transcription error in Thornthwaite exponent a: coefficient on I² corrected from 7.72×10⁻⁵ to 7.71×10⁻⁵

Improvements

  • _compute_Chang_I() and _compute_Chang_a() extracted as proper methods; Buckets() now accepts T_monthly_normals (array of 12 monthly mean temperatures in °C) to compute the thermal index I from the local climate
  • Hardcoded site-specific fallback value for I removed; initialize() now raises a clear ValueError if ThorntwaiteChang2019 is selected without T_monthly_normals having been passed to Buckets()
  • Calibration coefficient k in the T_ef formula is now an explicit parameter (default 0.69 per Pereira & Pruitt 2004, doi:10.1016/j.agrformet.2004.01.005); use 0.72 for monthly ET per Camargo et al. (1999)
  • Piecewise logic replaced with np.where for clarity and correctness
  • Full NumPy-style docstring added with equation references and DOIs