Add irrigation applications to a rotation calendar
expand_irrigation_calendar.RdMarks 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, pluscrop.id.be.socmoandsaison.culturale.- irrig_q_var
Name of the column in
dfholding the irrigation quantity.- irrig_start_var
Name of the column in
dfholding the irrigation start date (format"MM-DD", only the month is used).- irrig_stop_var
Name of the column in
dfholding 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.