Derives time series of the cumulative water deficit (CWD), given time series of the daily soil water balance (infiltration minus evapotranspiration). CWD "events" are identified as periods of consecutive days where the CWD is positive (a water deficit). CWD is set to zero after rain has reduced the CWD by a user-defined fraction, relative to maximum CWD attained during the same event.

cwd(
  df,
  varname_wbal,
  varname_date,
  thresh_terminate = 0,
  thresh_drop = 0.9,
  doy_reset = 999
)

Arguments

df

a data frame that contains the variable named according to argument varname_wbal

varname_wbal

name of the variable representing the daily soil water balance (infiltration minus evapotranspiration)

varname_date

name of the variable representing information about the date (format irrelevant)

thresh_terminate

threshold determining the level, relative to maximum CWD attained during the same event, to which a CWD has to be reduced to terminate the event. Defaults to 0, meaning that the CWD has to be fully compensated by water infiltration into the soil to terminate a CWD event.

thresh_drop

Level, relative to the CWD maximum of the same event, after which all data during the remainder of the event is set to missing values. This is to avoid interpreting data after rain events but before full compensation of CWD. Defaults to 0.9.

doy_reset

Day-of-year (integer) when deficit is to be reset to zero each year.

Details

A list of two data frames (tibbles). inst contains information about CWD "events". Each row corresonds to one event. An event is defined as a period of consecutive days where the CWD is positive (a water deficit)) and has the following columns:

idx_start: row number of df of which the date corresponds to the start of the event len: length of the event, quantified as number of rows in df corresponding to the event iinst: event number date_start: starting date of the event, formatted as varname_date in df. date_end: end date of the event, formatted as varname_date in df. deficit: maximum CWD recorded during this event. Units correspond to units of varname_wbal in df.