knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>")
library(data.table)
library(fertplan)

This document will walk you through a simulation of a real fertilization plan for phosphorus ($P_2O$) and potassium ($K_2O_5$) nutrients. Both fertplan and this document depend on package data.table but its usage is not in any way mandatory.

Fertilization plan balances

This estimation of phospohorus (P) and potassium (K) fertilization concentrations for erbaceous and tree crops will strictly follow the indications formulated in the regulation drawn up by the Italian Region of Lazio [@guidelines2020], hereafter the guidelines.

Fertilization concentrations in kg/ha are estimated as the net resultant of a balance between the phosphorus or potassium pool available for the crops and the phosphorus or potassium losses.

Phosphorus

The P balance involves 3 flow components. Similarly to N plans, flows that increase P availability to the crop are > 0 (positive sign). Flows that deplete soil P pool or PN availability for the crop are < 0 (negative sign).

The P flow components include:

The final phosphorus balance is computed as: $$B_P = f_{P,a} + f_{P,b} \cdot f_{P,c}$$

Potassium

The K balance involves 3 flow components. Similarly to N plans, flows that increase K availability to the crop are > 0 (positive sign). Flows that deplete soil K pool or PN availability for the crop are < 0 (negative sign).

The K flow components include:

The final potassium balance is computed as: $$B_K = f_{K,e} + f_{K,f} \cdot f_{K,g} + f_{K,h}$$

First step: load soil analyses

Let's begin with some minimal data from soil physical and chemical analyses on a few sampling points in the field.

data(soils)
soil_dt <- soils[, c("id", "P_ppm", "Limestone_pc", "K_ppm", "Clay_pc")]
knitr::kable(soil_dt)

The table shows the soil chemical and physical status before the planned crop sowing. The soil analyses elements that will be fed the phosphorus balance estimation are:

The soil analyses elements that will be fed the potassium balance estimation are:

The id feature is not relevant to the balance estimation.

Second step: variable configuration

A few environmental and crop-related variables need to be set. Some variables need to match those set out in the guidelines tables, while a few others have to be derived from external sources.

Let's first translate the guidelines tables into english:

fertplan::i18n_switch("lang_en")

Matching-variables are:

knitr::kable(fertplan::get_available("crop"))
knitr::kable(fertplan:::tables_l$all_01_dt[crop == "Sunflower" & element %in% c("P2O5", "K2O"), ])

As a reference crop parts include:

knitr::kable(fertplan::get_available("part"))
knitr::kable(fertplan::get_available("crop class"))

Environmental and crop-related variables include:

Let's now set the variables values and bind them to the soil analysis table. Let's suppose the values are constant among all soil samples, as it may be the case when all sampling points come from a uniform field that will be sown with the same crop:

soil_l <- list(
    crop                 = "Durum wheat",
    part                 = "Seed",
    crop_class           = "Durum wheat",
    expected_yield_kg_ha = 2900L,
    texture              = "Loam",
    soil_depth_cm        = 30L)

Third step: estimate the components of P or K balance

Let's estimate the $f_{P,a|b|c}$ and $f_{K,e|f|g|h} components:

nutrient_dt <- demand_nutrient(
  soil_dt, 
  soil_l, 
  nutrient  = c("phosphorus", "potassium"), 
  blnc_cmpt = TRUE)
knitr::kable(nutrient_dt)

All components were estimated. Remember that positive values are demand pools of nutrient in soil or nutrient flows leaving the field; negative values are current nutrient pools in the soils that are available for assimilation to the crop or that will be available during the time-frame of crop growth.

The phosprorus components are:

fertzl_dt <- cbind(nutrient_dt, soil_dt)
fertzl_p_cols <- grep(
  pattern = "^[A-Z]_P_kg_ha$", 
  x       = colnames(fertzl_dt), 
  value   = TRUE)
knitr::kable(fertzl_dt[, ..fertzl_p_cols])

The potassium components are:

fertzl_k_cols <- grep(
  pattern = "^[A-Z]_K_kg_ha$", 
  x       = colnames(fertzl_dt), 
  value   = TRUE)
knitr::kable(fertzl_dt[, ..fertzl_k_cols])

Fourth step: estimate P or K demand

We are finally arrived to the last step of assembling all components of the P or K balance. Let's compute the balance following the previous balance equation:

fertzl_dt[, p_demand_kg_ha := A_P_kg_ha + B_P_kg_ha * C_P_kg_ha]
fertzl_dt[, k_demand_kg_ha := E_K_kg_ha + F_K_kg_ha * G_K_kg_ha + H_K_kg_ha]
knitr::kable(fertzl_dt[, c("id", "p_demand_kg_ha", "k_demand_kg_ha")])

All sampling points end up needing a supply of phosphorus of r fertzl_dt[, mean(p_demand_kg_ha)] kg/ha and of r fertzl_dt[, mean(k_demand_kg_ha)] on average.

Alternative pathway

A more direct pathway to get to B_P or B_K estimation is to set argument blnc_cmpt of demand_nutrient function to FALSE (the default setting). This will have the effect of returning directly B_P or B_K instead of its balance components thereby skipping the fourth step:

nutrient_dt <- demand_nutrient(
  soil_dt, 
  soil_l, 
  nutrient = c("phosphorus", "potassium"), 
  blnc_cmpt = FALSE)
knitr::kable(nutrient_dt)

That's it as far as phosphorus and potassium fetilization plans are concerned.

References



mbask/fertplan documentation built on July 3, 2020, 12:01 p.m.