Skip to content

Commit e3b8edc

Browse files
author
Chahan Kropf
committed
Merge remote-tracking branch 'origin/feature/remove_implicit_use_crs' into feature/relative_matching_distance
2 parents ac1f537 + b55b02a commit e3b8edc

File tree

5 files changed

+466
-74
lines changed

5 files changed

+466
-74
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ Removed:
2626
### Changed
2727
- Changed the default mask_distance in `util.plot.geo_im_from_array` to 0.03 to avoid white gaps in gridded hazard data with comparably low resolution (>80 centroids per axis) [#1073](https://github.com/CLIMADA-project/climada_python/pull/1073)
2828
- Increased speed of `util.plot.add_shapes` by avoiding for loops, substantially speeding up `Hazard.plot_intensity` and other functions. [#1073](https://github.com/CLIMADA-project/climada_python/pull/1073)
29+
- Update `util.coordinates.match_centroids` and `util.coordinates.match_coordinates` so that they also
30+
accept coordinates that are not defined in degree.
31+
- Implement cheap test to check that input coordinates at least seem geographic for functions that require
32+
geographic coordinates as input (e.g. `util.coordinates.dist_to_coast`, `util.coordinates.coord_on_land`).
2933
- `Hazard.local_exceedance_intensity`, `Hazard.local_return_period` and `Impact.local_exceedance_impact`, `Impact.local_return_period`, using the `climada.util.interpolation` module: New default (no binning), binning on decimals, and faster implementation [#1012](https://github.com/CLIMADA-project/climada_python/pull/1012)
3034
- 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)
3135
- `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)

climada/hazard/test/test_tc_tracks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1350,7 +1350,7 @@ def test_track_land_params(self):
13501350
lon_test = np.array([170, 179.18, 180.05])
13511351
lat_test = np.array([-60, -16.56, -16.85])
13521352
on_land = np.array([False, True, True])
1353-
lon_shift = np.array([-360, 0, 360])
1353+
lon_shift = np.array([360, 360, 360])
13541354
# ensure both points are considered on land as is
13551355
np.testing.assert_array_equal(
13561356
u_coord.coord_on_land(lat=lat_test, lon=lon_test), on_land

climada/hazard/trop_cyclone/trop_cyclone_windfields.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -902,6 +902,8 @@ def _coriolis_parameter(lat: np.ndarray) -> np.ndarray:
902902
cp : np.ndarray of same shape as input
903903
Coriolis parameter.
904904
"""
905+
u_coord.check_if_geo_coords(lat, 0)
906+
905907
return 2 * V_ANG_EARTH * np.sin(np.radians(np.abs(lat)))
906908

907909

0 commit comments

Comments
 (0)