View source: R/Agricultural_drought.R
spatial_essmi | R Documentation |
Empirical Standardised Soil Moisture Index (ESSMI)
spatial_essmi(
SM_data,
scale,
ref_start = NULL,
ref_end = NULL,
distribution = "Gaussian",
bw = "SJ",
missing_ratio = 0.2,
...
)
SM_data |
'SpatRaster' object that contains spatially-distributed monthly soil moisture data that will be used to calculate the ESSMI. This 'SpatRaster' must include the time that corresponds to the dates of the respective layers. They can be set with the function time of the terra package. |
scale |
Integer value that represents the time scale at which the ESSMI will be computed. |
ref_start |
optional value that represents the starting point of the reference period used for computing the index. The date should be introduced as '%Y-%m'. For example: "1989-02". The default is NULL, which indicates that the first layer in the 'SpatRaster' will be used as starting point. |
ref_end |
Optional value that represents the ending point of the reference period used for computing the index. The date should be introduced as '%Y-%m'. For example: "1989-02". The default is NULL, which indicates that the last layer in the 'SpatRaster' will be used as ending point. |
distribution |
Optional value indicating the name of the distribution function to be used in the Kernel Density Estimation (one of 'Gaussian', 'Rectangular', 'Triangular', 'Epanechnikov', 'Biweight', 'Cosine' and 'Optcosine'). Defaults to 'Gaussian' for ESSMI. |
bw |
the smoothing bandwidth to be used. The kernels are scaled such that this is the standard deviation of the smoothing kernel. The default is set to the methods of Sheather & Jones (1991) to select the bandwidth using pilot estimation of derivatives. Please see 'Bandwidth Selectors for Kernel Density Estimation' from 'stats' for more information. |
missing_ratio |
Ratio of missing data that is acceptable for the computation. Set to 0.2 by default (20%). |
... |
Additional variables that can be used for the 'density' function. |
Spatially-distributed ESSMI values.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.