Skip to content

Commit 769cdd2

Browse files
Separate Hazard xarray reader into its own module (#1063)
* Move Hazard xarray reader and tests into separate module * Deprecate `Hazard.from_raster_xarray_file` * Make `Hazard.from_raster_xarray` handle files. * Update tests * Fix linter issues * Update docstrings, docs, tests, and CHANGELOG.md * Avoid .values accessor of DataArray --------- Co-authored-by: emanuel-schmid <[email protected]>
1 parent 355f4da commit 769cdd2

File tree

6 files changed

+1123
-953
lines changed

6 files changed

+1123
-953
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ Removed:
3939
- World Bank indicator data is now downloaded directly from their API via the function `download_world_bank_indicator`, instead of relying on the `pandas-datareader` package [#1033](https://github.com/CLIMADA-project/climada_python/pull/1033)
4040
- `Exposures.write_hdf5` pickles geometry data in WKB format, which is faster and more sustainable. [#1051](https://github.com/CLIMADA-project/climada_python/pull/1051)
4141
- The online documentation has been completely overhauled, now uses PyData theme: [#977](https://github.com/CLIMADA-project/climada_python/pull/977)
42+
- Add `climada.hazard.xarray` module with helper structures for reading Hazard objects from `xarray` data [#1063](https://github.com/CLIMADA-project/climada_python/pull/1063)
4243

4344
### Fixed
4445

@@ -47,6 +48,8 @@ Removed:
4748

4849
### Deprecated
4950

51+
- `Hazard.from_xarray_raster_file`. Use `Hazard.from_xarray_raster` and pass the file path as `data` argument [#1063](https://github.com/CLIMADA-project/climada_python/pull/1063)
52+
5053
### Removed
5154

5255
- `climada.util.interpolation.round_to_sig_digits` [#1012](https://github.com/CLIMADA-project/climada_python/pull/1012)

0 commit comments

Comments
 (0)