Title: | Assessment Models for Agriculture Soil Conditions and Crop Suitability |
---|---|
Description: | Soil assessment builds information for improved decision in soil management. It analyzes soil conditions with regard to agriculture crop suitability requirements [such as those given by FAO <https://www.fao.org/land-water/databases-and-software/crop-information/en/>] soil fertility classes, soil erosion, and soil salinity classification [<doi:10.1002/ldr.4211>]. Suitability requirements are for crops grouped into cereal crops, nuts, legumes, fruits, vegetables, industrial crops, and root crops. |
Authors: | Christian Thine Omuto [aut, cre] |
Maintainer: | Christian Thine Omuto <[email protected]> |
License: | GPL |
Version: | 0.2.6 |
Built: | 2024-11-27 07:49:26 UTC |
Source: | CRAN |
This function attaches soil textural classes according to different soil texture classification systems
appendTextureclass(df, method)
appendTextureclass(df, method)
df |
spatial pixel dataframe with columns of soil textural proportions clay, silt, and sand in percentages |
method |
soil texture classification method for calculating soil texture. Default=USDA method |
df is an output of createTexturedata with spatial reference or similar dataframe with normalized proportions summing to 100 method is the texture classification method for textural class calculation. Exanple methods are USDA, FAO, Australian, German, etc.
Output is a soil texture dataframe with textural classes for every row (or pixel) in the dataframe. The output may sometimes return double class such as "SaLo, Lo" implying possibility of a tie for two classes. Such outputs should be edited outside the package for meaningful representation of soil textural classes when necessary
This function can sometimes return double classes such as "SaLo, Lo" implying possibility of a tie for two classes.
Christian Thine Omuto
Moyes J. 2018. The soil texture wizard: R functions for plotting, classifying, transforming and exploring soil texture data. https://cran.r-project.org/web/packages/soiltexture/vignettes/soiltexture_vignette.pdf
textureSuit
, createTexturedata
library(soiltexture) newtxt=textureinput texturedata=createTexturedata(newtxt$clay, newtxt$silt, newtxt$sand) newtxt1=appendTextureclass(as.data.frame(texturedata), method = "USDA") levels(as.factor(newtxt1$TEXCLASS))
library(soiltexture) newtxt=textureinput texturedata=createTexturedata(newtxt$clay, newtxt$silt, newtxt$sand) newtxt1=appendTextureclass(as.data.frame(texturedata), method = "USDA") levels(as.factor(newtxt1$TEXCLASS))
This function determines the suitability classes for soil calcium carbonate requirements of selected agricultural crops and forest trees
carbonateSuit(value, crop)
carbonateSuit(value, crop)
value |
Input calcium carbonate content in percent |
crop |
The crop of interest for which calcium carbonate suitability class is sought |
The input value can be map or just a numerical entry of calcium carbonate in percent
The output is calcium carbonate suitability class for the crop. The output is an integer value for suitability class: 1- highly suitable; 2 - moderately suitable; 3 - marginally suitable; 4 - currently not suitable; 5 - not suitable
Christian Thine Omuto
Sys, C., Van Ranst, E., Debaveye, J. and Beerneaert, F.1993. Land evaluation: Part III: Crop requirements. Development Cooperation, Belgium.
Naidu, L.G.K., Ramamurthy, V., Challa O., Hegde, R. and Krishnan, P. 2006. Manual, Soil-site Suitability Criteria for Major Crops, National Bureau of Soil Survey and Land Use Planning, ICAR, Nagpur, India
FAO Crop Suitability Requirements: http://ecocrop.fao.org/ecocrop/srv/en/home
suitability
, ESPSuit
, fertilitySuit
library(sp) newmap=suitabinput newmap$saffron=carbonateSuit(newmap$cac03,"saffron") summary(newmap$saffron) spplot(newmap,"saffron")
library(sp) newmap=suitabinput newmap$saffron=carbonateSuit(newmap$cac03,"saffron") summary(newmap$saffron) spplot(newmap,"saffron")
This function provides alternatives for implementing RothC carbon turnover model
carbonTurnover(tt,clay,C0,In,Dr=1.44,effcts,solver)
carbonTurnover(tt,clay,C0,In,Dr=1.44,effcts,solver)
tt |
a vector of time in months or years for modelling carbon turnover in the soil |
clay |
Proportion of soil clay content in percent |
C0 |
a vector containing five initial carbon pools in the five compartments C1 in DPM, C2 in RPM, C3 in BIO, C4 in HUM and C5 in IOM. They are arranged in the order C1,C2,C3,C4,C5 [C0=c(C1,C2,C3,C4,C5)]. |
In |
Input carbon amount. It can be a scalar constant or a 2-column dataframe containing time dependent organic matter input. The two columns are time and carbon input |
Dr |
ratio of decomposable plant material (DPM) to resistant plant material (RPM). Default value is 1.44 |
effcts |
a constant or dataframe of environmental effects on carbon decomposition rates. If it's a dataframe of time-dependent variables, then the length of the dataframe should be similar to the length of time (t) vector |
solver |
name of subroutines for solving first order odinary differential equations for organic matter decay in the soil. The subroutines are lsoda, lsodes,rk4, euler,lsode, lsodar,ode23, radau,etc. from deSolve |
vector t can be years or months sequentially arranged with the start-time as the minimum and end-time as the maximum time. Initial carbon pools are also provided as a vector of five items: C1,C2,C3,C4,C5 in that order where C1 is the pool in the decomposable plant material (DPM) compartment, C2 is pool in the resistant plant material (RPM) compartment, C3 is the pool in the microbial biomass (BIO) compartment, C4 is the pool in the humified organic matter (HUM) compartment, and C5 is the pool in the inert organic matter (IOM) compartment.
nx6 matrix of carbon pools with time in the five compartments DPM, RPM, BIO, HUM, and IOM in that order (time, C1, C2, c3, C4, C5).
Christian Thine Omuto
Coleman, K. and Jenkinson, D. 2014. ROTHC-26.3 A model for the turnover of carbon in soils: Model description and users guide (Windows version). Rothamsted Research Harpenden Herts AL5 2JQ
Jenkinson, D. S., Andrew, S. P. S., Lynch, J. M., Goss, M. J., Tinker, P. B. 1990. The Turnover of Organic Carbon and Nitrogen in Soil. Philosophical Transactions: Biological Sciences, 329: 361–368.
library(deSolve) Cin=c(0.6,0.1,0.3,0.1,2.7) T=seq(1/12,200,by=1/12) hw=carbonTurnover(tt=T,clay=23.4,C0=Cin,In=1.2,Dr=1.44,effcts=0.85,"euler") matplot(T,hw[,2:6], type="l", lty=1, xlab="Time", ylab="C stocks (Mg/ha)") legend("topright", c("DPM", "RPM", "BIO", "HUM", "IOM"),lty=1, col=1:5, bty="n")
library(deSolve) Cin=c(0.6,0.1,0.3,0.1,2.7) T=seq(1/12,200,by=1/12) hw=carbonTurnover(tt=T,clay=23.4,C0=Cin,In=1.2,Dr=1.44,effcts=0.85,"euler") matplot(T,hw[,2:6], type="l", lty=1, xlab="Time", ylab="C stocks (Mg/ha)") legend("topright", c("DPM", "RPM", "BIO", "HUM", "IOM"),lty=1, col=1:5, bty="n")
This function determines the suitability classes for Cation Exchange Capacity (CEC) requirements of selected agricultural crops and forest trees
CECSuit(value, crop)
CECSuit(value, crop)
value |
input Cation Exchange Capacity (Cmol(+)/kg). |
crop |
crop of interest for which CEC suitability class is sought |
input value can be a map or just a numerical entry of CEC (cmol(+)/kg)
The output is CEC suitability class for the crop. The output is an integer value for suitability class: 1- highly suitable; 2 - moderately suitable; 3 - marginally suitable; 4 - currently not suitable; 5 - not suitable
The output raster map of CEC suitability is given if the input value is raster map
Christian Thine Omuto
Sys, C., Van Ranst, E., Debaveye, J. and Beerneaert, F.1993. Land evaluation: Part III: Crop requirements. Development Cooperation, Belgium.
Naidu, L.G.K., Ramamurthy, V., Challa O., Hegde, R. and Krishnan, P. 2006. Manual, Soil-site Suitability Criteria for Major Crops, National Bureau of Soil Survey and Land Use Planning, ICAR, Nagpur, India
FAO Crop Suitability Requirements: http://ecocrop.fao.org/ecocrop/srv/en/home
suitability
, tempSuit
, rainSuit
CECSuit(22.4,"pineaple")
CECSuit(22.4,"pineaple")
This function displays names of integer classes (or levels) of derived codes of soil conditions produced in the package
classCode(value, indicator)
classCode(value, indicator)
value |
Integer value of the soil condition indicator |
indicator |
Soil condition whose class (x) is sought. The default = "fertility" if fertility is the soil condition |
This is for interpretation of the integer codes of the soil conditions generated in the package
Name of the level of soil condition
classCode(2,"texture") suitclas=classCode(4,"suitability") levels(suitclas)
classCode(2,"texture") suitclas=classCode(4,"suitability") levels(suitclas)
This function develops a Look-Up Table (LUT) for the class type map of soil condition. LUT is important map legends or maps re-classification.
classLUT(fgrid,indicator)
classLUT(fgrid,indicator)
fgrid |
Input classified map |
indicator |
The soil condition indicator of interest as contained in the input map for example, "texture", "salinity", etc. |
The input raster map should contain only one band for the soil indicator for clear identification of the band.
The output is a dataframe containing classes in the map and corresponding unique integers
Christian Thine Omuto
textrd=suitabinput["texture"] LUT=classLUT(textrd,"texture") LUT
textrd=suitabinput["texture"] LUT=classLUT(textrd,"texture") LUT
This is a database function for displaying the class names and codes used in the soil assessment package
classnames(indicator)
classnames(indicator)
indicator |
indicator of soil condition group of interest. Example: texture, suitability, drainage, fertility, erodibility |
Table of soil condition code and name
x="texture" classnames(x)
x="texture" classnames(x)
This function normalizes the decision ranking table and determines consistency of the decisions
comparisonTable(df)
comparisonTable(df)
df |
A matrix of rank decisions with complete column names. |
The column names of the rank-decision table should correspond with the names of the criteria maps
nmtx: a normalized pairwise comparison matrix crt: consistency index and message on whether the input decisions are consistent for analysis
Christian Thine Omuto
Barzilai J. and Golany B., 1990. Deriving Weights from Pairwise Comparison Matrices: the Additive Case. Operations Research Letters 9: 407–410.
data(nutrient) library(FuzzyAHP) comparisonTable(nutrient)
data(nutrient) library(FuzzyAHP) comparisonTable(nutrient)
This function enables development of own function for harmonizing soil indicators to standard values
conversion(x, A, B, method)
conversion(x, A, B, method)
x |
input predictor value |
A |
location parameter representing the value of target variable when the predictors are minimal (or the y-intercept) |
B |
Rate parameter representing the rate of change of the target variable with the predictor (or the slope) |
method |
model relationship between target and predictor variables |
model for the relationship between target and predictor variables can be "linear", "power", "exponential", "log". Default is "linear"
model object containing predictive parameters of the conversion model
Christian Thine Omuto
van Looy k, Bouma J, Herbst M, Koestel J, Minasny B, Mishra U, Montzka C, Nemes A, Pachepsky AY, Padarian J, Schaap MG, Tóth B, Verhoef A, Jan Vanderborght, van der Ploeg MJ, Weihermüller L, Zacharias S, Zhang Y, Vereecken H. 2017. Pedotransfer functions in Earth System Science: Challenges and Perspectives. Reviews of Geophysics 55(4): 1199-1256.
Sudduth KA, Kitchen RN, Wiebold WJ, Batchelor W. 2005. Relating apparent electrical conductivity to soil properties across the North-Central USA. Computers and Electronics in Agriculture, 46(1-3):263-283
ECconversion1
, ECconversion2
, ECconversion4
x=as.vector(c(0.800,2.580,0.980,0.532,1.870, 18.500,0.430,0.302,0.345,2.700)) y=as.vector(c(17.88, 6.43, 3.83, 7.18, 6.64, 14.83, 4.19, 7.31, 3.21, 18.41)) xy=as.data.frame(cbind(x,y)) names(xy)=c("ECa", "EC") EC3.ml=nls(EC~conversion(ECa,A,B), start=c(A=0.1, B=0.8), data=xy) cor.test(fitted(EC3.ml),xy$EC) plot(fitted(EC3.ml)~xy$EC) abline(0,1)
x=as.vector(c(0.800,2.580,0.980,0.532,1.870, 18.500,0.430,0.302,0.345,2.700)) y=as.vector(c(17.88, 6.43, 3.83, 7.18, 6.64, 14.83, 4.19, 7.31, 3.21, 18.41)) xy=as.data.frame(cbind(x,y)) names(xy)=c("ECa", "EC") EC3.ml=nls(EC~conversion(ECa,A,B), start=c(A=0.1, B=0.8), data=xy) cor.test(fitted(EC3.ml),xy$EC) plot(fitted(EC3.ml)~xy$EC) abline(0,1)
The function creates spatial dataframe of normalized soil texture proportions. They are normalized to 100 percent
createTexturedata(clay,silt,sand)
createTexturedata(clay,silt,sand)
clay |
clay proportion of soil texture in percent |
silt |
silt proportion of soil texture in percent |
sand |
sand proportion of soil texture in percent |
the input data of soil texture proportions are imported into R as spatial raster or dataframe. They need to have uniform coordinate reference system (CRS) and same pixel size (resolution) if in raster map format. The sum of the proportions should be close to 100 per cent for each row
The output is a spatial pixel dataframe of normalized soil texture proportions (for each pixel)
It's important to ensure the input data does not have negative values nor add up to far below or above 100 per cent. It's also important to adhere to the order of the input data: clay, silt, sand
Christian Thine Omuto
createTexturedata
, appendTextureclass
#data(textureinput) newmap=textureinput texturedata=createTexturedata(newmap$clay, newmap$silt, newmap$sand) cor(texturedata$CLAY,texturedata$CLAY_n)^2
#data(textureinput) newmap=textureinput texturedata=createTexturedata(newmap$clay, newmap$silt, newmap$sand) cor(texturedata$CLAY,texturedata$CLAY_n)^2
An index map of density of sampling points in a geographic area
DataAvailabilityIndex(Boundary, Scale, CP,Data)
DataAvailabilityIndex(Boundary, Scale, CP,Data)
Boundary |
a spatial polygon or data frame of coordinates of vertices of a bounding geographic area where data search is intended |
Scale |
unit area to show spatial density of available sampled points |
CP |
coordinate projection of the Boundary spatial polygon |
Data |
input spatial spreadsheet database containing all possible point samples |
The input spreadsheet database should contain spatial coordinates of available samples. Example input spatial spreadsheet database is the global soil database.The Scale should be provided in area units e.g., 0.5, 1, 20, 30 (square km). Large areas cover more data than small areas. Hence, they take time to process. Coordinate projection (CP) for Boundary polygon should be of formal class CRS (coordinate reference system). It's preferrable to provide CP for Boundary area similar to CP for input data
A spatial raster map of density of sample locations per unit (specified) area
Scales less than 0.1 square km may be too small for search. Large scales (say 10000 square km) may be too large and take time to process
Christian Thine Omuto
library(sp) library(raster) library(terra) x <- c(20.02,25.69,25.69,20.02) y <- c(-28.40,-32.76,-32.76,-34.84) yx=data.frame(cbind(x, y)) CRs="+proj=longlat +datum=WGS84 +no_defs" Data=SASglobeData("ph","ZAF") coordinates(Data)=~Longitude+Latitude crs(Data)=CRs Index=DataAvailabilityIndex(yx,60,CRs,Data) plot(Index)
library(sp) library(raster) library(terra) x <- c(20.02,25.69,25.69,20.02) y <- c(-28.40,-32.76,-32.76,-34.84) yx=data.frame(cbind(x, y)) CRs="+proj=longlat +datum=WGS84 +no_defs" Data=SASglobeData("ph","ZAF") coordinates(Data)=~Longitude+Latitude crs(Data)=CRs Index=DataAvailabilityIndex(yx,60,CRs,Data) plot(Index)
A function to harmonize soil property between uniform depth intervals in a set of observation pits
depthharm(soildata, var.name, lam, d)
depthharm(soildata, var.name, lam, d)
soildata |
soil data containing soil property to be harmonized and observed depth intervals |
var.name |
name of target variable or soil property to be harmonized |
lam |
a factor to improve prediction of target soil property between sampled depths |
d |
target uniform depth intervals for harmonizing the target soil propert |
Input soil data must be a dataframe or class of ProfileCollection. The smoothing factor improves prediction of the target soil propert. Its default value is 0.1. Desired depth intervals are seperated by comma and should be choosen between minimum and maximum depths in the soil data.
The output is a list of two dataframes: harmonized.d is a dataframe of harmonized soil property at target depth intervals. obs_n_pred is ugmented dataframe of observed and harmonized soil properties
Bishop, T.F.A., McBratney, A.B., Laslett, G.M., 1999. Modelling soil attribute depth functions with equal-area quadratic smoothing splines. Geoderma 91, 27–45. https://doi.org/10.1016/S0016-7061(99)00003-8
Malone, B.P., McBratney, A.B., Minasny, B., Laslett, G.M., 2009. Mapping continuous depth functions of soil carbon storage and available water capacity. Geoderma 154, 138–152. https://doi.org/10.1016/j.geoderma.2009.10.007
Ponce-Hernandez, R., Marriott, F.H.C., Beckett, P.H.T., 1986. An improved method for reconstructing a soil profile from analyses of a small number of samples. Journal of Soil Science 37, 455–467. https://doi.org/10.1111/j.1365-2389.1986.tb00377.x
library(aqp) library(plyr) library(sp) x=c(rep(2.12,4),rep(2.05,4)) y=c(rep(9.34,4),rep(8.17,4)) pit=c(rep(1,4),rep(2,4)) depthcode=c(1,2,3,4,1,2,3,4) upper=c(0,18,25,35,0,12,33,50) lower=c(10,25,35,67,12,33,50,100) pH=c(6.7,5.5,5.1,6.7,6.4,5.8,5.3,5.0) df=data.frame(pit,x,y,upper,lower,depthcode,pH) lat=df$x;lon=df$y;id=df$pit;top=df$upper; bottom=df$lower;horizon=df$depthcode;Varn=df$pH soildata <- join(data.frame(id, top, bottom, Varn, horizon), data.frame(id, lat, lon), type='inner') depths(soildata) <- id ~ top + bottom site(soildata) <- ~ lat + lon coordinates(soildata) <- ~ lat + lon proj4string(soildata) <- CRS("+proj=longlat +datum=WGS84") depth.s = depthharm(soildata, var.name= "Varn", lam=0.01,d = t(c(0,10,40,80,100,150))) plot(soildata, color= "Varn", name="horizon")
library(aqp) library(plyr) library(sp) x=c(rep(2.12,4),rep(2.05,4)) y=c(rep(9.34,4),rep(8.17,4)) pit=c(rep(1,4),rep(2,4)) depthcode=c(1,2,3,4,1,2,3,4) upper=c(0,18,25,35,0,12,33,50) lower=c(10,25,35,67,12,33,50,100) pH=c(6.7,5.5,5.1,6.7,6.4,5.8,5.3,5.0) df=data.frame(pit,x,y,upper,lower,depthcode,pH) lat=df$x;lon=df$y;id=df$pit;top=df$upper; bottom=df$lower;horizon=df$depthcode;Varn=df$pH soildata <- join(data.frame(id, top, bottom, Varn, horizon), data.frame(id, lat, lon), type='inner') depths(soildata) <- id ~ top + bottom site(soildata) <- ~ lat + lon coordinates(soildata) <- ~ lat + lon proj4string(soildata) <- CRS("+proj=longlat +datum=WGS84") depth.s = depthharm(soildata, var.name= "Varn", lam=0.01,d = t(c(0,10,40,80,100,150))) plot(soildata, color= "Varn", name="horizon")
This function determines the suitability classes for soil depth requirements of selected agricultural crops and forest trees
depthSuit(value, crop)
depthSuit(value, crop)
value |
Input soil depth in cm |
crop |
The crop of interest for which soil depth suitability class is sought |
The input value can be map or just a numerical entry of soil depth in cm
The output is soil depth suitability class for the crop. The output is integer value for suitability class: 1- highly suitable; 2 - moderately suitable; 3 - marginally suitable; 4 - currently not suitable; 5 - not suitable
Christian Thine Omuto
Sys, C., Van Ranst, E., Debaveye, J. and Beerneaert, F.1993. Land evaluation: Part III: Crop requirements. Development Cooperation, Belgium.
Naidu, L.G.K., Ramamurthy, V., Challa O., Hegde, R. and Krishnan, P. 2006. Manual, Soil-site Suitability Criteria for Major Crops, National Bureau of Soil Survey and Land Use Planning, ICAR, Nagpur, India
FAO Crop Suitability Requirements: http://ecocrop.fao.org/ecocrop/srv/en/home
suitability
, tempSuit
, fertilitySuit
#data(suitabinput) library(sp) library(raster) LUT=data.frame(map=c(1,2,3,4,5,6),new=c(100,20,30,40,60,80)) newmap=(suitabinput["depthcodes"]) newmap$depth=reclassifyMap(newmap["depthcodes"],LUT) newmap$melon=depthSuit(newmap$depth,"melon") summary(newmap$depth) spplot(newmap["depth"])
#data(suitabinput) library(sp) library(raster) LUT=data.frame(map=c(1,2,3,4,5,6),new=c(100,20,30,40,60,80)) newmap=(suitabinput["depthcodes"]) newmap$depth=reclassifyMap(newmap["depthcodes"],LUT) newmap$melon=depthSuit(newmap$depth,"melon") summary(newmap$depth) spplot(newmap["depth"])
This function determines the suitability classes for drainage requirements for selected agricultural crops and forest trees
drainageSuit(value, crop)
drainageSuit(value, crop)
value |
Input drainage class code |
crop |
The crop of interest for which drainage suitability class is sought. |
The input value can be a map or an integer of drainage class code. The textural class code is obtained using classCode("drainage")
The output is drainage suitability class for the crop. The output is an integer value for suitability class: 1- highly suitable; 2 - moderately suitable; 3 - marginally suitable; 4 - currently not suitable; 5 - not suitable
If the input value is raster map, then the output will also be a raster map of drainage suitability for the crop of interest
Christian Thine Omuto
Sys, C., Van Ranst, E., Debaveye, J. and Beerneaert, F.1993. Land evaluation: Part III: Crop requirements. Development Cooperation, Belgium.
Naidu, L.G.K., Ramamurthy, V., Challa O., Hegde, R. and Krishnan, P. 2006. Manual, Soil-site Suitability Criteria for Major Crops, National Bureau of Soil Survey and Land Use Planning, ICAR, Nagpur, India
FAO Crop Suitability Requirements: http://ecocrop.fao.org/ecocrop/srv/en/home
drainageSuit(6,"cassava")
drainageSuit(6,"cassava")
This function converts electrical conductivity measurements of a soil solution to that of soil paste extract. It considers the influence of texture, organic matter content, and clay content on electrical conductivity conversion. These factors and ratio of soil:water mix for the solution and conversion method must be indicated.
ECconversion1(ec,texture,method,extract,oc=NULL,clay=NULL)
ECconversion1(ec,texture,method,extract,oc=NULL,clay=NULL)
ec |
measured electrical conductivity of the soil solution |
texture |
soil textural class according to USDA or its equivalent. Texture class is given in terms of class codes as given in classnames("texture") |
method |
method for converting electrical conductivity of the soil:water mix to that of the soil paste extract. The methods included are FAO, sonmez, and hogg. The default is FAO |
extract |
ratio of soil:water in extract solution for measuring electrical conductivity was measured. Example is 1:1, 1:2, etc. The default is 1:1 |
oc |
organic matter content of the soil in percent |
clay |
clay content of the soil in percent |
This function considers the influence of texture and soil-water solution on conversion of electrical conductivities. The functions includes FAO, sonmez, and hogg conversion models. FAO model requires information on clay content and organic carbon content.
equivalent electrical conductivity of saturated soil extract
Christian Thine Omuto
FAO. 2006. Soil description guidelines. FAO, Rome.
Sonmez S, Buyuktas D, Asri FO. 2008. Assessment of different soil to water ratios (1:1, 1:2.5, 1:5) in soil salinity studies. Geoderma, 144: 361-369
Hogg TTJ, Henry JL. 1984. Comparison of 1:1 and 1:2 suspensions and extracts with the saturation extracts in estimating salinity in Saskatchewan. Can. J. Soil Sci. 1984, 64, 699–704
ECconversion2
, ECconversion3
, ECconversion4
library(sp) library(raster) ECconversion1(7.31,"SiCl","FAO","1:2.5",0.91,22.5) ec=suitabinput["ec"] soc=nutrindicator["soc"] clay=textureinput["clay"] texture=suitabinput["texture"] newmap=ec newmap$ECe=ECconversion1(ec$ec,texture$texture,"FAO","1:2.5",soc$soc,clay$clay) spplot(newmap["ECe"], main="Equivalent ECse")
library(sp) library(raster) ECconversion1(7.31,"SiCl","FAO","1:2.5",0.91,22.5) ec=suitabinput["ec"] soc=nutrindicator["soc"] clay=textureinput["clay"] texture=suitabinput["texture"] newmap=ec newmap$ECe=ECconversion1(ec$ec,texture$texture,"FAO","1:2.5",soc$soc,clay$clay) spplot(newmap["ECe"], main="Equivalent ECse")
This function converts electrical conductivity measurements of soil solution to that of soil paste extract. The ratio of soil:water mix for the solution and conversion method must be indicated
ECconversion2(ec, method, extract)
ECconversion2(ec, method, extract)
ec |
measured electrical conductivity of the soil solution in dS/m |
method |
method for converting electrical conductivity of the soil:water mix to that of the soil paste extract. The methods included are USDA, landon, kargas, ozkan, hogg, park, visconti, korsandi, shahid, klaustermeier, and he. The default is USDA |
extract |
ratio of soil:water in extract solution for measuring electrical conductivity was measured. Example is 1:1, 1:2, etc. Default is 1:1 |
This function assumes no influence of texture, clay content, etc on the conversion of electrical conductivities
electrical conductivity equivalent for saturated soil extract in dS/m
Models that work with soil solutions in 1:1 soil-water mix are: USDA, landon, kargas, ozkan,hogg, and zhang. Models for 1:2 solutions are: USDA and hogg. Models for 1:2.5 are: ozkan and shahid. landon model also works for 1:3 soil solution. Models for 1:5 are: USDA, landon, kargas, ozkan, chi, park, visconti, korsandi, klaustermeier, and he. The function only works for soil solution mix ratio handled by the respective model.
Christian Thine Omuto
Sonmez S, Buyuktas D, Asri FO. 2008. Assessment of different soil to water ratios (1:1, 1:2.5, 1:5) in soil salinity studies. Geoderma, 144: 361-369
Kargas G, Chatzigiakoumis I, Kollias A, Spiliotis D, Massas I, Kerkides P. 2018. Soil salinity assessment using saturated paste and mass soil:water 1:1 and 1:5 ratios extracts. Water, 10:1589, doi:10.3390/w10111589
ECconversion1
, ECconversion3
, ECconversion4
library(sp) ECconversion2(0.75, "USDA","1:1") newmap = suitabinput["ec"] newmap$salinity=ECconversion2(newmap$ec,"hogg","1:1") str(newmap$salinity) spplot(newmap["salinity"])
library(sp) ECconversion2(0.75, "USDA","1:1") newmap = suitabinput["ec"] newmap$salinity=ECconversion2(newmap$ec,"hogg","1:1") str(newmap$salinity) spplot(newmap["salinity"])
This function enables development of own function for harmonizing soil indicators to standard values
ECconversion3(x, A, B, method)
ECconversion3(x, A, B, method)
x |
input predictor value |
A |
location parameter representing the value of target variable when the predictors are minimal (or the y-intercept) |
B |
Rate parameter representing the rate of change of the target variable with the predictor (or the slope) |
method |
model relationship between target and predictor variables |
model for the relationship between target and predictor variables can be "linear", "power", "exponential", "log". Default is "linear"
model object containing predictive parameters of the conversion model
Christian Thine Omuto
van Looy k, Bouma J, Herbst M, Koestel J, Minasny B, Mishra U, Montzka C, Nemes A, Pachepsky AY, Padarian J, Schaap MG, Tóth B, Verhoef A, Jan Vanderborght, van der Ploeg MJ, Weihermüller L, Zacharias S, Zhang Y, Vereecken H. 2017. Pedotransfer functions in Earth System Science: Challenges and Perspectives. Reviews of Geophysics 55(4): 1199-1256.
Sudduth KA, Kitchen RN, Wiebold WJ, Batchelor W. 2005. Relating apparent electrical conductivity to soil properties across the North-Central USA. Computers and Electronics in Agriculture, 46(1-3):263-283
ECconversion1
, ECconversion2
, ECconversion4
x=as.vector(c(0.800,2.580,0.980,0.532,1.870, 18.500,0.430,0.302,0.345,2.700)) y=as.vector(c(17.88, 6.43, 3.83, 7.18, 6.64, 14.83, 4.19, 7.31, 3.21, 18.41)) xy=as.data.frame(cbind(x,y)) names(xy)=c("ECa", "EC") EC3.ml=nls(EC~ECconversion3(ECa,A,B), start=c(A=0.1, B=0.8), data=xy) cor.test(fitted(EC3.ml),xy$EC) plot(fitted(EC3.ml)~xy$EC) abline(0,1)
x=as.vector(c(0.800,2.580,0.980,0.532,1.870, 18.500,0.430,0.302,0.345,2.700)) y=as.vector(c(17.88, 6.43, 3.83, 7.18, 6.64, 14.83, 4.19, 7.31, 3.21, 18.41)) xy=as.data.frame(cbind(x,y)) names(xy)=c("ECa", "EC") EC3.ml=nls(EC~ECconversion3(ECa,A,B), start=c(A=0.1, B=0.8), data=xy) cor.test(fitted(EC3.ml),xy$EC) plot(fitted(EC3.ml)~xy$EC) abline(0,1)
This function allows approximate conversion of other soil salt measurements into equivalent electrical conductivity (EC) in dS/m. These measurements include total soluble salts (TSS), total dissolved solids (TDS) and EC in mmho/cm
ECconversion4(x,target)
ECconversion4(x,target)
x |
is a numeric value of salt to convert to equivalent EC in dS/m |
target |
the target salt measurement to be converted into equivalent electrical conductivity (EC) in dS/m. It can be TDS (mg/l or ppm), TSS (mmol/l), EC in (mmho/cm) |
The target is specified as TDS or TSS or mmho.
The output is a numeric value of equivalent electrical conductivity (EC) in dS/m
TDS should be given in mg/l or ppm. TSS should be given in mmol/l. The function does not convert salt values between different measurement methods
Christian Thine Omuto
ECconversion1
, ECconversion2
, pedoTransfer
ECconversion4(200,"TSS") ECconversion4(20,"TDS") ECconversion4(2,"mmho")
ECconversion4(200,"TSS") ECconversion4(20,"TDS") ECconversion4(2,"mmho")
Information index for relative predictive performance of soil EC harmonization models
ECharm_Info(solution)
ECharm_Info(solution)
solution |
ratio of soil-water solution for the extract used in measuring electrical conductivity. |
Ratio in text format for the soil-water solution for the extract used in measuring EC. It’s given in quotation marks. Current models consider “1:2”, “1:2.5”, and “1:5” ratios. Default ratio is “1:2”
Graphical display of the predictive performance index for the harmonization models in different regions of the world: Africa, Asia, Near East and North Africa (NENA), Latin America and Caribbean (LAC), north America, and Europe. The performance index ranges between 0 (poor) to 1 (best).
The function currently works for 1:2, 1:2.5, and 1:5. These ratios must be entered in quotation marks.Due to periodic update,internet connectivity is needed for the function to work.
Christian Thine Omuto
PHharm_Info
, SASdata_densityInfo
ECharm_Info("1:2")
ECharm_Info("1:2")
This function determines the suitability classes for Electrical Conductivity requirements for selected agricultural crops and forest trees
ECSuit(value, crop)
ECSuit(value, crop)
value |
Input electrical conductivity in dS/m. |
crop |
The crop of interest for which EC suitability class is sought. |
The input value can be map or just a numerical entry of electrical conductivity (ECe) of saturated paste extract or its equivalent in dS/m
The output is EC suitability class for the crop. The output is integer value for suitability class: 1- highly suitable; 2 - moderately suitable; 3 - marginally suitable; 4 - currently not suitable; 5 - not suitable
Should the input value be raster map, then the output will also be a raster map of Electrical Conductivity suitability for the crop of interest
Christian Thine Omuto
Sys, C., Van Ranst, E., Debaveye, J. and Beerneaert, F.1993. Land evaluation: Part III: Crop requirements. Development Cooperation, Belgium.
Naidu, L.G.K., Ramamurthy, V., Challa O., Hegde, R. and Krishnan, P. 2006. Manual, Soil-site Suitability Criteria for Major Crops, National Bureau of Soil Survey and Land Use Planning, ICAR, Nagpur, India
FAO Crop Suitability Requirements: http://ecocrop.fao.org/ecocrop/srv/en/home
suitability
, PHSuit
, fertilitySuit
library(sp) ECSuit(0.78,"yam") ec=(suitabinput["ec"]) soc=(nutrindicator["soc"]) clay=(textureinput["clay"]) texture=(suitabinput["texture"]) newmap=ec newmap$ECe=ECconversion1(ec$ec,texture$texture,"FAO","1:2.5",soc$soc,clay$clay) newmap$wheat=ECSuit(newmap$ECe,"wheat") spplot(newmap["wheat"], main="EC suitability for wheat") summary(newmap$wheat)
library(sp) ECSuit(0.78,"yam") ec=(suitabinput["ec"]) soc=(nutrindicator["soc"]) clay=(textureinput["clay"]) texture=(suitabinput["texture"]) newmap=ec newmap$ECe=ECconversion1(ec$ec,texture$texture,"FAO","1:2.5",soc$soc,clay$clay) newmap$wheat=ECSuit(newmap$ECe,"wheat") spplot(newmap["wheat"], main="EC suitability for wheat") summary(newmap$wheat)
A function to determine soil erodibility factor from a choice of different erodibility models
erodFUN(sand,silt,clay,OC,texture,Struct,method)
erodFUN(sand,silt,clay,OC,texture,Struct,method)
sand |
sand proportion (percent) of the soil texture |
silt |
silt proportion (percent) of the soil texture |
clay |
clay proportion (percent) of the soil texture |
OC |
soil carbon content (percent) |
texture |
soil texture code representing the USDA soil textural class. Use classnames("texture") to insert the correct texture code |
Struct |
soil structure code representing the soil structure class. Use classnames("structure") to insert the correct structure code |
method |
method for determining soil erodibility. The following methods are included: WSmith,Yang,Renard,Bouyoucos,Denardin,Wang,Wisch1,Wisch2,Sharpley,Cheng,Auer. |
soil erodibility factor ranging between 0 and 1
Christian Thine Omuto
Benavidez R, Bethana J, Maxwell D, Norton K. 2018. A review of the (Revised) Universal Soil Loss Equation ((R)USLE): with a view to increasing its global applicability and improving soil loss estimates. Hydrol. Earth Syst. Sci., 22, 6059–6086
Omuto CT and Vargas R. 2009. Combining pedometrics, remote sensing and field observations for assessing soil loss in challenging drylands: a case study of northwestern Somalia. Land Degrad. Develop. 20: 101–115
erosivFUN
, erodibilityRisk
, sloplenFUN
library(sp) bx=suitabinput sand=textureinput["sand"] silt=textureinput["silt"] clay=textureinput["clay"] soc=nutrindicator["soc"] bx$permeability=permeabilityClass(bx$texture) bx$wsmith=erodFUN(sand$sand,silt$silt,clay$clay,soc$soc,bx$texture, bx$structure,"WSmith") bx$renard=erodFUN(sand$sand,silt$silt,clay$clay,soc$soc,bx$texture, bx$structure,"Renard") summary(bx$renard) spplot(bx["wsmith"])
library(sp) bx=suitabinput sand=textureinput["sand"] silt=textureinput["silt"] clay=textureinput["clay"] soc=nutrindicator["soc"] bx$permeability=permeabilityClass(bx$texture) bx$wsmith=erodFUN(sand$sand,silt$silt,clay$clay,soc$soc,bx$texture, bx$structure,"WSmith") bx$renard=erodFUN(sand$sand,silt$silt,clay$clay,soc$soc,bx$texture, bx$structure,"Renard") summary(bx$renard) spplot(bx["wsmith"])
This function classifies soil erodibility factor into classes of risk to erosion
erodibilityRisk(x)
erodibilityRisk(x)
x |
soil erodibility factor value between 0 and 1 |
Erodibility factor ranges between 0 (lowest risk) to 1 (highest risk)
erodibility risk classes
Christian Thine Omuto
Wischmeier WH, Mannering JV. 1969. Relation of Soil Properties to its Erodibility, Soil and Water Management and Conservation, 15, 131–137 Benavidez R, Bethana J, Maxwell D, Norton K. 2018. A review of the (Revised) Universal Soil Loss Equation ((R)USLE): with a view to increasing its global applicability and improving soil loss estimates. Hydrol. Earth Syst. Sci., 22, 6059–6086
erosivFUN
, erodFUN
, sloplenFUN
library(sp) erodibilityRisk(0.8) x=suitabinput sand=textureinput["sand"] silt=textureinput["silt"] clay=textureinput["clay"] soc=nutrindicator["soc"] x$permeability=permeabilityClass(x$texture) x$renard=erodFUN(sand$sand,silt$silt,clay$clay,soc$soc,x$texture, x$structure,"Renard") x$erodibilityrisk=erodibilityRisk(x$renard) x$erodib=classCode(x$renard,"erodibility") summary(x$erodib) spplot(x["erodib"])
library(sp) erodibilityRisk(0.8) x=suitabinput sand=textureinput["sand"] silt=textureinput["silt"] clay=textureinput["clay"] soc=nutrindicator["soc"] x$permeability=permeabilityClass(x$texture) x$renard=erodFUN(sand$sand,silt$silt,clay$clay,soc$soc,x$texture, x$structure,"Renard") x$erodibilityrisk=erodibilityRisk(x$renard) x$erodib=classCode(x$renard,"erodibility") summary(x$erodib) spplot(x["erodib"])
This function assumes an algebraic relationship between annual rainfall amounts and rainfall erosivity. The relationship has constants that may depend of certain regions.
erosivFUN(rain,A,B, model)
erosivFUN(rain,A,B, model)
rain |
annual rainfall amounts in mm or Fourier index of rainfall |
A |
independent constant of the algebraic relationship between rainfall mounts and erosive energy (Energy=A+-B*rainfall) |
B |
rainfall coefficient of the algebraic relationship between rainfall mounts and erosive energy (Energy=A+-B*rainfall) |
model |
model defining the algebraic relationship between rainfall mounts and erosive energy. The model can be linear, power, logarithmic, Fourier, and exponential |
rainfall erosivity in MJ mm/ha/hr/yr
Christian Thine
Morgan RPC. 2005. Soil erosion and conservation. Blackwell. UK Benavidez R, Bethana J, Maxwell D, Norton K. 2018. A review of the (Revised) Universal Soil Loss Equation ((R)USLE): with a view to increasing its global applicability and improving soil loss estimates. Hydrol. Earth Syst. Sci., 22, 6059–6086
erosivFUN(587,151, 0.63, "linear")
erosivFUN(587,151, 0.63, "linear")
This function determines the suitability classes for ESP requirements of selected agricultural crops and forest trees
ESPSuit(value, crop)
ESPSuit(value, crop)
value |
Input Exchangeable Sodium Percent (ESP) |
crop |
crop of interest for which ESP suitability class is sought |
The input value can be map or just a numerical value of Exchangeable Sodium Percent (ESP)
The output is ESP suitability class for the crop. The output is integer value for suitability class: 1- highly suitable; 2 - moderately suitable; 3 - marginally suitable; 4 - currently not suitable; 5 - not suitable
If the input value is raster map, then the output will also be a raster map of ESP suitability for the crop of interest
Christian Thine Omuto
Sys, C., Van Ranst, E., Debaveye, J. and Beerneaert, F.1993. Land evaluation: Part III: Crop requirements. Development Cooperation, Belgium.
Naidu, L.G.K., Ramamurthy, V., Challa O., Hegde, R. and Krishnan, P. 2006. Manual, Soil-site Suitability Criteria for Major Crops, National Bureau of Soil Survey and Land Use Planning, ICAR, Nagpur, India
FAO Crop Suitability Requirements: http://ecocrop.fao.org/ecocrop/srv/en/home
suitability
, rainSuit
, fertilitySuit
ESPSuit(8.6,"broccoli")
ESPSuit(8.6,"broccoli")
This function establishes graphical representation of the landscape feature in the sample points. An approximation of Kolmogorov-Smirnov similarity test (D-statistic) between the sampled feature distribution and the population feature distribution is also given.
featureRep(fgrid,df )
featureRep(fgrid,df )
fgrid |
raster grid of the landscape feature |
df |
dataframe of sampled locations with similar coordinate reference system (CRS) as the input raster map |
The sampled points should have the same coordinate system as the landscape feature (raster map). The function extracts the raster map values, attaches them to the sample points, and creates histogram distributions: one for the feature map as contained in the sample points and another as contained in the raster map.
Histograms on back-to-back showing distribution of the landscape feature in the sampled points and on the map for similarity comparison
The input points dataframe and raster map must have similar coordinate reference system.
Christian Thine Omuto
Kolmogorov, A. N. 1933. Sulla determinazione empirica di una legge di distribuzione. Giornale dell’ Istituto Italiano degli Attuari 4: 83–91
Simard R, L'Ecuyer P. 2011. Computing the Two-Sided Kolmogorov–Smirnov Distribution. Journal of Statistical Software. 39 (11): 1–18. doi:10.18637/jss.v039.i11
library(Hmisc) data(soil) dem=suitabinput["dem"] featureRep(dem,soil)
library(Hmisc) data(soil) dem=suitabinput["dem"] featureRep(dem,soil)
This function determines the fertility levels given values of a soil property
fertilityRating(value, indicator = "nitrogen")
fertilityRating(value, indicator = "nitrogen")
value |
numerical value of soil property |
indicator |
soil property as fertility indicator |
The units for input values are: nitrogen (percent), phosphorus (mg/kg); potassium (cmol(+)/kg);carbon(percent);iron(mg/kg);zinc(mg/kg);manganese(mg/kg);boron(mg/kg);copper(mg/kg);sulfur(mg/kg); CEC(cmol(+)/kg)
soil fertility class code for the given soil property (fertility indicator)
Christian Thine Omuto
FAO, 1976. A framework for land evaluation. FAO Soils Bulletin 32 Sanchez PA, Couto W, Buol SW. 1982. The fertility capability soil classification system: Interpretation, applicability, and modification
Sanchez PA, Palm CA, Buol SW. 2003. Fertility capability soil classification: a tool to help assess soil quality in the tropics. Geoderma 114, 157 –185.
suitability
, saltRating
, fertilitySuit
library(sp) newmap=nutrindicator["iron"] newmap$ironclass=fertilityRating(newmap$iron,"iron") summary(newmap$iron) spplot(newmap["ironclass"])
library(sp) newmap=nutrindicator["iron"] newmap$ironclass=fertilityRating(newmap$iron,"iron") summary(newmap$iron) spplot(newmap["ironclass"])
This function determines the suitability classes for soil fertility requirements of selected agricultural crops
fertilitySuit(value, crop)
fertilitySuit(value, crop)
value |
Input soil fertility index. |
crop |
The crop of interest for which soil fertility suitability class is sought. |
The input value can be map or just a numerical entry of soil fertility index
The output is fertility suitability class for the crop. The output is integer value for suitability class: 1- highly suitable; 2 - moderately suitable; 3 - marginally suitable; 4 - currently not suitable; 5 - not suitable
If the input value is raster map, then the output will also be a raster map of fertility suitability for the crop of interest
Christian Thine Omuto
Sys, C., Van Ranst, E., Debaveye, J. and Beerneaert, F.1993. Land evaluation: Part III: Crop requirements. Development Cooperation, Belgium.
Naidu, L.G.K., Ramamurthy, V., Challa O., Hegde, R. and Krishnan, P. 2006. Manual, Soil-site Suitability Criteria for Major Crops, National Bureau of Soil Survey and Land Use Planning, ICAR, Nagpur, India
FAO Crop Suitability Requirements: http://ecocrop.fao.org/ecocrop/srv/en/home
suitability
, ESPSuit
, fertilityRating
library(sp) library(FuzzyAHP) fertilitySuit(1.56, "melon") newmap=(nutrindicator) newmap$carbon=fertilityRating((nutrindicator$soc),"carbon") newmap$nitrogen=fertilityRating((nutrindicator$nitrogen),"nitrogen") newmap$potassium=fertilityRating((nutrindicator$potassium),"potassium") newmap$phosphorus=fertilityRating((nutrindicator$phosphorus),"phosphorus") newmap$iron=fertilityRating((nutrindicator$iron),"iron") newmap$zinc=fertilityRating((nutrindicator$zinc),"zinc") newmap$manganese=fertilityRating((nutrindicator$manganese),"manganese") newmap$copper=fertilityRating((nutrindicator$copper),"copper") newmap$cec=fertilityRating((nutrindicator$cec),"cec") newmap$boron=fertilityRating((nutrindicator$boron),"boron") newmap$sulfur=fertilityRating((nutrindicator$sulfur),"sulfur") newmap$soc=NULL newmapT1=newmap@data valuT=as.matrix(newmapT1) data("nutrient") nutriens=comparisonTable(nutrient) newmapT1$fertility=suitability(nutrient, valuT) newmap@data$fertility=newmapT1$fertility newmap$fertilityokra=fertilitySuit(newmap$fertility,"okra") str(newmap$fertilityokra) spplot(newmap["fertilityokra"], main="Fertility suitability map for Okra")
library(sp) library(FuzzyAHP) fertilitySuit(1.56, "melon") newmap=(nutrindicator) newmap$carbon=fertilityRating((nutrindicator$soc),"carbon") newmap$nitrogen=fertilityRating((nutrindicator$nitrogen),"nitrogen") newmap$potassium=fertilityRating((nutrindicator$potassium),"potassium") newmap$phosphorus=fertilityRating((nutrindicator$phosphorus),"phosphorus") newmap$iron=fertilityRating((nutrindicator$iron),"iron") newmap$zinc=fertilityRating((nutrindicator$zinc),"zinc") newmap$manganese=fertilityRating((nutrindicator$manganese),"manganese") newmap$copper=fertilityRating((nutrindicator$copper),"copper") newmap$cec=fertilityRating((nutrindicator$cec),"cec") newmap$boron=fertilityRating((nutrindicator$boron),"boron") newmap$sulfur=fertilityRating((nutrindicator$sulfur),"sulfur") newmap$soc=NULL newmapT1=newmap@data valuT=as.matrix(newmapT1) data("nutrient") nutriens=comparisonTable(nutrient) newmapT1$fertility=suitability(nutrient, valuT) newmap@data$fertility=newmapT1$fertility newmap$fertilityokra=fertilitySuit(newmap$fertility,"okra") str(newmap$fertilityokra) spplot(newmap["fertilityokra"], main="Fertility suitability map for Okra")
A generic model for harmonizing soil data for salt-affected soils.
harmonization(x,A,B)
harmonization(x,A,B)
x |
- is input data to harmonize such as electrical conductivity (ec) or ph. |
A |
- is real number rate parameter or slope of the harmonization model |
B |
- is real number constant (intercept) of the harmonization model |
This is a generic linear model for harmonizing input soil data for assessing salt-affected soils.
a numeric output of harmonized ec or ph
Christian Thine Omto
ME_ECharmserve
, ME_PHharmserve
A = 1.08 B = 0.303 ec=2.45 harmonization(2.45,1.08,0.303)
A = 1.08 B = 0.303 ec=2.45 harmonization(2.45,1.08,0.303)
The function determines commonly used remote sensing indices with relationship with soil surface or vegetation cover characteristics.
imageIndices(blue, green,red,nir,swir1,swir2,index)
imageIndices(blue, green,red,nir,swir1,swir2,index)
blue |
blue image band with wavelength range: 0.452-0.512 µm |
green |
green image band with wavelength range: 0.533-0.59 µm |
red |
red image band with wavelength range: 0.636-0.673 µm |
nir |
NIR image band with wavelength range: 0.851-0.879 µm |
swir1 |
SWIR image band with wavelength range: 1.566-1.651 µm |
swir2 |
SWIR image band with wavelength range: 2.107-2.294 µm |
index |
index from combination of image bands such as NDVI, SAVI, SI, etc. The default is NDVI. |
The indices are based on multispectral bands: blue, green, red, NIR(near infrared), SWIR1 (short-wave infrared1) and SWIR2(short-wave infrared2)
dimensionless remote sensing index
Christian Thine Omuto
Gorji T, Yildirim A, Sertel E, Tanik A. 2019. Remote sensing approaches and mapping methods for monitoring soil salinity under different climate regimes. International Journal of Environment and Geoinformatics 6(1): 33-49 (2019)
imageIndices(0.15,0.05,0.18,0.25,0.36,0.45,"SAVI")
imageIndices(0.15,0.05,0.18,0.25,0.36,0.45,"SAVI")
This function determines the suitability classes for length of growing period (LGP) requirements for selected agricultural crops and forest trees
LGPSuit(value, crop)
LGPSuit(value, crop)
value |
Input length of growing period (LGP) in days. |
crop |
The crop of interest for which length of growing period (LGP) suitability class is sought |
The input value can be map or an integer value of LGP in days
The output is LGP suitability class for the crop. The output is an integer for suitability class: 1- highly suitable; 2 - moderately suitable; 3 - marginally suitable; 4 - currently not suitable; 5 - not suitable
If the input value is raster map, then the output will also be a raster map of LGP suitability for the crop of interest
Christian Thine Omuto
Sys, C., Van Ranst, E., Debaveye, J. and Beerneaert, F.1993. Land evaluation: Part III: Crop requirements. Development Cooperation, Belgium.
Naidu, L.G.K., Ramamurthy, V., Challa O., Hegde, R. and Krishnan, P. 2006. Manual, Soil-site Suitability Criteria for Major Crops, National Bureau of Soil Survey and Land Use Planning, ICAR, Nagpur, India
FAO Crop Suitability Requirements: http://ecocrop.fao.org/ecocrop/srv/en/home
suitability
, PHSuit
, fertilitySuit
library(sp) LGPSuit(138,"cotton") newmap = data.frame(LGP = c(1:6,158,160,211), lon = c(1,1,1,2,2,2,3,3,3), lat = c(rep(c(0, 1.5, 3),3))) coordinates(newmap) = ~lon+lat gridded(newmap) = TRUE newmap = as(newmap, "SpatialGridDataFrame") newmap$LGPmillet=LGPSuit(newmap$LGP,"millet") spplot(newmap["LGPmillet"], main="LGP suitability map for finger millet")
library(sp) LGPSuit(138,"cotton") newmap = data.frame(LGP = c(1:6,158,160,211), lon = c(1,1,1,2,2,2,3,3,3), lat = c(rep(c(0, 1.5, 3),3))) coordinates(newmap) = ~lon+lat gridded(newmap) = TRUE newmap = as(newmap, "SpatialGridDataFrame") newmap$LGPmillet=LGPSuit(newmap$LGP,"millet") spplot(newmap["LGPmillet"], main="LGP suitability map for finger millet")
A function for harmonizing soil electrical conductivity to the equivalent conductivity of saturated paste extract using mixed effects approach
ME_ECharm(EC, TEXCLASS, model, soilsolution)
ME_ECharm(EC, TEXCLASS, model, soilsolution)
EC |
a vector or single value of soil electrical conductivity to be harmonized. It should have been determined in a given soil solution (e.g. 1:2, 1:2.5 or 1:5) |
TEXCLASS |
soil textural class of the soil whose electrical conductivity is to be harmonized. String or test entry of USDA textural classes: Cl, ClLo,Lo,LoSa,Sa,SaCl,SaClLo,SaLo,SiCl,SiClLo,SiLo,Si,CS,MS,HCL,FS. The classes can be determined from Clay, Silt, and Sand proportions using createTexturedata function |
model |
functional model for relating EC to be harmonized and equivalent EC of saturated paste extract. Models considered are second order polynomial, sigmoid, spherical, gaussian, exponential, power, and linear functions. The default is polynomial |
soilsolution |
– soil:water mix ratio in which electrical conductivity was measured. The function is currently working on 1:2, 1:2.5, and 1:5. The default is 1:2 |
EC harmonization models, which were developed using global datasets, are designed to standardize soil electrical conductivity for applications in soil salt classification
numeric value of equivalent EC of saturated soil paste extract
The models are currently developed for soil solutions from 1:2, 1:2.5 and 1:5 soil:water mix ratios. The function only works with USDA soil textural classes. Convert other soil textural classes to USDA classes for all applications with this function.
Christian Thine Omuto
Omuto, C. T., Vargas, R.-R., EL Mobarak, A., Nuha, M., Viatkin, K., & Yigini, Y. (2020). Mapping of salt-affected soils – Technical manual. FAO. https://doi.org/10.4060/ca9215en
Omuto, C. T., Minasny, B., McBratney, A. B., & Biamah, E. K. (2006). Nonlinear mixed effect modelling for improved estimation of water retention and infiltration parameters. Journal of Hydrology, 330(3–4), 748–758. https://doi.org/10.1016/j.jhydrol.2006.05.006
Pinheiro, J. C., & Bates, D. M. (2000). Mixed-Effects Models in Sand S-PLUS. Springer New York. https://doi.org/10.1007/978-1-4419-0318-1
ME_PHharm
, ECconversion1
, ECconversion2
ndata=data.frame(EC=c(1,0.34,5.07,12.17, 2.219),TEX=c("Cl","SaCl","LoSa", "SiCl","SaClLo")) ndata$ESa1=ME_ECharm(ndata$EC,ndata$TEX,"power","1:5")
ndata=data.frame(EC=c(1,0.34,5.07,12.17, 2.219),TEX=c("Cl","SaCl","LoSa", "SiCl","SaClLo")) ndata$ESa1=ME_ECharm(ndata$EC,ndata$TEX,"power","1:5")
Mixed effects models for harmonizing electrical conductivity (EC)
Suit of mixed-effects models
Internet connectivity is needed for the function to work.
A function for harmonizing soil pH (KCl or CaCl2) to the equivalent pH (water) using mixed effects approach
ME_PHharm(ph, TEXCLASS, model, phtype)
ME_PHharm(ph, TEXCLASS, model, phtype)
ph |
a vector or single value of soil ph in KCl or CaCl2 to be harmonized |
TEXCLASS |
soil textural class of the soil whose ph is to be harmonized. String or test entry of USDA textural classes: Cl, ClLo, Lo,LoSa,Sa,SaCl,SaClLo,SaLo,SiCl,SiClLo,SiLo,Si,CS,MS,HCL,FS. The classes can be determined from Clay, Silt, and Sand proportions using createTexturedata function |
model |
functional model for relating ph in KCl or CaCl to be harmonized and equivalent ph (water). Models considered are second order polynomial, sigmoid, spherical, gaussian, exponential, power, and linear functions. The default is polynomial |
phtype |
KCl or CaCl2 solution for ph. The default is CaCl2 |
ph harmonization models, which were developed using global datasets, are designed to standardize soil ph for applications in soil salt classification
numeric value of equivalent ph (water)
The function only works with USDA soil textural classes. Convert other soil textural classes to USDA classes for all applications with this function.
Christian Thine Omuto
ME_ECharm
, ECconversion1
, ECconversion2
newdata=data.frame(ph=c(1.6,8.3,5.7,12.1,2.2),tex=c("Cl","SaCl","LoSa", "Si","SaClLo")) newdata$pH2=ME_PHharm(newdata$ph,newdata$tex,"exponential","kcl")
newdata=data.frame(ph=c(1.6,8.3,5.7,12.1,2.2),tex=c("Cl","SaCl","LoSa", "Si","SaClLo")) newdata$pH2=ME_PHharm(newdata$ph,newdata$tex,"exponential","kcl")
Mixed effects models for harmonizing soil pH
Suit of mixed-effects models
Internet connectivity is needed for the function to work.
Function to handle negative entries when assessing salt-affected soils
negData(vg,x)
negData(vg,x)
vg |
tag for soil property. Default is "ec" |
x |
numeric value of soil property to check |
Three tags for soil properties are allowed: "ec", "ph", "esp"
numeric value of soil property to correct. It return NA where negative "ec" or "esp" is involved or where ph<1 or ph>14
Christian Thine Omuto
negData("ph",14)
negData("ph",14)
This is an empirical function for deriving net primary production using climatic variables (mean temperature and rainfall amounts)
NPPmodel(rain,temperature,model)
NPPmodel(rain,temperature,model)
rain |
total annual rainfall amount in mm |
temperature |
average annual air temperature amount in degrees Celsius |
model |
model for calculating net primary production. Included models in the function are Miami, Schurr, and NCEAS |
This function is based on empirical models for calculating annual net primary production (NPP) of dry matter
Net primary production (NPP) of dry matter in grams per square meter per year
This empirical function estimates annual NPP in g/m2/year. It is a general model for all land cover types. It may be necessary to adjust it for certain cover types or geolocations
Christian Thine Omuto
Schuur, E. A. G. 2003. Productivity and global climate revisited: the sensitivity of tropical forest growth to precipitation. Ecology 84:1165–1170
Lieth, H. 1975. Modeling the primary productivity of the world. Pages 237–264 in H. Lieth and R. H. Whittaker, editors. Primary productivity of the biosphere. Springer-Verlag, New York, New York, USA
Del Grosso, S., Parton, W., Stohlgren, T., Zheng, D., Bachelef, D., Prince, S., Hibbard, K., Olson, R. 2008. Global potential net primary production predicted from vegetation class, precipitation, and temperature. Ecology, 89(8): 2117-2126
carbonTurnover
, RotCmoistcorrection
NPPmodel(800,23,"miami") NPPmodel(800,23,"schuur") NPPmodel(800,23,"NCEAS")
NPPmodel(800,23,"miami") NPPmodel(800,23,"schuur") NPPmodel(800,23,"NCEAS")
This is an 11-factor table of decision ranking of soil nutrient indicators
data("nutrient")
data("nutrient")
A dataframe with 11 factors for pairwise decision ranking of soil nutrient indicators.
The ranks are the recipricals of Saaty's scale of relative importance which are between 1 and 9
Hypothetical data of rank between soil nutrient indicators
data(nutrient) str(nutrient) plot(nutrient)
data(nutrient) str(nutrient) plot(nutrient)
A grid stack map of eleven variables for assessing soil fertility
data("nutrindicator")
data("nutrindicator")
Formal class 'SpatialGridDataFrame' [package "sp"] with 4 slots ..@ data :'data.frame': 16900 obs. of 11 variables: .. ..$ soc : num [1:16900] 0.163 0.242 0.233 0.218 0.179 ... .. ..$ nitrogen : num [1:16900] 0.0272 0.0242 0.0266 0.0275 0.0256 ... .. ..$ phosphorus: num [1:16900] 9.4 8.22 8.92 7.45 8.3 ... .. ..$ manganese : num [1:16900] 2.84 2.7 2.95 2.88 3.19 ... .. ..$ potassium : num [1:16900] 93.2 102.3 93.5 96.5 87.8 ... .. ..$ cec : num [1:16900] 10.9 10.7 10 10.1 10.2 ... .. ..$ boron : num [1:16900] 0.172 0.16 0.171 0.172 0.174 ... .. ..$ copper : num [1:16900] 0.368 0.421 0.37 0.369 0.412 ... .. ..$ iron : num [1:16900] 0.238 0.231 0.241 0.239 0.242 ... .. ..$ zinc : num [1:16900] 0.816 0.652 0.816 0.818 0.814 ... .. ..$ sulfur : num [1:16900] 153 131 119 135 163 ... ..@ grid :Formal class 'GridTopology' [package "sp"] with 3 slots .. .. ..@ cellcentre.offset: Named num [1:2] 383216 3341506 .. .. .. ..- attr(*, "names")= chr [1:2] "x" "y" .. .. ..@ cellsize : num [1:2] 357 357 .. .. ..@ cells.dim : int [1:2] 130 130 ..@ bbox : num [1:2, 1:2] 383038 3341327 429478 3387767 .. ..- attr(*, "dimnames")=List of 2 .. .. ..$ : chr [1:2] "x" "y" .. .. ..$ : chr [1:2] "min" "max" ..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slot .. .. ..@ projargs: chr "+proj=utm +zone=41 +datum=WGS84 +units=m +no_defs"
data(nutrindicator) str(nutrindicator) #spplot(nutrindicator["nitrogen"])
data(nutrindicator) str(nutrindicator) #spplot(nutrindicator["nitrogen"])
This generic pedo-transfer function is used to approximate EC values from other existing and easy-to-measure soil data
pedoTransfer(method="linear", df, ...)
pedoTransfer(method="linear", df, ...)
method |
modelling method to link EC and other soil predictors (properties). Default method is linear |
df |
dataframe containing measured EC and predictors of soil properies |
... |
names of measured EC and list of predictors (soil properties) seperated by comma. The names should match the variables in the accompanying dataframe |
This generic model can be used even with other soil properties. For example, it can be used to predict porosity from bulk density, carbon, and texture components as long as they are in the database and have known/suspected relationship
model for predicting EC given similar input data
This function can also be used to predict EC from apparent electrical conductivity of bulk soil, texture, and other important soil properties
Christian Thine Omuto
van Looy k, Bouma J, Herbst M, Koestel J, Minasny B, Mishra U, Montzka C, Nemes A, Pachepsky AY, Padarian J, Schaap MG, Tóth B, Verhoef A, Jan Vanderborght, van der Ploeg MJ, Weihermüller L, Zacharias S, Zhang Y, Vereecken H. 2017. Pedotransfer functions in Earth System Science: Challenges and Perspectives. Reviews of Geophysics 55(4): 1199-1256.
Sudduth KA, Kitchen RN, Wiebold WJ, Batchelor W. 2005. Relating apparent electrical conductivity to soil properties across the North-Central USA. Computers and Electronics in Agriculture, 46(1-3):263-283
library(caret) clay=as.data.frame(runif(120, 1,100)) silt=as.data.frame (runif(120,20,70)) sand=as.data.frame(runif(120,10.1,50.5)) pH=as.data.frame(runif(120,1,14)) EC=as.data.frame(runif(120,0.5,20.5)) OC=as.data.frame(runif(120,0.1,1.25)) soil4=cbind(EC,clay,silt,sand,OC,pH) names(soil4)=c("EC","clay","silt","sand","OC","pH") bound <- floor((nrow(soil4)/4)*3) df.train <- soil4[sample(nrow(soil4)), ][1:bound, ] df.test <- soil4[sample(nrow(soil4)), ][(bound+1):nrow(soil4[sample(nrow(soil4)), ]), ] EC1.lm=pedoTransfer("randomforest",df.train,EC, clay,sand,silt,OC,pH) df.test$EC1=predict(EC1.lm,newdata = df.test) cor(df.test$EC,df.test$EC1)^2 plot(df.test$EC~df.test$EC1) abline(1,1)
library(caret) clay=as.data.frame(runif(120, 1,100)) silt=as.data.frame (runif(120,20,70)) sand=as.data.frame(runif(120,10.1,50.5)) pH=as.data.frame(runif(120,1,14)) EC=as.data.frame(runif(120,0.5,20.5)) OC=as.data.frame(runif(120,0.1,1.25)) soil4=cbind(EC,clay,silt,sand,OC,pH) names(soil4)=c("EC","clay","silt","sand","OC","pH") bound <- floor((nrow(soil4)/4)*3) df.train <- soil4[sample(nrow(soil4)), ][1:bound, ] df.test <- soil4[sample(nrow(soil4)), ][(bound+1):nrow(soil4[sample(nrow(soil4)), ]), ] EC1.lm=pedoTransfer("randomforest",df.train,EC, clay,sand,silt,OC,pH) df.test$EC1=predict(EC1.lm,newdata = df.test) cor(df.test$EC,df.test$EC1)^2 plot(df.test$EC~df.test$EC1) abline(1,1)
This function determines the soil permeability classes according to the USDA soil textural classes
permeabilityClass(texture)
permeabilityClass(texture)
texture |
is a string decribing soil textural class |
Soil textural class is according to USDA textural triangle such as SiLo, Si, SaLo. The code is represented by first two letters of the class with the first letter in upper case, e.g., Si, Lo, Cl. Class codes with combination of textures have the first two letters included in the combination, e.g., SiLo, SaClLo, etc.
permeability class code. 1-very slow, 2-slow, 3-moderately slow, 4-moderate, 5-moderately rapid, 6-rapid, and 7-very rapid
Christian Thine Omuto
O'Geen, A. T. (2013) Soil Water Dynamics. Nature Education Knowledge 4(5):9
Soil Survey Staff. Soil Taxonomy A Basic System of Soil Classification for Making and Interpreting Soil Surveys. Agricultural Handbook No. 436. U.S. Government Printing Office Washington, DC, 1999.
library(sp) permeabilityClass("SaLo") texture=suitabinput["texture1"] texture$permeability=ifelse(texture$texture1=="Lo", permeabilityClass("Lo"),ifelse(texture$texture1=="SaLo", permeabilityClass("SaLo"),permeabilityClass("SiLo"))) str(texture$permeability) texture$Perm=classCode(texture$permeability,"permeability") spplot(texture["Perm"])
library(sp) permeabilityClass("SaLo") texture=suitabinput["texture1"] texture$permeability=ifelse(texture$texture1=="Lo", permeabilityClass("Lo"),ifelse(texture$texture1=="SaLo", permeabilityClass("SaLo"),permeabilityClass("SiLo"))) str(texture$permeability) texture$Perm=classCode(texture$permeability,"permeability") spplot(texture["Perm"])
A suit of functions for converting soil pH (KCl or CaCl2) to the equivalent pH (water)
PHConversion(ph, model,phtype)
PHConversion(ph, model,phtype)
ph |
a vector or single value of soil ph in KCl or CaCl2 to be converted to ph (water) |
model |
functional model for relating ph in KCl or CaCl to be converting and equivalent ph (water). Models considered are second order kabala, sadovski, davies, brennan functions. The default is kabala |
phtype |
KCl or CaCl2 solution for ph. The default is CaCl2 |
ph conversion models are those in the literature
numeric value of equivalent ph (water)
ph ranges between 1 and 14
Christian Thine Omuto
Davies, B.E. (1971). A Statistical Comparison of pH Values of some English Soils after Measurement in both Water and 0.01M Calcium Chloride. Soil Science Society of America Journal 35, 551–552. https://doi.org/10.2136/sssaj1971.03615995003500040022x
Kabała, C., Musztyfaga, E., Gałka, B., Łabuńska, D., Mańczyńska, P. (2016). Conversion of Soil pH 1:2.5 KCl and 1:2.5 H2O to 1:5 H2O: Conclusions for Soil Management, Environmental Monitoring, and International Soil Databases. Pol. J. Environ. Stud. 25, 647–653. https://doi.org/10.15244/pjoes/61549
Miller, R.O., Kissel, D.E. (2010). Comparison of Soil pH Methods on Soils of North America. Soil Sci. Soc. Am. J. 74, 310–316. https://doi.org/10.2136/sssaj2008.0047
Sadovski, A.N. (2019). Study on pH in water and potassium chloride for Bulgarian soils. EURASIAN JOURNAL OF SOIL SCIENCE (EJSS) 8, 11–16. https://doi.org/10.18393/ejss.477560
ME_PHharm, ME_ECharm, ECconversion1
testdata=data.frame(PHKC=c(6.45,8.34,5.07,12.17, 4.219),TEX=c("Cl","SaCl","LoSa", "Si","SaClLo")) testdata$PHs1=PHConversion(testdata$PHKC,"kabala","kcl")
testdata=data.frame(PHKC=c(6.45,8.34,5.07,12.17, 4.219),TEX=c("Cl","SaCl","LoSa", "Si","SaClLo")) testdata$PHs1=PHConversion(testdata$PHKC,"kabala","kcl")
Information index for relative predictive performance of soil pH harmonization models
PHharm_Info(solution)
PHharm_Info(solution)
solution |
solution for measuring soil pH |
Solution for measuring soil pH. It’s given in quotation marks. Current models consider “cacl2” and “kcl” ratios. Default solution is “cacl2”
Graphical display of the predictive performance index for the harmonization models in different regions of the world: Africa, Asia, Near East and North Africa (NENA), Latin America and Caribbean (LAC), north America, and Europe. The performance index ranges between 0 (poor) to 1 (best).
The function currently works for cacl2 and kcl. These solutions must be entered in quotation marks.Due to periodic update,internet connectivity is needed for the function to work.
Christian Thine Omuto
ECharm_Info
, SASdata_densityInfo
PHharm_Info("kcl")
PHharm_Info("kcl")
This function determines the suitability classes for soil pH requirements for selected agricultural crops and forest trees
PHSuit(value, crop)
PHSuit(value, crop)
value |
Input soil pH. |
crop |
The crop of interest for which soil pH suitability class is sought. |
The input value can be map or just a numerical entry of soil pH of a saturated paste extract
The output is pH suitability class for the crop. The output is integer value of suitability class: 1- highly suitable; 2 - moderately suitable; 3 - marginally suitable; 4 - currently not suitable; 5 - not suitable
If the input value is raster map, then the output will also be a raster map of pH suitability for the crop of interest
Christian Thine Omuto
Sys, C., Van Ranst, E., Debaveye, J. and Beerneaert, F.1993. Land evaluation: Part III: Crop requirements. Development Cooperation, Belgium.
Naidu, L.G.K., Ramamurthy, V., Challa O., Hegde, R. and Krishnan, P. 2006. Manual, Soil-site Suitability Criteria for Major Crops, National Bureau of Soil Survey and Land Use Planning, ICAR, Nagpur, India
FAO Crop Suitability Requirements: http://ecocrop.fao.org/ecocrop/srv/en/home
suitability
, ECSuit
, fertilitySuit
PHSuit(8.4,"cauliflower")
PHSuit(8.4,"cauliflower")
This function calculates statistical indices for accuracy between an array of two variables such as calibration and validation vectors. The indices are Bias, RMSE, R-squared, and NSE
predAccuracy(x,y)
predAccuracy(x,y)
x |
a numeric vector of first variable of the two variables for accuracy assessment |
y |
a numeric vector of second variable of the two variables for accuracy assessment |
The function calculates four indices for accuracy: bias, root mean square error (RMSE), r-squared, Nash-sutcliffe efficiency (NSE)
A table of four variables: bias, RMSE, Rsquared, and NSE
Christian Thine Omuto
Becker, R. A., Chambers, J. M. and Wilks, A. R. 1988. The New S Language. Wadsworth & Brooks/Cole.
Nash, J. E.; Sutcliffe, J. V. (1970). "River flow forecasting through conceptual models part I — A discussion of principles". Journal of Hydrology. 10 (3): 282–290
xy=data.frame(a=c(2,3,4,5,6,7,8,9),b=c(1,1.5,8,10,12,3.5,NA,18)) predAccuracy(xy$a,xy$b)$Rsquared
xy=data.frame(a=c(2,3,4,5,6,7,8,9),b=c(1,1.5,8,10,12,3.5,NA,18)) predAccuracy(xy$a,xy$b)$Rsquared
This functions uses bootstrap approach to estimate spatial maps of modelling prediction interval width and standard deviation
predUncertain(indata,fgrid, k, z, model="rf")
predUncertain(indata,fgrid, k, z, model="rf")
indata |
one column input spatial dataframe containing the target soil variable or its transformation |
fgrid |
Input grid or raster stack containing predictors set for the target soil variable |
k |
Set limit for number of realizations/simulations for bootstrap algorithm |
z |
Confidence interval level in percent (for example 95) |
model |
The model for predicting target soil variable using the predictors (for example linear) |
One-variable input dataframe is prefered or at least the first column should have the target soil variable to predict. It should not contain NAs. The number of realizations k need not be too high because the software multiplies it exponentially and may slow down the computing process if set to a high value. For example k=5 will results into more than 40 realizations created
a two-layer raster stack map of prediction width and standard deviation
The input dataframe and predictors need to have similar coordinate reference system (CRS). In addition, the input dataframe should not have missing entrie (NAs)
Christian Thine Omuto
Efron B. 1992. Jackknife-after-bootstrap standard errors and influence functions. Journal of the Royal Statistical Society. Series B (Methodological), 83–127.
regmodelSuit
, imageIndices
,predAccuracy
library(raster) library(caret) soil1=soil[,c("OC")] predictere=suitabinput[c("depthcodes","rain","texture","dem")] pred_uncert=predUncertain(soil1,predictere,3,90,"rf") plot(pred_uncert)
library(raster) library(caret) soil1=soil[,c("OC")] predictere=suitabinput[c("depthcodes","rain","texture","dem")] pred_uncert=predUncertain(soil1,predictere,3,90,"rf") plot(pred_uncert)
This function determines the suitability classes for rainfall requirements of selected agricultural crops and forest trees
rainSuit(value, crop)
rainSuit(value, crop)
value |
Input rainfall amounts in mm. |
crop |
The crop of interest for which rainfall suitability class is sought. |
The input value can be map or just numerical entry of annual rainfall amount in mm
The output is rainfall suitability class for the crop. The output is an integer for suitability class: 1- highly suitable; 2 - moderately suitable; 3 - marginally suitable; 4 - currently not suitable; 5 - not suitable
This function assumes rainfall as the source of water for crop development
Christian Thine Omuto
Sys, C., Van Ranst, E., Debaveye, J. and Beerneaert, F.1993. Land evaluation: Part III: Crop requirements. Development Cooperation, Belgium.
Naidu, L.G.K., Ramamurthy, V., Challa O., Hegde, R. and Krishnan, P. 2006. Manual, Soil-site Suitability Criteria for Major Crops, National Bureau of Soil Survey and Land Use Planning, ICAR, Nagpur, India
FAO Crop Suitability Requirements: http://ecocrop.fao.org/ecocrop/srv/en/home
suitability
, ESPSuit
, fertilitySuit
library(sp) rain=(suitabinput["rain"]) rain$rainmiaz=rainSuit(rain$rain,"wheat") summary(rain$rainmiaz) spplot(rain["rainmiaz"])
library(sp) rain=(suitabinput["rain"]) rain$rainmiaz=rainSuit(rain$rain,"wheat") summary(rain$rainmiaz) spplot(rain["rainmiaz"])
This function re-classifies an input raster maps based on input look-up table that specifies transition from map classes (or range of classes) to a new class (or range of classes)
reclassifyMap(fgrid,df)
reclassifyMap(fgrid,df)
fgrid |
Input raster map to be reclassified |
df |
Input look-up table for re-classification |
The look-up table should have at least two columns in which the first column contains the classes in the input map and the second column contains the new classes to be assigned
The output is a reclassified raster map
Christian Thine Omuto
Robert Hijman. Raster Package in R. https://www.rdocumentation.org/packages/raster
classCode
, classLUT
, classnames
library(sp) LUT=data.frame(map=c(1,2,3,4,5,6),new=c(100,20,30,40,60,80)) newmap=(suitabinput["depthcodes"]) newmap$depth=reclassifyMap(newmap["depthcodes"],LUT) newmap$melon=depthSuit(newmap$depth,"melon") summary(newmap$depth) spplot(newmap["depth"])
library(sp) LUT=data.frame(map=c(1,2,3,4,5,6),new=c(100,20,30,40,60,80)) newmap=(suitabinput["depthcodes"]) newmap$depth=reclassifyMap(newmap["depthcodes"],LUT) newmap$melon=depthSuit(newmap$depth,"melon") summary(newmap$depth) spplot(newmap["depth"])
This function evaluates suitability of most predition models in mapping soil properties using a set of predictors
regmodelSuit(df, ...)
regmodelSuit(df, ...)
df |
a dataframe of target soil property and its predictors |
... |
name of the target soil variable to predict and names of its predictors |
The name of the target soil variable to predict and names of its predictors are seperated by commas and are similar to column names of the corresponding variables in the supplied dataframe. The name of the target soil variable starts the list and followed by the names of its predictors. For example, if the dataframe has EC, landcover,DEM, Slope, NDVI, etc., then the input could be (soil,EC,landcover,Slope,DEM).
A table of model statistics such as root mean square error (RMSE), mean absolute error (MAE), r-squared (R2) and Nash-Sutcliffe coefficient of efficiency (NSE) for the popular models in digital soil mapping
The function carries 5-fold cross-validation. Sometimes it may give a warning of missing resample performance with some models. It's important to ensure no NA in the data used for modelling
Christian Thine Omuto
Nash, J. E.; Sutcliffe, J. V. 1970. River flow forecasting through conceptual models part I — A discussion of principles. Journal of Hydrology. 10 (3): 282–290
pedoTransfer
, predUncertain
, ECconversion3
library(caret) library(sp) data(soil) soil1=soil[,c("EC")] soil1=subset(soil1,!is.na(soil1$EC)) overlay.ov=over(soil1, suitabinput) soil1$dem=overlay.ov$dem soil1$rain=overlay.ov$rain soil1$ph=overlay.ov$ph soil2=soil1@data[,c("EC","dem","rain","ph")] regmodelSuit(soil2,EC,dem,rain,ph)
library(caret) library(sp) data(soil) soil1=soil[,c("EC")] soil1=subset(soil1,!is.na(soil1$EC)) overlay.ov=over(soil1, suitabinput) soil1$dem=overlay.ov$dem soil1$rain=overlay.ov$rain soil1$ph=overlay.ov$ph soil2=soil1@data[,c("EC","dem","rain","ph")] regmodelSuit(soil2,EC,dem,rain,ph)
This function estimates the scalar constant representing the moisture effects in RothC carbon turnover modelling in the soil
RotCmoistcorrection(P, E, S.Thick, clay, pE, fk)
RotCmoistcorrection(P, E, S.Thick, clay, pE, fk)
P |
the total rainfall amount in mm |
E |
the total evapotranspiration amounts in mm. It can be pan evapotranspiration or potential evapotranspiration rate |
S.Thick |
thickness of soil depth in cm (measured from the soil surface) |
clay |
clay content in percent |
pE |
proportion of pan evapotranspiration representing potential evapotranspiration rate. |
fk |
A constant to correct for soil cover. For bare soil, fk=1.8 and for soil with cover, fk=1 |
E can be given as pan evapotranspiration or potential evapotranspiration. If potential evapotranspiration is used for E, then pE = 1 and if pan evapotranspiration is used for E then pE=0.75.
A scalar constant for moisture effects on carbon decomposition rates
This function can be used with monthly or annual input data to produce time-dependent scalars
Christian Thine Omuto
Burke, I., Kaye, J., Bird, S., Hall, S., McCulley, R., Sommerville, G. 2003. Evaluating and testing models of terrestrial biogeochemistry: the role of temperature in controlling decomposition, Models in ecosystem science, Princeton University Press, Princeton, New Jersey, USA, 225–253, 2003
Adair, E., Parton, W., Del Grosso, S., Silver, W., Harmon, M.,Hall, S., Burke, I., and Hart, S. 2008. Simple three-pool model accurately describes patterns of long-term litter decomposition in diverse climates, Global Change Biology, 14: 2636–2660
Coleman, K. and Jenkinson, D. 2014. ROTHC-26.3 A model for the turnover of carbon in soils: Model description and users guide (Windows version). Rothamsted Research Harpenden Herts AL5 2JQ
carbonTurnover
, RotCtempcorrection
, NPPmodel
clay=34.5 depth=30 precip=c(73,59,63,51,52,57,34,55,58,56,76,71) evapo=c(8,10,27,49,83,99,103,91,69,34,16,8) inCl=data.frame(seq(1,12,1),precip,evapo) colnames(inCl)=c("month","rain","ET") inCl$mcor=RotCmoistcorrection(inCl$rain,inCl$ET,depth,clay,0.75,1) inCl$mcor
clay=34.5 depth=30 precip=c(73,59,63,51,52,57,34,55,58,56,76,71) evapo=c(8,10,27,49,83,99,103,91,69,34,16,8) inCl=data.frame(seq(1,12,1),precip,evapo) colnames(inCl)=c("month","rain","ET") inCl$mcor=RotCmoistcorrection(inCl$rain,inCl$ET,depth,clay,0.75,1) inCl$mcor
This function estimates the scalar constant for temperature effects in RothC carbon turnover modelling in the soil
RotCtempcorrection(temperature)
RotCtempcorrection(temperature)
temperature |
mean air temperature in degrees Celsius |
mean air temperature canbe monthly or annual mean temperature
A scalar constant for temperature effects on carbon decomposition rates
This function can be used with monthly or annual input data to produce time-dependent scalars The function works with temperatures greater than -18.2 degrees Celsius
Christian Thine Omuto
Burke, I., Kaye, J., Bird, S., Hall, S., McCulley, R., Sommerville, G. 2003. Evaluating and testing models of terrestrial biogeochemistry: the role of temperature in controlling decomposition, Models in ecosystem science, Princeton University Press, Princeton, New Jersey, USA, 225–253, 2003
Adair, E., Parton, W., Del Grosso, S., Silver, W., Harmon, M.,Hall, S., Burke, I., and Hart, S. 2008. Simple three-pool model accurately describes patterns of long-term litter decomposition in diverse climates, Global Change Biology, 14: 2636–2660
Coleman, K. and Jenkinson, D. 2014. ROTHC-26.3 A model for the turnover of carbon in soils: Model description and users guide (Windows version). Rothamsted Research Harpenden Herts AL5 2JQ
carbonTurnover
, RotCmoistcorrection
, NPPmodel
airTemp=22.1 RotCtempcorrection(airTemp)
airTemp=22.1 RotCtempcorrection(airTemp)
This function determines the major classes of salt-affected soils using Electrical Conductivity (EC), soil reaction (pH), and Exchangeable Sodium Percent (ESP) according to FAO or USDA classification schemes
saltClass(ec,ph,esp)
saltClass(ec,ph,esp)
ec |
Electrical Conductivity in dS/m of saturated soil paste extract or its equivalent |
ph |
soil reaction (pH) |
esp |
Exchangeable Sodium Percent |
saltClass returns integer classes of salt problems in the soil. The classes are 1, 2, 3, 4, 5 corresponding to None, Saline, Saline-sodic, Sodic, and Alkaline categories.
ESP is mandatory when using this function. The "error: 1 * ESP : non-numeric argument to binary operator" is flagged when ESP entry is missing. In case ESP is missing, saltRating is suggested.
Christian Thine Omuto
FAO.2006. Guidelines for soil description. FAO. Rome
Richards, L. A. (ed.) 1954. Diagnosis and Improvement of Saline and Alkali Soils. U.S. Department Agriculture Handbook 60. U.S. Gov. Printing Office, Washington, DC.
saltRating
, saltSeverity
, classCode
saltClass(6.12,7.84,1)
saltClass(6.12,7.84,1)
This function determines classes of salt-affected soils using Electrical Conductivity and pH according to FAO or USDA salt classification schemes
saltRating(ec,ph,criterion="FAO")
saltRating(ec,ph,criterion="FAO")
ec |
Electrical Conductivity in dS/m of saturated soil paste extract or its equivalent |
ph |
soil reaction (pH) |
criterion |
The method to use for classifying salt-affected soil. Either FAO or USDA can be selected |
The output is an integer value for soil salt class. The class name for any integer code is obtained from classCode function
This function gives approximate classification. A better classification is achieved when indicator of sodium ions is included (e.g. ESP)
Christian Thine Omuto
FAO.2006. Guidelines for soil description. FAO. Rome
Richards, L. A. (ed.) 1954. Diagnosis and Improvement of Saline and Alkali Soils. U.S. Department Agriculture Handbook 60. U.S. Gov. Printing Office, Washington, DC.
saltClass
, saltSeverity
, classCode
library(sp) saltRating(11.2,8.14, "USDA") ec=suitabinput["ec"] ph=suitabinput["ph"] soc=nutrindicator["soc"] clay=textureinput["clay"] texture=suitabinput["texture"] newmap=ec newmap$ph=ph$ph newmap$ECe=ECconversion1(ec$ec,texture$texture,"FAO","1:1", soc$soc,clay$clay) newmap$salinity=saltRating(newmap$ECe,newmap$ph,"FAO") newmap$salineclass=classCode(newmap$salinity,"saltclass") newmap$salineclass1=as.factor(newmap$salineclass) spplot(newmap["salineclass"], main="Soil Salinity Class") summary(newmap$salinity)
library(sp) saltRating(11.2,8.14, "USDA") ec=suitabinput["ec"] ph=suitabinput["ph"] soc=nutrindicator["soc"] clay=textureinput["clay"] texture=suitabinput["texture"] newmap=ec newmap$ph=ph$ph newmap$ECe=ECconversion1(ec$ec,texture$texture,"FAO","1:1", soc$soc,clay$clay) newmap$salinity=saltRating(newmap$ECe,newmap$ph,"FAO") newmap$salineclass=classCode(newmap$salinity,"saltclass") newmap$salineclass1=as.factor(newmap$salineclass) spplot(newmap["salineclass"], main="Soil Salinity Class") summary(newmap$salinity)
This function classifies salt intensity in soil based on EC, pH and ESP levels
saltSeverity(ec,ph,esp,criterion="FAO")
saltSeverity(ec,ph,esp,criterion="FAO")
ec |
electrical conductivity in dS/m of saturated soil paste extract or its equivalent |
ph |
soil reaction (pH) |
esp |
Exchangeable sodium percent |
criterion |
classification method for severity/degree of salt problems. FAO, USDA, Amrhein, and PSALT criteria are included. Default method is FAO. |
This function requires input EC, pH and ESP values to process the classification. They can be maps or numerical entries. PSALT criterion uses percent salt content instead of EC.
Integer classes of ranging between 1-17. The names of integer codes are obtained using classCode function
The function strictly requires input EC, pH, and ESP. Percent salt content can be used in place of EC if the criterion is PSALT
Christian Thine Omuto
Abrol, IP, Yadav JSP, Massoud FI. 1988. Salt-affected soils and their management. FAO Soils Bulletin 39. FAO, Rome
Amrhein C. 1996. Australian sodic soils: Distribution, properties, and management. Soil Science 161. pp412.
FAO. 2006. Guidelines for soil description. FAO, Rome
Richards LA. 1954. Diagnosis and improvements of saline and alkali soils. Agriculture Handbook No. 60. USDA, Washington
saltClass
, saltRating
, classCode
library(sp) saltSeverity(4.5,7.8,11.6,"USDA") ec=suitabinput["ec"] ph=suitabinput["ph"] soc=nutrindicator["soc"] clay=textureinput["clay"] texture=suitabinput["texture"] newmap=ec newmap$ph=ph$ph-1 newmap$ECe=ECconversion1(ec$ec*0.25,texture$texture,"FAO","1:5",soc$soc,clay$clay) newmap$salt=saltSeverity(newmap$ECe,newmap$ph,6.84,"FAO") newmap$salineclass=classCode(newmap$salt,"saltseverity") spplot(newmap["salineclass"], main="Salinity Code")
library(sp) saltSeverity(4.5,7.8,11.6,"USDA") ec=suitabinput["ec"] ph=suitabinput["ph"] soc=nutrindicator["soc"] clay=textureinput["clay"] texture=suitabinput["texture"] newmap=ec newmap$ph=ph$ph-1 newmap$ECe=ECconversion1(ec$ec*0.25,texture$texture,"FAO","1:5",soc$soc,clay$clay) newmap$salt=saltSeverity(newmap$ECe,newmap$ph,6.84,"FAO") newmap$salineclass=classCode(newmap$salt,"saltseverity") spplot(newmap["salineclass"], main="Salinity Code")
Global distribution of sampling points with measured soil property data
SASdata_densityInfo(data)
SASdata_densityInfo(data)
data |
type of measured soil data in the global database of SAS information. There are three categories of soil data: ec, ph, texture. |
The function accepts three input alternatives for querrying available SAs information: "ec", "ph", and "texture". The default is "ec"
Spatial maps of sampling locations with measured soil data for SAS information. They include maps of electrical conductivity (ec), pH, texture (sand, silt, clay percentages), and cation exchange capacity (CEC). Locations for CEC are similar to those for texture.
The function currently works for ec, ph, and texture. Distribution of locations for texture is similar to those for CEC. The input for this function must be entered in quotation marks. Internet connectivity is needed for the function to work.
Christian Thine Omuto
Batjes, N.H., Ribeiro, E., van Oostrum, A., 2020. Standardised soil profile data to support global mapping and modelling (WoSIS snapshot 2019). Earth Syst. Sci. Data 12, 299–320. https://doi.org/10.5194/essd-12-299-2020
FAO/IIASA/ISRIC/ISS-CAS/JRC, 2012. Harmonized World Soil Database (version 1.2). FAO and IIASA, Rome.
DataAvailabilityIndex
, PHharm_Info
SASdata_densityInfo("ec")
SASdata_densityInfo("ec")
A function to query soil data availability in the global SAS database
SASglobeData(dframe,ISO,Region)
SASglobeData(dframe,ISO,Region)
dframe |
is a string to describe type of soil data in the SAS database. |
ISO |
is a string describing three digit international ISO code for a country. |
Region |
is a string describing the region of the world. |
Options for type of soil data for querrying the database are "ecse","ec2","ec2.5","ec5","ph","phkcl","phcacl2","sand","silt","clay".Options for regions of the world in the SAS database are "Africa", "Asia", "Europe", "Eurasia", "NENA", "LAC", "N.America", and "Pacific". NENA is Near East and North Africa. LAC is Latin America and Caribbean. N. America is North America. Any of these Regions may be specified if desired. The default Region is NULL
The query returns a dataframe with the soil attribute querried, coordinates of sampling locations, and name of country where the samples are located
Internet connectivity is needed for the function to work.
Christian Thine Omuto
Batjes, N. H., Ribeiro, E. & van Oostrum, A. Standardised soil profile data to support global mapping and modelling (WoSIS snapshot 2019). Earth Syst. Sci. Data 12, 299–320 (2020).
FAO/IIASA/ISRIC/ISS-CAS/JRC. Harmonized World Soil Database (version 1.2). (FAO and IIASA, 2012).
Omuto, C. T., Vargas. R., Abdelmagin, E.A., Mohamed, N., Viatkin, K., Yusuf, Y. Mapping of salt-affected soils – Technical manual. (FAO, 2020). doi:10.4060/ca9215en
Orgiazzi, A., Ballabio, C., Panagos, P., Jones, A. & Fernández‐Ugalde, O. LUCAS Soil, the largest expandable soil dataset for Europe: a review. Eur J Soil Sci 69, 140–153 (2018).
wrter=SASglobeData("sand","ZAF")# For South Africa profiles plot(Longitude~Latitude, wrter)
wrter=SASglobeData("sand","ZAF")# For South Africa profiles plot(Longitude~Latitude, wrter)
This information function shows the list of EC and pH harmonization models contained in the SAS harmonization service
SASmodels(data="ec", extract="1:1")
SASmodels(data="ec", extract="1:1")
data |
either ec or ph data category for SAS harmonization models |
extract |
extract solution for measuring ec or ph. |
This information function shows available models in the SAS harmonization service. The models are divided into two major categories: ec and ph models. The function returns a list of available SAS harmonization models under each data category. ec is the default data category.
A list of SAS harmonization models
Christian Thine Omuto
SASglobeData
, DataAvailabilityIndex
SASmodels("ec", "1:1") SASmodels("ph","kcl")
SASmodels("ec", "1:1") SASmodels("ph","kcl")
This function determines the suitability classes for slope requirements of selected agricultural crops and forest trees
slopeSuit(value, crop)
slopeSuit(value, crop)
value |
Input land slope in degrees. |
crop |
The crop of interest for which slope suitability class is sought. |
The input value can be map or just a numerical entry of slope in degrees
The output is slope suitability class for the crop. The output is an integer value for suitability class: 1- highly suitable; 2 - moderately suitable; 3 - marginally suitable; 4 - currently not suitable; 5 - not suitable
The input slope value must be in degrees
Christian Thine Omuto
Sys, C., Van Ranst, E., Debaveye, J. and Beerneaert, F.1993. Land evaluation: Part III: Crop requirements. Development Cooperation, Belgium.
Naidu, L.G.K., Ramamurthy, V., Challa O., Hegde, R. and Krishnan, P. 2006. Manual, Soil-site Suitability Criteria for Major Crops, National Bureau of Soil Survey and Land Use Planning, ICAR, Nagpur, India
FAO Crop Suitability Requirements: http://ecocrop.fao.org/ecocrop/srv/en/home
LGPSuit, tempSuit, suitability
slopeSuit(23.4,"carrot") library(sp) slopeSuit(23.4,"carrot") slope=suitabinput["slope"] slope$tea=slopeSuit(slope$slope,"tea") slope$carrot=slopeSuit(slope$slope,"carrot") summary(slope$carrot) spplot(slope["carrot"])
slopeSuit(23.4,"carrot") library(sp) slopeSuit(23.4,"carrot") slope=suitabinput["slope"] slope$tea=slopeSuit(slope$slope,"tea") slope$carrot=slopeSuit(slope$slope,"carrot") summary(slope$carrot) spplot(slope["carrot"])
Th function estimates slope length factor for erosion risk assessment. It has options for choosing different algorithms
sloplenFUN(ls,slope,method)
sloplenFUN(ls,slope,method)
ls |
length of slope in metres |
slope |
slope of land in degrees |
method |
method for deriving slope-length factor. The methods included are: WSmith, Renard, Remortel, Zhang, Nearing, Smith, Foster, David, Morgan, and Moore. |
Slope (degrees) and length of slope (metres) are relief parameters in erosion risk assessment.
a dimensionless quantity of slope-length factor of erosion risk
The slope must be in degrees. The warning given is a reminder to that the slope is given in degrees
Christian Thine Omuto
Benavidez R, Bethana J, Maxwell D, Norton K. 2018. A review of the (Revised) Universal Soil Loss Equation ((R)USLE): with a view to increasing its global applicability and improving soil loss estimates. Hydrol. Earth Syst. Sci., 22, 6059–6086
Omuto CT and Vargas R. 2009. Combining pedometrics, remote sensing and field observations for assessing soil loss in challenging drylands: a case study of northwestern Somalia. Land Degrad. Develop. 20: 101–115
erosivFUN, erodFUN, slopeSuit
library(sp) sloplenFUN(60,14.88,"Renard") newmap=suitabinput["slope"] newmap$LSrenard=sloplenFUN(60,(newmap$slope),"Renard") newmap$LSwsmith=sloplenFUN(60,(newmap$slope),"WSmith") spplot(newmap["LSrenard"]) spplot(newmap["LSwsmith"])
library(sp) sloplenFUN(60,14.88,"Renard") newmap=suitabinput["slope"] newmap$LSrenard=sloplenFUN(60,(newmap$slope),"Renard") newmap$LSwsmith=sloplenFUN(60,(newmap$slope),"WSmith") spplot(newmap["LSrenard"]) spplot(newmap["LSwsmith"])
This function determines the suitability classes for soil organic carbon requirements of selected agricultural crops and forest trees
SOCSuit(value, crop)
SOCSuit(value, crop)
value |
Input soil organic carbon content in percent. |
crop |
The crop of interest for which soil organic carbon suitability class is sought. |
The input value can be map or just a numerical entry of soil organic carbon in percent
The output is SOC suitability class for the crop. The output is an integer value for suitability class: 1- highly suitable; 2 - moderately suitable; 3 - marginally suitable; 4 - currently not suitable; 5 - not suitable
Christian Thine Omuto
Sys, C., Van Ranst, E., Debaveye, J. and Beerneaert, F.1993. Land evaluation: Part III: Crop requirements. Development Cooperation, Belgium.
Naidu, L.G.K., Ramamurthy, V., Challa O., Hegde, R. and Krishnan, P. 2006. Manual, Soil-site Suitability Criteria for Major Crops, National Bureau of Soil Survey and Land Use Planning, ICAR, Nagpur, India
FAO Crop Suitability Requirements: http://ecocrop.fao.org/ecocrop/srv/en/home
depthSuit, carbonateSuit, suitability
library(sp) soc1=nutrindicator["soc"] soc1$pyrethrum=SOCSuit(soc1$soc,"pyrethrum") summary(soc1$pyrethrum) spplot(soc1["pyrethrum"])
library(sp) soc1=nutrindicator["soc"] soc1$pyrethrum=SOCSuit(soc1$soc,"pyrethrum") summary(soc1$pyrethrum) spplot(soc1["pyrethrum"])
Horizon sample dataset for mapping soil salinity
data("soil")
data("soil")
The format is: Formal class 'SpatialPointsDataFrame' [package "sp"] with 5 slots ..@ data :'data.frame': 152 obs. of 17 variables: .. ..$ Sample : Factor w/ 152 levels "1","10","100",..: 1 65 76 87 98 109 120 131 142 2 ... .. ..$ ProfileID: Factor w/ 87 levels "1","2","3","4",..: 5 53 53 55 55 56 6 7 57 8 ... .. ..$ Latitude : num [1:152] -30.2 -30.3 -30.3 -30.3 -30.3 ... .. ..$ Longitude: num [1:152] 62.2 62.1 62.1 62.1 62.1 ... .. ..$ Horizon : Factor w/ 2 levels "A","B": 1 1 2 1 2 2 1 1 2 1 ... .. ..$ Depth : Factor w/ 43 levels "0 - 100","0 - 17",..: 8 14 37 8 29 42 8 8 38 8 ... .. ..$ Sand : num [1:152] 43.2 61.2 57.2 55.2 65.2 83.2 63.2 63.2 45.2 59.2 ... .. ..$ Silt : num [1:152] 44 24 29 32 22 9 24 24 40 24 ... .. ..$ Clay : num [1:152] 12.8 14.8 13.8 12.8 12.8 7.8 12.8 12.8 14.8 16.8 ... .. ..$ OC : num [1:152] 0.36 0.465 0.39 0.36 0.42 0.87 0.075 0.375 0.84 0.33 ... .. ..$ PH : num [1:152] 8.6 8.37 8.31 8.76 7.81 ... .. ..$ EC : num [1:152] 0.8 2.58 0.98 0.532 1.87 18.5 0.43 0.302 0.345 2.7 ... .. ..$ CaCo3 : num [1:152] 15.2 18.5 20.5 15.8 20 ... .. ..$ K : num [1:152] 67 162 120 124 177 91 127 72 123 158 ... .. ..$ Na : num [1:152] 1073 707 689 646 691 ... .. ..$ CEC : num [1:152] 6 11 18 9 10.4 6 6.4 16 10 4.9 ... .. ..$ ESP : Factor w/ 22 levels "0","1","10","11",..: 11 19 17 20 20 8 17 20 15 11 ... ..@ coords.nrs : num(0) ..@ coords : num [1:152, 1:2] 420924 418226 418226 415334 415334 ... .. ..- attr(*, "dimnames")=List of 2 .. .. ..$ : NULL .. .. ..$ : chr [1:2] "coords.x1" "coords.x2" ..@ bbox : num [1:2, 1:2] 386582 3343117 427796 3386711 .. ..- attr(*, "dimnames")=List of 2 .. .. ..$ : chr [1:2] "coords.x1" "coords.x2" .. .. ..$ : chr [1:2] "min" "max" ..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slot .. .. ..@ projargs: chr "+proj=utm +zone=41 +datum=WGS84 +units=m +no_defs"
A dataset with 87 points of soil horizons for mapping salinity
Hypothetical dataset for salinity mapping
Hypothetical dataset for salinity mapping
data(soil) str(soil)
data(soil) str(soil)
This function determines the suitability classes for stoniness requirements of selected agricultural crops and forest trees
stoneSuit(value, crop)
stoneSuit(value, crop)
value |
Input level of stoniness in percent. |
crop |
The crop of interest for which stoniness suitability class is sought. |
The input value can be map or just a numerical entry of stoniness in percent
The output is stoniness suitability class for the crop. The output is an integer value for suitability class: 1- highly suitable; 2 - moderately suitable; 3 - marginally suitable; 4 - currently not suitable; 5 - not suitable
Output raster map of stoniness for the crop of interest is given if the input value is raster map
Christian Thine Omuto
Sys, C., Van Ranst, E., Debaveye, J. and Beerneaert, F.1993. Land evaluation: Part III: Crop requirements. Development Cooperation, Belgium.
Naidu, L.G.K., Ramamurthy, V., Challa O., Hegde, R. and Krishnan, P. 2006. Manual, Soil-site Suitability Criteria for Major Crops, National Bureau of Soil Survey and Land Use Planning, ICAR, Nagpur, India
FAO Crop Suitability Requirements: http://ecocrop.fao.org/ecocrop/srv/en/home
tempSuit, PHSuit, rainSuit
stoneSuit(15,"grape")
stoneSuit(15,"grape")
This function determines soil condition classes (such as suitability, fertility, etc.) given a set of indicators.
suitability(df,data)
suitability(df,data)
df |
normalized pairwise decision (nxn) matrix for comparing n soil suitability (condition) factors |
data |
a (nxm) matrix of n suitability (condition) factors for m locations (pixels) |
A vector of soil suitability (condition) class between 0 and 5.
It's important to normalize and assess the adequacy of the decision matrix before using this function
Christian Thine Omuto
FAO, 1976. A framework for land evaluation. FAO Soils Bulletin 32
Saaty TL. 1980. The Analytic Hierarchy Process. McGraw-Hill, New York
fertilityRating, suitabilityClass
library(sp) newmap=(nutrindicator) newmap$carbon=fertilityRating((nutrindicator$soc),"carbon") newmap$nitrogen=fertilityRating((nutrindicator$nitrogen),"nitrogen") newmap$potassium=fertilityRating((nutrindicator$potassium),"potassium") newmap$phosphorus=fertilityRating((nutrindicator$phosphorus),"phosphorus") newmap$iron=fertilityRating((nutrindicator$iron),"iron") newmap$zinc=fertilityRating((nutrindicator$zinc),"zinc") newmap$manganese=fertilityRating((nutrindicator$manganese),"manganese") newmap$copper=fertilityRating((nutrindicator$copper),"copper") newmap$cec=fertilityRating((nutrindicator$cec),"cec") newmap$boron=fertilityRating((nutrindicator$boron),"boron") newmap$sulfur=fertilityRating((nutrindicator$sulfur),"sulfur") newmap$soc=NULL newmapT1=newmap@data valuT=as.matrix(newmapT1) data("nutrient") nutriens=comparisonTable(nutrient) newmapT1$fertility=suitability(nutrient, valuT) newmap@data$fertility=newmapT1$fertility newmap$fertilityclass2=classCode(newmap$fertility,"fertility") spplot(newmap["fertility"]) summary(newmap$fertilityclass2)
library(sp) newmap=(nutrindicator) newmap$carbon=fertilityRating((nutrindicator$soc),"carbon") newmap$nitrogen=fertilityRating((nutrindicator$nitrogen),"nitrogen") newmap$potassium=fertilityRating((nutrindicator$potassium),"potassium") newmap$phosphorus=fertilityRating((nutrindicator$phosphorus),"phosphorus") newmap$iron=fertilityRating((nutrindicator$iron),"iron") newmap$zinc=fertilityRating((nutrindicator$zinc),"zinc") newmap$manganese=fertilityRating((nutrindicator$manganese),"manganese") newmap$copper=fertilityRating((nutrindicator$copper),"copper") newmap$cec=fertilityRating((nutrindicator$cec),"cec") newmap$boron=fertilityRating((nutrindicator$boron),"boron") newmap$sulfur=fertilityRating((nutrindicator$sulfur),"sulfur") newmap$soc=NULL newmapT1=newmap@data valuT=as.matrix(newmapT1) data("nutrient") nutriens=comparisonTable(nutrient) newmapT1$fertility=suitability(nutrient, valuT) newmap@data$fertility=newmapT1$fertility newmap$fertilityclass2=classCode(newmap$fertility,"fertility") spplot(newmap["fertility"]) summary(newmap$fertilityclass2)
This function determines the suitability class to which a given indicator value falls based on the crop requirement
suitabilityClass(value,crop,factor)
suitabilityClass(value,crop,factor)
value |
Input indicator value. |
crop |
The crop of interest for which suitability is determined. |
factor |
The suitability factor for crop requirement. Example factors include: rain, slope, carbonate, EC, ESP, depth, ph, temperature, |
The output is rainfall suitability class for the crop. The output is integer value for suitability class: 1- highly suitable; 2 - moderately suitable; 3 - marginally suitable; 4 - currently not suitable; 5 - not suitable
This function assumes rainfall as the source of water for crop development. The input slope value must be in degrees
Christian Thine Omuto
Sys, C., Van Ranst, E., Debaveye, J. and Beerneaert, F.1993. Land evaluation: Part III: Crop requirements. Development Cooperation, Belgium.
Naidu, L.G.K., Ramamurthy, V., Challa O., Hegde, R. and Krishnan, P. 2006. Manual, Soil-site Suitability Criteria for Major Crops, National Bureau of Soil Survey and Land Use Planning, ICAR, Nagpur, India
FAO Crop Suitability Requirements: http://ecocrop.fao.org/ecocrop/srv/en/home
suitability,slopeSuit, tempSuit
library(sp) library(raster) suitabilityClass(20.14,"saffron","slope") slope=suitabinput["slope"] slope$tea=slopeSuit(slope$slope,"tea") slope$saffron=suitabilityClass(slope$slope,"saffron","slope") summary(slope$saffron) spplot(slope["tea"], main="Slope suitability for tea") spplot(slope["saffron"], main="Slope suitability for saffron")
library(sp) library(raster) suitabilityClass(20.14,"saffron","slope") slope=suitabinput["slope"] slope$tea=slopeSuit(slope$slope,"tea") slope$saffron=suitabilityClass(slope$slope,"saffron","slope") summary(slope$saffron) spplot(slope["tea"], main="Slope suitability for tea") spplot(slope["saffron"], main="Slope suitability for saffron")
A grid stack map of nine variables for assessing crop suitabilities
data("suitabinput")
data("suitabinput")
The format is: Formal class 'SpatialGridDataFrame' [package "sp"] with 4 slots ..@ data :'data.frame': 16900 obs. of 12 variables: .. ..$ cac03 : num [1:16900] 21.8 20.6 21.2 22 22.3 ... .. ..$ ec : num [1:16900] 2.5 2.38 2.15 2.36 2.24 ... .. ..$ depthcodes: num [1:16900] 3 1 3 3 3 3 3 3 1 1 ... .. ..$ rain : num [1:16900] 282 279 260 279 276 ... .. ..$ texture : int [1:16900] 5 5 5 5 5 5 5 5 11 11 ... .. ..$ dem : num [1:16900] 489 489 489 485 487 ... .. ..$ drainage : int [1:16900] 2 5 2 2 2 5 7 5 5 5 ... .. ..$ stones : num [1:16900] 6 9 6 6 6 6 6 9 9 9 ... .. ..$ structure : int [1:16900] 3 8 7 5 5 5 7 5 9 9 ... .. ..$ ph : num [1:16900] 8.76 8.83 8.73 8.71 8.69 ... .. ..$ slope : num [1:16900] 0.969 0.969 0.969 0.969 0.969 ... .. ..$ texture1 : Factor w/ 3 levels "Lo","SaLo","SiLo": 2 2 ... ..@ grid :Formal class 'GridTopology' [package "sp"] with 3 slots .. .. ..@ cellcentre.offset: Named num [1:2] 383216 3341506 .. .. .. ..- attr(*, "names")= chr [1:2] "x" "y" .. .. ..@ cellsize : num [1:2] 357 357 .. .. ..@ cells.dim : int [1:2] 130 130 ..@ bbox : num [1:2, 1:2] 383038 3341327 429478 3387767 .. ..- attr(*, "dimnames")=List of 2 .. .. ..$ : chr [1:2] "x" "y" .. .. ..$ : chr [1:2] "min" "max" ..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slot .. .. ..@ projargs: chr "+proj=utm +zone=41 +datum=WGS84 +units=m +no_defs"
data(suitabinput) summary(suitabinput$depthcodes) hist(suitabinput$dem)
data(suitabinput) summary(suitabinput$depthcodes) hist(suitabinput$dem)
This function uses stratified random sampling to generate georeferenced locations for monitoring soil conditions
surveyPoints(soilmap,scorpan,conditionclass,mapproportion)
surveyPoints(soilmap,scorpan,conditionclass,mapproportion)
soilmap |
input classified map of soil condition |
scorpan |
number of scorpan factors that generated teh soil condition map. The range is 1-5 |
conditionclass |
reference class in the soil condition map to be monitored. The class code should be in the map |
mapproportion |
Proportion in percent of the reference class in the soil condition map to be monitored. |
The number of scorpan factors can be assumed but need to be with respect to the soil forming factors.The maximum possible number of factors is 5 irrespective of number of layers in each factor while the minimum number is 1.The soil condition class is the class code in the map which is to be targeted
A spatial points dataframe with projection similar to the soil condition map projection
Christian Thine Omuto
featureRep, imageIndices, pedoTransfer, classCode
library(sp) library(raster) ec=suitabinput["ec"] ph=suitabinput["ph"] soc=nutrindicator["soc"] clay=textureinput["clay"] texture=suitabinput["texture"] newmap=ec newmap$ph=ph$ph newmap$ECe=ECconversion1(ec$ec*0.1,texture$texture,"FAO","1:5", soc$soc,clay$clay) newmap$salt=saltSeverity(newmap$ECe,newmap$ph,0.84,"FAO") newmap$salineclass=classCode(newmap$salt,"saltseverity") newmap$salineclass1=as.factor(newmap$salineclass) spplot(newmap["salineclass"], main="Salinity Code") summary(newmap$salt) summary(newmap$salineclass) salt=raster(newmap["salt"]) salt1=newmap["salt"] n_points=surveyPoints(salt1,4,11,80) length(n_points$new) spplot(salt1, scales=list(draw=TRUE),sp.layout=list("sp.points",n_points,pch=8,col="cyan")) spplot(salt, scales=list(draw=TRUE),sp.layout=list("sp.points",n_points,pch=8,col="cyan"))
library(sp) library(raster) ec=suitabinput["ec"] ph=suitabinput["ph"] soc=nutrindicator["soc"] clay=textureinput["clay"] texture=suitabinput["texture"] newmap=ec newmap$ph=ph$ph newmap$ECe=ECconversion1(ec$ec*0.1,texture$texture,"FAO","1:5", soc$soc,clay$clay) newmap$salt=saltSeverity(newmap$ECe,newmap$ph,0.84,"FAO") newmap$salineclass=classCode(newmap$salt,"saltseverity") newmap$salineclass1=as.factor(newmap$salineclass) spplot(newmap["salineclass"], main="Salinity Code") summary(newmap$salt) summary(newmap$salineclass) salt=raster(newmap["salt"]) salt1=newmap["salt"] n_points=surveyPoints(salt1,4,11,80) length(n_points$new) spplot(salt1, scales=list(draw=TRUE),sp.layout=list("sp.points",n_points,pch=8,col="cyan")) spplot(salt, scales=list(draw=TRUE),sp.layout=list("sp.points",n_points,pch=8,col="cyan"))
This function determines the suitability classes for temperature requirements of selected agricultural crops and forest trees
tempSuit(value, crop)
tempSuit(value, crop)
value |
Input temperature in degrees Celsius. |
crop |
The crop of interest for which temperature suitability class is sought. |
The input value can be map or just a numerical entry of temperature in degrees Celsius
The output is temperature suitability class for the crop. The output is integer value for suitability class: 1- highly suitable; 2 - moderately suitable; 3 - marginally suitable; 4 - currently not suitable; 5 - not suitable
Christian Thine Omuto
Sys, C., Van Ranst, E., Debaveye, J. and Beerneaert, F.1993. Land evaluation: Part III: Crop requirements. Development Cooperation, Belgium.
Naidu, L.G.K., Ramamurthy, V., Challa O., Hegde, R. and Krishnan, P. 2006. Manual, Soil-site Suitability Criteria for Major Crops, National Bureau of Soil Survey and Land Use Planning, ICAR, Nagpur, India
FAO Crop Suitability Requirements: http://ecocrop.fao.org/ecocrop/srv/en/home
carbonSuit, depthSuite, fertilitySuit
tempgrape=tempSuit(23.5,"grape") summary(tempgrape)
tempgrape=tempSuit(23.5,"grape") summary(tempgrape)
Sample dataset for assessing soil texture
data("textureinput")
data("textureinput")
The format is: Formal class 'SpatialGridDataFrame' [package "sp"] with 4 slots ..@ data :'data.frame': 16900 obs. of 3 variables: .. ..$ sand: num [1:16900] 61.5 59.8 60.6 58.2 59.1 ... .. ..$ clay: num [1:16900] 12.6 13.9 14.1 13.8 13.8 ... .. ..$ silt: num [1:16900] 25 26.9 25.3 28 26.9 ... ..@ grid :Formal class 'GridTopology' [package "sp"] with 3 slots .. .. ..@ cellcentre.offset: Named num [1:2] 383216 3341506 .. .. .. ..- attr(*, "names")= chr [1:2] "x" "y" .. .. ..@ cellsize : num [1:2] 357 357 .. .. ..@ cells.dim : int [1:2] 130 130 ..@ bbox : num [1:2, 1:2] 383038 3341327 429478 3387767 .. ..- attr(*, "dimnames")=List of 2 .. .. ..$ : chr [1:2] "x" "y" .. .. ..$ : chr [1:2] "min" "max" ..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slot .. .. ..@ projargs: chr "+proj=utm +zone=41 +datum=WGS84 +units=m +no_defs"
data(textureinput) summary(textureinput)
data(textureinput) summary(textureinput)
This function determines the suitability classes for texture requirements of selected agricultural crops and forest trees
textureSuit(value, crop)
textureSuit(value, crop)
value |
Input textural class code. |
crop |
The crop of interest for which texture suitability class is sought. |
The input value can be map or just a numerical entry of textural class code. The textural class code is obtained using classCode("texture")
The output is texture suitability class for the crop. The output is integer value for suitability class: 1- highly suitable; 2 - moderately suitable; 3 - marginally suitable; 4 - currently not suitable; 5 - not suitable
If the input value is raster map, then the output will also be a raster map of texture suitability for the crop of interest
Christian Thine Omuto
Sys, C., Van Ranst, E., Debaveye, J. and Beerneaert, F.1993. Land evaluation: Part III: Crop requirements. Development Cooperation, Belgium.
Naidu, L.G.K., Ramamurthy, V., Challa O., Hegde, R. and Krishnan, P. 2006. Manual, Soil-site Suitability Criteria for Major Crops, National Bureau of Soil Survey and Land Use Planning, ICAR, Nagpur, India
FAO Crop Suitability Requirements: http://ecocrop.fao.org/ecocrop/srv/en/home
tempSuit, PHSuit, rainSuit
library(sp) textureSuit(4,"mango") texture=suitabinput["texture"] texture$mango=textureSuit(texture$texture,"mango") summary(texture$mango) spplot(texture["mango"])
library(sp) textureSuit(4,"mango") texture=suitabinput["texture"] texture$mango=textureSuit(texture$texture,"mango") summary(texture$mango) spplot(texture["mango"])