Estimates crop residue dry matter from production and area using an ensemble
of an IPCC 2019 linear model and a bio_coefs residue:product ratio. The
irrigation and modern-variety adjustments activate only when their driver
columns are present in x.
Arguments
- x
A tibble with
item_prod_code,production_t(fresh matter) andarea_ha. Optionalwater_regimeenables the irrigation adjustment; optionalyearplusregion_hanppenable the modern-variety adjustment.- method
Residue method:
"ensemble"(default, weighted IPCC + ratio),"ipcc"(IPCC linear only) or"ratio"(bio_coefsratio only).- weights
Named list;
w_ipccis the IPCC weight in the ensemble (0-1, default 0.5), used only whenmethod = "ensemble".
Value
The input tibble with product_dm_t, yield_dm_t_ha, residue_dm_t,
method_residue and method_residue_group. The latter is "ipcc_group"
for an item with an IPCC crop group, and "unmapped_uncorrected" for one
without: that item gets no irrigation or modern-variety residue correction
(both are keyed on the crop group), which is not the same as a correction
that was computed and found to be 1.
Examples
calculate_crop_residues(
tibble::tibble(item_prod_code = "15", production_t = 100, area_ha = 40)
)
#> # A tibble: 1 × 8
#> item_prod_code production_t area_ha product_dm_t yield_dm_t_ha
#> <chr> <dbl> <dbl> <dbl> <dbl>
#> 1 15 100 40 87.9 2.20
#> # ℹ 3 more variables: method_residue_group <chr>, residue_dm_t <dbl>,
#> # method_residue <chr>
