lexixu19 / Duplexity

https://duplexity.readthedocs.io/en/latest/
0 stars 0 forks source link

Speed of working with many timesteps at once #4

Open emily-bodekerscientific opened 3 months ago

emily-bodekerscientific commented 3 months ago

As an example, I've found performing:

from duplexity import deterministic_score as deterministic
from tqdm import tqdm

[np.mean([deterministic.calculate_fss_score(barra_month_interp.isel(time=i), qpe_month.isel(time=i), thresholds=[10], scales=[j]) for i in range(670)]) for j in tqdm(range(1, 11))]

is much faster than running

[deterministic.calculate_fss_score(barra_month_interp, qpe_month, thresholds=[10], scales=[j]) for i in tqdm(range(1, 11))]

Something to investigate and perhaps re-work how the code iterates through dimensions.