Skip to content

Commit d9b58b3

Browse files
adapt hazard tutorial
1 parent 55c033f commit d9b58b3

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

climada/engine/impact.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,6 @@ def local_exceedance_impact(
579579

580580
return gdf, label, column_label
581581

582-
#TODO: note different calculation in changelog
583582
def local_exceedance_imp(
584583
self,
585584
return_periods=(25, 50, 100, 250)

climada/hazard/base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,6 @@ def local_exceedance_intensity(
555555

556556
return gdf, label, column_label
557557

558-
#TODO: note different calculation in changelog
559558
def local_exceedance_inten(self, return_period=(25, 50, 100, 250)):
560559
"""This function is deprecated, use Hazard.local_exceedance_intensity instead."""
561560
LOGGER.warning(

doc/tutorial/climada_hazard_Hazard.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@
488488
"- `append()` is used to expand events with data from another `Hazard` (and same centroids).\n",
489489
"- `select()` returns a new hazard with the selected region, date and/or synthetic or historical filter.\n",
490490
"- `remove_duplicates()` removes events with same name and date.\n",
491-
"- `local_exceedance_inten()` returns a matrix with the exceedence frequency at every frequency and provided return periods. This is the one used in `plot_rp_intensity()`.\n",
491+
"- `local_exceedance_intensity()` returns a gdf.GeoDataFrame with the exceedence frequency at every frequency and provided return periods.\n",
492492
"- `local_return_period()` returns a gdf.GeoDataFrame with the return periods at every centroid for user-specified threshold intensities. \n",
493493
"- `reproject_vector()` is a method to change the centroids' CRS. \n",
494494
"\n",
@@ -755,11 +755,12 @@
755755
"haz_tc_fl.plot_intensity(event='1998295N12284', cmap='BuGn') # setting color map\n",
756756
"\n",
757757
"# 4. tropical cyclone intensities maps for the return periods [10, 50, 75, 100]\n",
758-
"_, res = haz_tc_fl.plot_rp_intensity([10, 50, 75, 100])\n",
758+
"exceedance_intensities, label, column_label = haz_tc_fl.local_exceedance_intensity([10, 50, 75, 100])\n",
759+
"from climada.util.plot import plot_from_gdf\n",
760+
"plot_from_gdf(exceedance_intensities, colorbar_name=label, title_subplots=column_label)\n",
759761
"\n",
760762
"# 5. tropical cyclone return period maps for the threshold intensities [30, 40]\n",
761763
"return_periods, label, column_label = haz_tc_fl.local_return_period([30, 40])\n",
762-
"from climada.util.plot import plot_from_gdf\n",
763764
"plot_from_gdf(return_periods, colorbar_name=label, title_subplots=column_label)\n",
764765
"\n",
765766
"# 6. intensities of all the events in centroid with id 50\n",

0 commit comments

Comments
 (0)