NOAA-National-Severe-Storms-Laboratory / frdd-monte-python

Methods for Object-based and Neighborhood Threat Evaluation in Python
8 stars 2 forks source link

Wrap time-intensive loops from storm mode classification in jit decorators to increase speed #8

Closed LarissaReames-NOAA closed 2 years ago

LarissaReames-NOAA commented 2 years ago

I pulled out some of the more time-intensive iterative loops and wrapped them in @jit decorators. For files with a lot of objects, this achieved 65-70% time reduction in run time.

I did a one-to-one comparison of the output 2d fields (mode and labels) and they match that produced by the old code.

LarissaReames-NOAA commented 2 years ago

Looks like some libraries will need to be added (numba and numba_kdtree) to the unit test environments before they can pass.

LarissaReames-NOAA commented 2 years ago

Any reason this was closed without merging?

monte-flora commented 2 years ago

Oh, I thought I merged it. I re-opened it and I think I did it right this time!