spatial_essmi: Empirical Standardised Soil Moisture Index (ESSMI)

View source: R/Agricultural_drought.R

spatial_essmiR Documentation

Empirical Standardised Soil Moisture Index (ESSMI)

Description

Empirical Standardised Soil Moisture Index (ESSMI)

Usage

spatial_essmi(
  SM_data,
  scale,
  ref_start = NULL,
  ref_end = NULL,
  distribution = "Gaussian",
  bw = "SJ",
  missing_ratio = 0.2,
  ...
)

Arguments

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.

Value

Spatially-distributed ESSMI values.


obaezvil/SpatIndex documentation built on Aug. 9, 2024, 3:42 p.m.