This is an updated version of adrHuerta/rainfall_onset.
In adrHuerta/rainfall_onset I focused on the methodology of Liebmann et al. (2012), therefore the code is not as fast as expected, and can not be directly used for gridded data. Here I provide a faster version using (almost) pure R/python.
Figure. Sample total precipitation (mm) in the first year for the wet period. Data source: PISCOp