-
Notifications
You must be signed in to change notification settings - Fork 149
Closed
Labels
Description
TropCyclone.from_tracks() takes orders of magnitude longer in climada 5.0.0 compared to 3.3.0 (all else being equal in terms of numbers of tracks, centroid resolution etc.)
Code example:
from climada.hazard import TCTracks, Centroids, TropCyclone, tc_tracks_synth
import numpy as np
# get tracks
tracks_SI_proba = TCTracks.from_ibtracs_netcdf(year_range=(1990, 2023), basin='SI')
tracks_SI_proba.equal_timestep(time_step_h=1)
tracks_SI_proba.calc_perturbed_trajectories(nb_synth_tracks=9, max_shift_ini=0.75, max_dspeed_rel=0.3)
# create centroids
min_lat, max_lat, min_lon, max_lon = -26, -12, 40, 54
resol = 10
grid = (np.mgrid[min_lat : max_lat : complex(0, resol),
min_lon : max_lon : complex(0, resol)]). \
reshape(2, resol*resol).transpose()
cent = Centroids.from_lat_lon(grid[:,0], grid[:,1])
cent.id = np.arange(cent.lat.size)
# Calculate windfields
tc_SI_proba = TropCyclone.from_tracks(tracks_SI_proba, centroids=cent) ## this is the line that takes so long
tc_SI_proba.check()
tc_SI_proba.plot_intensity(event=0, smooth=False);Screenshots
If applicable, add screenshots to help explain your problem.


Climada Version: 5.0.0
System Information (please complete the following information):
Run on IAC hub