IHCantabria / NEOPRENE

Neyman-Scott Process Rainfall Emulator library
GNU General Public License v3.0
13 stars 6 forks source link

"calculate_statistics" is very slow when computing hundreds of years at hourly resolution #12

Closed JavierDiezSierra closed 2 years ago

JavierDiezSierra commented 2 years ago

Try to create a new dataframe with the data for the months where the statistics will be calculated before their calculation. Thus, we can resample directly the time series and avoid to use the function "resample(str(h) + t).agg(pd.Series.sum, min_count=1)" which is slowing down the computation of the statistics.

JavierDiezSierra commented 2 years ago

Fixed: https://github.com/IHCantabria/NEOPRENE/commit/ed66980c7b3a0a026348056b391321b240a081ae