View source: R/Hydrological_drought.R
spatial_swei | R Documentation |
Snow Water Equivalent Index (SWEI)
spatial_swei(
SWE_data,
scale,
start_month = NULL,
end_month = NULL,
missing_ratio = 0.2,
...
)
SWE_data |
'SpatRaster' object that contains spatially-distributed snow water equivalent data that will be used to calculate the SWEI. 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. |
start_month |
Optional value that represents the starting point of the period that will be returned from the Index. The idea is not to return periods where SWE is not present. The date should be introduced as '%m-%d'. For example: "02-01". The default is NULL, which indicates that the first layer in the 'SpatRaster' will be used as starting point. |
end_month |
Optional value that represents the ending point of the period that will be returned from the Index. The idea is not to return periods where SWE is not present. The date should be introduced as '%m-%d'. For example: "02-01". The default is NULL, which indicates that the last layer in the 'SpatRaster' will be used as ending point. |
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 SWEI values.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.