calculate_SPEI_MECC | R Documentation |
Function to calculate SPEI
calculate_SPEI_MECC(
Date,
Precipitation,
ETP,
scale = 3,
year_bounds = c(1900, 2019),
fill_gaps = F
)
Date |
series of dates (daily) to be of the time series. |
Precipitation |
series of daily precipitation (mm) |
ETP |
series of minimum daily potential evapotranspiration (mm), preferably obtained with 'calculate_ETP_daily_MECC()' |
scale |
integer, the number of months for accumulation computation |
year_bounds |
vector with two integer values, the years of beginning and end of analysis |
fill_gaps |
Boolean value. Indicates if the SPEI will be calculated based on the raw data (with gaps) or with the gap-filled deficit series. |
Note that the function exports two SPEI columns. One called 'SPEI', containing the calculated values of SPEI and with eventual NA values, due to missing data, and a second called 'SPEI_filled', where missing deficit (P-ETP) values were filled with the average value of deficit for the respective month over the time series.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.