• Added back previously removed arguments:
    • argument thresh_reset_absolute (i.e. absolute threshold-based event re-setting. Resets CWD to zero and terminates event once deficit falls that amount below event peak. Same as previous thresh_terminate_absolute).
    • argument thresh_reset_relative (i.e. relative threshold-based event re-setting, Resets CWD to zero and terminates event once deficit falls below a specified fraction of the event peak. Same as previous thresh_terminate_relative).
  • Fix: bug where length of deficit instance included day after drop below 0mm
  • Breaking change: instances terminated by doy_reset now always include last day (even if it would have a drop). Result change is expected to be very limited (off-by 1 day at most). Moreover, this is expected to be an edge case, given that doy_reset is expected to be set outside of periods with strong deficits.
  • Fix: bug where deficit of last time step was uninitialised (zero).

Internal

  • Refactored internal code for faster code execution (C++ instead of R).
  • Reworked and simplified cwd:
    • argument thresh_terminate removed (i.e. threshold-based event re-setting)
    • argumed do_surplus added
  • Clarified error message when partial year is run. simulate_snow() requires at least 365 days (due to snowpack spinup), but allows for partial last year.
  • Initial version