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.
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.
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:
fertplan
estimates "normal" soil phosphorus concentration from Table 10 of the guidelines (page 32) by considering the average value of the P ranges for each crop class and soil texture. As an example the tabled normal P concentration range for Sunflower in loam soil is [18,25] whereas the average range value 21.5 mg/kg is used by fertplan
for further elaboration.The final phosphorus balance is computed as: $$B_P = f_{P,a} + f_{P,b} \cdot f_{P,c}$$
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}$$
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.
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:
fertplan
implementation of the table has separated the crop column into two features, the actual "crop" and "part" (eg fruits, whole plant, and so on). The available crops 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"))
Texture, soil texture, one of r paste0("'", get_available("soil texture"), "'", collapse = ", ")
. Soil texture enters in a $f_{P,b}$ and $f_{P,c}$ or $f_{K,f}$ flows of the P or K balances.
Crop class, this is the class of crop to be sown to be looked up in table 10 (page 32) of the guidelines. It is used to estimate the "normal" phosphorus supply in soil. Crop class contributes to the $f_{P,b}$ component. Available crop classes are:
knitr::kable(fertplan::get_available("crop class"))
Environmental and crop-related variables include:
Expected yield, it contributes to $f_{P,a}$ component, unit of measure kg/ha. It can be estimated from statistical estimates of crop areas and yields at province, regional, or national level. As an example, wheat expected yield is 2,900 kg/ha in the province of Rome, based on 2019 Istat estimates.
Soil depth, depth of soil tillage practise, in $cm$. This is usually 30 or 40 cm, for shallow tillage (the former) or deep tillage (the latter). A soil depth coefficient measured as depth / 10 enters the $f_{P,b}$ or $f_{K,f}$ flow components as a multiplicative coefficient (eg 3 for shallow tillage or 4 for deep tillage).
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)
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])
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.
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.