Skip to contents

Marks the months an irrigation quantity applies on a monthly calendar, matched to the active crop by crop.id.be.socmo/ saison.culturale. Handles irrigation windows that cross the calendar year boundary (e.g. October to February).

Usage

expand_irrigation_calendar(
  rotation_calendar,
  df,
  irrig_q_var = "irrig.q",
  irrig_start_var = "irrig.date.start",
  irrig_stop_var = "irrig.date.stop"
)

Arguments

rotation_calendar

Monthly calendar, typically the output of expand_rotation_calendar().

df

Rotation data frame, with the columns referenced by irrig_q_var/irrig_start_var/irrig_stop_var, plus crop.id.be.socmo and saison.culturale.

irrig_q_var

Name of the column in df holding the irrigation quantity.

irrig_start_var

Name of the column in df holding the irrigation start date (format "MM-DD", only the month is used).

irrig_stop_var

Name of the column in df holding the irrigation stop date (format "MM-DD", only the month is used).

Value

rotation_calendar with an added irrigation column (0 outside the irrigation window, irrig_q inside it). Same row count as the input.