Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wisc url relocation #944

Open
wants to merge 18 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Code freeze date: YYYY-MM-DD

### Fixed

- Broken ECMWF links in pydoc of `climada.hazard.storm_europe` relocated. [#944](https://github.com/CLIMADA-project/climada_python/pull/944)
- File handles are being closed after reading netcdf files with `climada.hazard` modules [#953](https://github.com/CLIMADA-project/climada_python/pull/953)
- Avoids a ValueError in the impact calculation for cases with a single exposure point and MDR values of 0, by explicitly removing zeros in `climada.hazard.Hazard.get_mdr` [#933](https://github.com/CLIMADA-project/climada_python/pull/948)

Expand Down
6 changes: 3 additions & 3 deletions climada/hazard/storm_europe.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@

class StormEurope(Hazard):
"""A hazard set containing european winter storm events. Historic storm
events can be downloaded at http://wisc.climate.copernicus.eu/ and read
events can be downloaded at https://cds.climate.copernicus.eu/ and read
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would replace this with this DOI https://doi.org/10.24381/cds.9b4ea013 althought I must admit that I haven't tested those NetCDFs...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I would explicitly mention the synthetic data at https://doi.org/10.24381/cds.ce973f02

with `from_footprints`. Weather forecasts can be automatically downloaded from
https://opendata.dwd.de/ and read with from_icon_grib(). Weather forecast
from the COSMO-Consortium http://www.cosmo-model.org/ can be read with
from the COSMO-Consortium https://www.cosmo-model.org/ can be read with
from_cosmoe_file().

Attributes
Expand Down Expand Up @@ -690,7 +690,7 @@ def calc_ssi(
ssi = sum_i(area_cell_i * intensity_cell_i^3)

'wisc_gust', according to the WISC Tier 1 definition found at
https://wisc.climate.copernicus.eu/wisc/#/help/products#tier1_section
https://confluence.ecmwf.int/display/CKB/Synthetic+Windstorm+Events+for+Europe+from+1986+to+2011%3A+Product+User+Guide
ssi = sum(area_on_land) * mean(intensity)^3

In both definitions, only raster cells that are above the threshold are
Expand Down
18 changes: 4 additions & 14 deletions doc/tutorial/climada_hazard_StormEurope.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"source": [
"## Reading Data\n",
"\n",
"StormEurope was written under the presumption that you'd start out with [WISC](https://wisc.climate.copernicus.eu/wisc/#/help/products#footprint_section) storm footprint data in netCDF format. This notebook works with a demo dataset. If you would like to work with the real data: (1) Please follow the link and download the file C3S_WISC_FOOTPRINT_NETCDF_0100.tgz from the Copernicus Windstorm Information Service, (2) unzip it (3) uncomment the last two lines in the following codeblock and (4) adjust the variable \"WISC_files\".\n",
"StormEurope was written under the presumption that you'd start out with [WISC](https://confluence.ecmwf.int/display/CKB/Synthetic+Windstorm+Events+for+Europe+from+1986+to+2011%3A+Product+User+Guide) storm footprint data in netCDF format. This notebook works with a demo dataset. If you would like to work with the real data: (1) Please follow the link and download the file C3S_WISC_FOOTPRINT_NETCDF_0100.tgz from the Copernicus Windstorm Information Service, (2) unzip it (3) uncomment the last two lines in the following codeblock and (4) adjust the variable \"WISC_files\".\n",
"\n",
"We first construct an instance and then point the reader at a directory containing compatible `.nc` files. Since there are other files in there, we must be explicit and use a globbing pattern; supplying incompatible files will make the reader fail.\n",
"\n",
Expand All @@ -42,17 +42,7 @@
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"$CLIMADA_SRC/climada/hazard/centroids/centr.py:822: UserWarning: Geometry is in a geographic CRS. Results from 'buffer' are likely incorrect. Use 'GeoSeries.to_crs()' to re-project geometries to a projected CRS before this operation.\n",
"\n",
" xy_pixels = self.geometry.buffer(res / 2).envelope\n"
]
}
],
"outputs": [],
"source": [
"from climada.hazard import StormEurope\n",
"from climada.util.constants import WS_DEMO_NC\n",
Expand Down Expand Up @@ -85,10 +75,10 @@
"\u001b[0;31mFile:\u001b[0m ~/code/climada_python/climada/hazard/storm_europe.py\n",
"\u001b[0;31mDocstring:\u001b[0m \n",
"A hazard set containing european winter storm events. Historic storm\n",
"events can be downloaded at http://wisc.climate.copernicus.eu/ and read\n",
"events can be downloaded at https://cds.climate.copernicus.eu/ and read\n",
"with `from_footprints`. Weather forecasts can be automatically downloaded from\n",
"https://opendata.dwd.de/ and read with from_icon_grib(). Weather forecast\n",
"from the COSMO-Consortium http://www.cosmo-model.org/ can be read with\n",
"from the COSMO-Consortium https://www.cosmo-model.org/ can be read with\n",
"from_cosmoe_file().\n",
"\n",
"Attributes\n",
Expand Down