You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* hazard.from_raster_xarray: close opened dataset at last
* hazard.test_base_xarray: close datasets
use setUpClass and tearDownClass for testfiles
* CHANGELOG: added `from_raster_xarray`
* hazard.Hazard.from_raster_xarray: idiomatic use of `with open`
* Have two Hazard classmethods for reading xarray Dataset and file
Split the existing classmethod into two methods 'from_xarray_raster' and
'from_xarray_raster_file'. One first loads data from a dataset, the
second opens a file and then calls the first.
* Split classmethods.
* Update unit tests.
* Update docstrings.
* Improve tests for Hazard.from_xarray_raster(_file)
* Use temporary directory for storing data instead of local directory.
* Consistently open data files in context managers.
* Fix linter issue "no-else-raise"
* Update CHANGELOG.md
---------
Co-authored-by: Lukas Riedel <34276446+peanutfun@users.noreply.github.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,11 @@ updated:
23
23
24
24
### Added
25
25
26
-
-`climada.engine.impact.Impact` objects have new methods `from_hdf5` and `write_hdf5` for reading their data from, and writing it to, H5 files [#606](https://github.com/CLIMADA-project/climada_python/pull/606).
26
+
-`climada.hazard.Hazard.from_xarray_raster(_file)` class methods for reading `Hazard` objects from an `xarray.Dataset`, or from a file that can be read by `xarray`.
-`climada.engine.impact.Impact` objects have new methods `from_hdf5` and `write_hdf5` for reading their data from, and writing it to, H5 files [#606](https://github.com/CLIMADA-project/climada_python/pull/606)
27
31
-`climada.engine.impact.Impact` objects has a new class method `concat` for concatenation of impacts based on the same exposures [#529](https://github.com/CLIMADA-project/climada_python/pull/529).
28
32
-`climada.engine.impact_calc`: this module was separated from `climada.engine.impact` and contains the code that dealing with impact _calculation_ while the latter focuses on impact _data_[#560](https://github.com/CLIMADA-project/climada_python/pull/560).
29
33
- The classes `Hazard`, `Impact` and `ImpactFreqCurve` have a novel attribute `frequency_unit`. Before it was implicitly set to annual, now it can be specified and accordingly displayed in plots.
0 commit comments