An event-based simulation model of moisture and energy fluxes at a bare soil surface