Build a monthly rotation calendar from a crop sequence
expand_rotation_calendar.RdExpands a per-crop/per-season rotation description (one row per crop
in the sequence) into a monthly calendar covering n_years, cycling
through the rotation and tracking sowing/harvest months, the active
crop, and the previous/next crop in the sequence. This is the base
calendar that the other expand_* functions (cover crops, eom
application, irrigation, tillage) add to.
Usage
expand_rotation_calendar(
df,
sowing.var = "crop.sowing.date",
harvest.var = "crop.harvest.date",
start_year = 2020,
n_years = 30
)Arguments
- df
Rotation data frame, one row per crop in the sequence (recycled over
n_years), with at least the columns referenced bysowing.var/harvest.varpluscrop.id.be.socmo,saison.culturale, andcrop.residue.removal.- sowing.var
Name of the column in
dfholding the sowing date (format"MM-DD", only the month is used).- harvest.var
Name of the column in
dfholding the harvest date (format"MM-DD", only the month is used).- start_year
First simulation year.
- n_years
Number of years to simulate.