new implementation of neewd#601
Conversation
|
stress tests and numpy approach .... are pushed in a separate branch master...xc_tests_extrev |
|
So, @xchourio , is your function much faster just because it is in numpy? |
|
Yes, that’s the clue I followed, based on the idea that “if it’s possible to replicate that process with NumPy, NumPy is usually faster.” This is because the labels and objects created during the xarray processes may be slower, since they have to handle additional label, metadata, objects, etc in memory. However, I wasn’t able to replicate the way consecutive days are associated and classified as extreme events |
|
Ok. I'll try and write a np function then, but I'll probably use xr.apply_ufunc to wrap it up. It seems you rewrote that part entirely in your case study. |
|
Alright. First of all, things are working well with pixi and without dask. Then for this specific function, I tried different things but eventually landed on this proposal. It comes out in an acceptable amount of time now. Can do some more performance optimization later in other PRs. |
Aaron: FYI since you contributed to this calculation initially.
New implementation divided the length to run the same test by ~3. If approved, will replace in existing function and see the impact on the app.
Xandre, I know you had worked on an alternative implementation, if you share your work, I can have a look at it.