Skip to content

Commit 9477d5d

Browse files
Merge branch 'develop'
2 parents 54117d3 + fa4b129 commit 9477d5d

9 files changed

Lines changed: 99 additions & 13 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ updated:
6666
[#620](https://github.com/CLIMADA-project/climada_python/pull/620),
6767
[#615](https://github.com/CLIMADA-project/climada_python/pull/615),
6868
[#617](https://github.com/CLIMADA-project/climada_python/pull/617),
69-
[#622](https://github.com/CLIMADA-project/climada_python/pull/622).
69+
[#622](https://github.com/CLIMADA-project/climada_python/pull/622),
70+
[#656](https://github.com/CLIMADA-project/climada_python/pull/656).
7071
- Updated installation instructions [#644](https://github.com/CLIMADA-project/climada_python/pull/644)
7172

7273
### Fixed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ Bresch, D. N. and Aznar-Siguan, G., 2021: CLIMADA v1.4.1: towards a globally con
5656

5757
Please see all CLIMADA-related scientific publications in our [repository of scientific publications](https://github.com/CLIMADA-project/climada_papers) and cite according to your use of select features, be it hazard set(s), exposure(s) ...
5858

59-
In presentations or other graphical material, as well as in reports etc., where applicable, please add the logo as follows:
60-
![](https://github.com/CLIMADA-project/climada_python/blob/main/doc/guide/img/CLIMADA_logo_QR.png&raw=true)
59+
In presentations or other graphical material, as well as in reports etc., where applicable, please add the logo as follows:\
60+
![https://github.com/CLIMADA-project/climada_python/blob/main/doc/guide/img/CLIMADA_logo_QR.png](https://github.com/CLIMADA-project/climada_python/blob/main/doc/guide/img/CLIMADA_logo_QR.png?raw=true)
6161

6262
As key link, please use https://wcr.ethz.ch/research/climada.html, as it will last and provides a bit of an intro, especially for those not familiar with GitHub - plus a nice CLIMADA infographic towards the bottom of the page
6363

climada/engine/impact.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,9 @@ def plot_raster_eai_exposure(self, res=None, raster_res=None, save_tiff=None,
595595
cartopy.mpl.geoaxes.GeoAxesSubplot
596596
"""
597597
eai_exp = self._build_exp()
598+
# we need to set geometry points because the `plot_raster` method accesses the
599+
# exposures' `gdf.crs` property, which raises an error when geometry is not set
600+
eai_exp.set_geometry_points()
598601
axis = eai_exp.plot_raster(res, raster_res, save_tiff, raster_f,
599602
label, axis=axis, adapt_fontsize=adapt_fontsize, **kwargs)
600603
axis.set_title(self._eai_title())

climada/entity/exposures/base.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,6 @@ class Exposures():
9393
latitude
9494
longitude : pd.Series
9595
longitude
96-
crs : dict or crs
97-
CRS information inherent to GeoDataFrame.
9896
value : pd.Series
9997
a value for each exposure
10098
impf_SUFFIX : pd.Series, optional
@@ -891,7 +889,7 @@ def from_mat(cls, file_name, var_names=None):
891889
# Extends the according geopandas method
892890
#
893891
def to_crs(self, crs=None, epsg=None, inplace=False):
894-
"""Wrapper of the GeoDataFrame.to_crs method.
892+
"""Wrapper of the :py:meth:`GeoDataFrame.to_crs` method.
895893
896894
Transform geometries to a new coordinate reference system.
897895
Transform all geometries in a GeoSeries to a different coordinate reference system.
@@ -930,7 +928,7 @@ def to_crs(self, crs=None, epsg=None, inplace=False):
930928
return exp
931929

932930
def plot(self, *args, **kwargs):
933-
"""Wrapper of the ``GeoDataFrame.plot`` method"""
931+
"""Wrapper of the :py:meth:`GeoDataFrame.plot` method"""
934932
self.gdf.plot(*args, **kwargs)
935933

936934
def copy(self, deep=True):

climada/util/scalebar_plot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,9 @@ def scale_bar(ax, location, length, metres_per_unit=1000, unit_name='km',
197197
va :
198198
Vertical alignment. Default: 'bottom'
199199
plot_kwargs :
200-
Keyword arguments for plot, overridden by **kwargs.
200+
Keyword arguments for plot, overridden by `**kwargs`.
201201
text_kwargs :
202-
Keyword arguments for text, overridden by **kwargs.
202+
Keyword arguments for text, overridden by `**kwargs`.
203203
kwargs :
204204
Keyword arguments for both plot and text.
205205
"""

doc/index.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ Jump right in:
6464
Running CLIMADA on Euler <guide/Guide_Euler>
6565

6666

67+
.. toctree::
68+
:caption: API Reference
69+
:hidden:
70+
71+
Python Modules <climada/climada>
72+
73+
6774
.. toctree::
6875
:maxdepth: 2
6976
:caption: Tutorials
@@ -100,7 +107,6 @@ Jump right in:
100107
:caption: Miscellaneous
101108
:hidden:
102109

103-
Python modules <climada/climada>
104110
README <misc/README>
105111
Changelog <misc/CHANGELOG>
106112
List of Authors <misc/AUTHORS>

doc/misc/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

doc/misc/README.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# CLIMADA
2+
3+
CLIMADA stands for **CLIM**ate **ADA**ptation and is a probabilistic natural catastrophe impact model, that also calculates averted damage (benefit) thanks to adaptation measures of any kind (from grey to green infrastructure, behavioural, etc.).
4+
5+
As of today, CLIMADA provides global coverage of major climate-related extreme-weather hazards at high resolution via a [data API](https://climada.ethz.ch/data-api/v1/docs), namely (i) tropical cyclones, (ii) river flood, (iii) agro drought and (iv) European winter storms, all at 4km spatial resolution - wildfire to be added soon. For all hazards, historic and probabilistic event sets exist, for some also under select climate forcing scenarios (RCPs) at distinct time horizons (e.g. 2040). See also [papers](https://github.com/CLIMADA-project/climada_papers) for details.
6+
7+
CLIMADA is divided into two parts (two repositories):
8+
9+
1. the core [climada_python](https://github.com/CLIMADA-project/climada_python) contains all the modules necessary for the probabilistic impact, the averted damage, uncertainty and forecast calculations. Data for hazard, exposures and impact functions can be obtained from the [data API](https://github.com/CLIMADA-project/climada_python/blob/main/doc/tutorial/climada_util_api_client.ipynb). [Litpop](https://github.com/CLIMADA-project/climada_python/blob/main/doc/tutorial/climada_entity_LitPop.ipynb) is included as demo Exposures module, and [Tropical cyclones](https://github.com/CLIMADA-project/climada_python/blob/main/doc/tutorial/climada_hazard_TropCyclone.ipynb) is included as a demo Hazard module.
10+
2. the petals [climada_petals](https://github.com/CLIMADA-project/climada_petals) contains all the modules for generating data (e.g., TC_Surge, WildFire, OpenStreeMap, ...). Most development is done here. The petals builds-upon the core and does not work as a stand-alone.
11+
12+
It is recommend for new users to begin with the core (1) and the [tutorials](https://github.com/CLIMADA-project/climada_python/tree/main/doc/tutorial) therein.
13+
14+
This is the Python (3.8+) version of CLIMADA - please see https://github.com/davidnbresch/climada for backward compatibility (MATLAB).
15+
16+
## Getting started
17+
18+
CLIMADA runs on Windows, macOS and Linux. It can be installed from sources or - in case of climada_python - directly with pip. See the [installation guide](https://climada-python.readthedocs.io/en/latest/guide/install.html) for instructions.
19+
20+
Follow the [tutorial](https://climada-python.readthedocs.io/en/latest/tutorial/1_main_climada.html) `climada_python-x.y.z/doc/tutorial/1_main_climada.ipynb` in a Jupyter Notebook to see what can be done with CLIMADA and how.
21+
22+
## Documentation
23+
24+
Documentation is available on Read the Docs:
25+
26+
Note that all the documentations has two versions,'latest' and 'stable', and explicit version numbers, such as 'v3.1.1', in the url path. 'latest' is created from the 'develop' branch and has the latest changes by developers, 'stable' from the latest release. For more details about documentation versions, please have a look at [here](https://readthedocs.org/projects/climada-python/versions/).
27+
28+
CLIMADA python:
29+
30+
* [online (recommended)](https://climada-python.readthedocs.io/en/latest/)
31+
* [PDF file](https://climada-python.readthedocs.io/_/downloads/en/stable/pdf/)
32+
33+
CLIMADA petals:
34+
35+
* [online (recommended)](https://climada-petals.readthedocs.io/en/latest/)
36+
* [PDF file](https://climada-petals.readthedocs.io/_/downloads/en/stable/pdf/)
37+
* [petals Tutorials on GitHub](https://github.com/CLIMADA-project/climada_petals/tree/main/doc/tutorial)
38+
39+
The documentation can also be [built locally](https://climada-python.readthedocs.io/en/latest/README.html).
40+
41+
## Citing CLIMADA
42+
43+
If you use CLIMADA please cite (in general, in particular for academic work) :
44+
45+
The [used version](https://zenodo.org/search?page=1&size=20&q=climada)
46+
47+
and/or the following published articles:
48+
49+
Aznar-Siguan, G. and Bresch, D. N., 2019: CLIMADA v1: a global weather and climate risk assessment platform, Geosci. Model Dev., 12, 3085–3097, https://doi.org/10.5194/gmd-12-3085-2019
50+
51+
Bresch, D. N. and Aznar-Siguan, G., 2021: CLIMADA v1.4.1: towards a globally consistent adaptation options appraisal tool, Geosci. Model Dev., 14, 351-363, https://doi.org/10.5194/gmd-14-351-2021
52+
53+
Please see all CLIMADA-related scientific publications in our [repository of scientific publications](https://github.com/CLIMADA-project/climada_papers) and cite according to your use of select features, be it hazard set(s), exposure(s) ...
54+
55+
In presentations or other graphical material, as well as in reports etc., where applicable, please add the logo as follows:\
56+
![https://github.com/CLIMADA-project/climada_python/blob/main/doc/guide/img/CLIMADA_logo_QR.png](https://github.com/CLIMADA-project/climada_python/blob/main/doc/guide/img/CLIMADA_logo_QR.png?raw=true)
57+
58+
As key link, please use https://wcr.ethz.ch/research/climada.html, as it will last and provides a bit of an intro, especially for those not familiar with GitHub - plus a nice CLIMADA infographic towards the bottom of the page
59+
60+
## Contributing
61+
62+
See the [Contribution Guide](CONTRIBUTING.md).
63+
64+
## Versioning
65+
66+
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [releases on this repository](https://github.com/CLIMADA-project/climada_python/releases).
67+
68+
## License
69+
70+
Copyright (C) 2017 ETH Zurich, CLIMADA contributors listed in AUTHORS.
71+
72+
CLIMADA is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License Version 3, 29 June 2007 as published by the Free Software Foundation, https://www.gnu.org/licenses/gpl-3.0.html
73+
74+
CLIMADA is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details: https://www.gnu.org/licenses/gpl-3.0.html

doc/tutorial/climada_engine_unsequa.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"cell_type": "markdown",
5151
"metadata": {},
5252
"source": [
53-
"Before doing an uncertainty quantification in CLIMADA, it is imperative that you get first comfortable with the different notions of uncertainty in the modelling world (see e.g.[Pianosi (2016)](https://www.sciencedirect.com/science/article/pii/S1364815216300287) or [Douglas-Smith(2020)](https://doi.org/10.1007/978-1-4899-7547-8_5) for a review). In particular, note that the uncertaintity values will only be as good as the input from the user. In addition, not all uncertainties can be numerically quantified, and even worse, some unkonwns are unknown. This means that sometimes, quantifying uncertainty can lead to false confidence in the output!. For a more philosophical discussion about the types of uncertainties in climate research see [Knüsel (2020)](https://www.research-collection.ethz.ch/handle/20.500.11850/399735) and [Otth (2022)]().\n",
53+
"Before doing an uncertainty quantification in CLIMADA, it is imperative that you get first comfortable with the different notions of uncertainty in the modelling world (see e.g.[Pianosi (2016)](https://www.sciencedirect.com/science/article/pii/S1364815216300287) or [Douglas-Smith(2020)](https://doi.org/10.1007/978-1-4899-7547-8_5) for a review). In particular, note that the uncertaintity values will only be as good as the input from the user. In addition, not all uncertainties can be numerically quantified, and even worse, some unkonwns are unknown. This means that sometimes, quantifying uncertainty can lead to false confidence in the output!. For a more philosophical discussion about the types of uncertainties in climate research see [Knüsel (2020)](https://www.research-collection.ethz.ch/handle/20.500.11850/399735) and [Otth (2022)](https://gmd.copernicus.org/articles/15/7177/2022).\n",
5454
"\n",
5555
"In this module, it is possible to perform global uncertainty analysis, as well as a sensitivity analysis. The word global is meant as opposition to the 'one-factor-at-a-time' (OAT) strategy. The OAT strategy, which consists in analyzing the effect of varying one model input factor at a time while keeping all other fixed, is popular among modellers, but has major shortcomings [Saltelli (2010)](https://www.sciencedirect.com/science/article/abs/pii/S1364815210001180), [Saltelli(2019)](http://www.sciencedirect.com/science/article/pii/S1364815218302822) and should not be used.\n",
5656
"\n",

doc/tutorial/climada_entity_ImpactFuncSet.ipynb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,12 @@
194194
"## Part 2: Loading impact functions from CLIMADA in-built impact functions\n",
195195
"\n",
196196
"In CLIMADA there is several defined impact functions that users can directly load and use them. However, users should be aware of the applications of the impact functions to types of assets, reading the background references of the impact functions are strongly recommended.<br>\n",
197-
"Currently available perils include [tropical cyclones](../climada/climada.hazard.html#module-climada.hazard.trop_cyclone), [river floods](https://climada-petals.readthedocs.io/en/stable/climada_petals/climada_petals.entity.impact_funcs.html#module-climada_petals.entity.impact_funcs.river_flood), [European windstorm](../climada/climada.hazard.html#module-climada.hazard.storm_europe), [crop yield](https://climada-petals.readthedocs.io/en/stable/climada_petals/climada_petals.entity.impact_funcs.html#module-climada_petals.entity.impact_funcs.relative_cropyield), and [drought](https://climada-petals.readthedocs.io/en/stable/climada_petals/climada_petals.entity.impact_funcs.html#module-climada_petals.entity.impact_funcs.drought). Continuous updates of perils are available.<br>\n",
197+
"Currently available perils include\n",
198+
"[tropical cyclones](https://climada-python.readthedocs.io/en/stable/climada/climada.hazard.html#module-climada.hazard.trop_cyclone),\n",
199+
"[river floods](https://climada-petals.readthedocs.io/en/stable/climada_petals/climada_petals.entity.impact_funcs.html#module-climada_petals.entity.impact_funcs.river_flood),\n",
200+
"[European windstorm](https://climada-python.readthedocs.io/en/stable/climada/climada.hazard.html#module-climada.hazard.storm_europe),\n",
201+
"[crop yield](https://climada-petals.readthedocs.io/en/stable/climada_petals/climada_petals.entity.impact_funcs.html#module-climada_petals.entity.impact_funcs.relative_cropyield), and\n",
202+
"[drought](https://climada-petals.readthedocs.io/en/stable/climada_petals/climada_petals.entity.impact_funcs.html#module-climada_petals.entity.impact_funcs.drought).Continuous updates of perils are available.<br>\n",
198203
"Here we use the impact function of tropical cyclones as an example.\n"
199204
]
200205
},

0 commit comments

Comments
 (0)