SPI time steps #573
-
Hi! I got SPI-3 with CHIRPS monthly data. The first precip time step is jan 1st, so Maybe it's a dumb question, but I really wanted to make sure. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
No worries, @ClaudiaEPM it's not a dumb question, you're actually being smart trying to get clarification. If I understand you correctly you want to know which months were used for the 3-month window used to compute the distribution parameters for January. Is this correct? I don't know off the top of my head but I understand that this can make a difference. We'll have to look into the code to work it out -- it's been years since I thought about this detail! |
Beta Was this translation helpful? Give feedback.
-
In theory, the aggregation period period should always be before the date being considered. Otherwise you would never be able to calculate SPI for the current month (with future months yet unknown). I'm pretty sure climate_indices also works like this. Correspondingly, you will also get NaN values for the first few timesteps of the SPI time series, until the aggregation period is full. So e.g. for a precipitation time series starting in January, when you calculate SPI.3M, the January and February values will both be NaN, and March will have the first real SPI value. This SPI value for March will account for the cumulative precipitation of Jan, Feb, March. |
Beta Was this translation helpful? Give feedback.
In theory, the aggregation period period should always be before the date being considered. Otherwise you would never be able to calculate SPI for the current month (with future months yet unknown). I'm pretty sure climate_indices also works like this. Correspondingly, you will also get NaN values for the first few timesteps of the SPI time series, until the aggregation period is full.
So e.g. for a precipitation time series starting in January, when you calculate SPI.3M, the January and February values will both be NaN, and March will have the first real SPI value. This SPI value for March will account for the cumulative precipitation of Jan, Feb, March.