5252from shapely .geometry import LineString , MultiLineString , Point
5353from sklearn .metrics import DistanceMetric
5454
55+ import climada .hazard .tc_tracks_synth
5556import climada .util .coordinates as u_coord
5657import climada .util .plot as u_plot
57- from climada .hazard import Centroids , tc_tracks_synth
58+ from climada .hazard import Centroids
5859
5960# climada dependencies
6061from climada .util import ureg
@@ -1684,11 +1685,11 @@ def from_fast(cls, folder_name: str):
16841685 for file in file_tr :
16851686 if Path (file ).suffix != ".nc" :
16861687 continue
1687- with xr .open_dataset (file ) as ds :
1688- for i in ds .n_trk :
1688+ with xr .open_dataset (file ) as data :
1689+ for i in data .n_trk :
16891690
16901691 # Select track
1691- track = ds .sel (n_trk = i )
1692+ track = data .sel (n_trk = i )
16921693
16931694 # Define coordinates
16941695 lat = track .lat_trks .data
@@ -1713,13 +1714,13 @@ def from_fast(cls, folder_name: str):
17131714
17141715 cen_pres_missing = np .full (lat .shape , np .nan )
17151716 rmw_missing = np .full (lat .shape , np .nan )
1716- cen_pres = tc_tracks . _estimate_pressure (
1717+ cen_pres = _estimate_pressure (
17171718 cen_pres_missing , lat , lon , max_sustained_wind_knots
17181719 )
1719- rmw = tc_tracks . estimate_rmw (rmw_missing , cen_pres )
1720+ rmw = estimate_rmw (rmw_missing , cen_pres )
17201721
17211722 # Define attributes
1722- category = tc_tracks . TCTracks .define_tc_category_fast (
1723+ category = TCTracks .define_tc_category_fast (
17231724 max_sustained_wind_knots
17241725 )
17251726 id_no = track .n_trk .item ()
0 commit comments