Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
657b612
Add function to test if lat and lon are in geographic coords
Sep 22, 2024
b594b7f
Add test for geographic coords in dist_to_coast
Sep 22, 2024
e36ded8
Add test for geographic coords in coord_on_land
Sep 22, 2024
dc78a13
Merge branch 'develop-white' into feature/remove_implicit_use_crs
Oct 23, 2024
b88ecc4
Switch branch feature/remove_implicite_use_crs to black format
Oct 23, 2024
96ede79
Merge branch 'develop-black' into feature/remove_implicit_use_crs
Oct 23, 2024
2bc5c6a
Merge branch 'develop' into feature/remove_implicit_use_crs
Oct 23, 2024
b139e8f
Merge branch 'develop' into feature/remove_implicit_use_crs
Jan 14, 2025
c8aac80
Merge branch 'develop' into feature/remove_implicit_use_crs
Mar 5, 2025
320d0f7
Extend allowed extent for geo coords
Mar 5, 2025
9ef7323
Modify allowed extents in geo_coords check function to allow for bounds
Mar 6, 2025
f27c4aa
Include possible wrong lat lon extension in error message
Mar 6, 2025
df439a5
Add check for geo coords in get_country_code
Mar 6, 2025
d3aea1e
Add test for geocoords in convert_wgs_to_utm
Mar 6, 2025
fb3cf7e
Update error message in coord_on_land
Mar 6, 2025
cf57963
Harmonize error messages
Mar 6, 2025
cb1e718
Adapt test get_country_geometries_fail
Mar 6, 2025
2a1f9b1
Check for geo coords in match_coordinates
Mar 6, 2025
322a9d3
Add check for lat in get_gridcellarea
Mar 6, 2025
60dc067
Modify check geo coords function to please linter
Mar 6, 2025
a0e02be
Add test for geo coords in calc of coriolis param
Mar 6, 2025
127d9cc
Add tests for check_if_geo_coords function
Mar 6, 2025
737fcd4
Merge branch 'develop' into feature/remove_implicit_use_crs
Apr 8, 2025
eca9f77
Incorporate suggestions from review 1
luseverin Apr 8, 2025
99635bf
Start adapating match_coordinates function to other crs
May 15, 2025
a642c04
Add handling of unit in match_centroids
May 15, 2025
eea31cb
Rename deg to degrees
May 15, 2025
35f0f7f
Add function to infer unit of coordinates
May 15, 2025
782b53d
Use infer_unit_coords in match_centroids function
May 15, 2025
ffee7f8
Add tests for unit_infer and unit-adapted match_coordinates
May 15, 2025
61e7b0f
Make test_tack_land_params compliant with new requirement of geodetic…
May 15, 2025
ef250c4
Correct wrong is_geodetic crs attribute
May 15, 2025
bca6e3a
Add restriction for haversine with non-degree units
May 15, 2025
54e2f75
Finish adding test for handling of different units
May 15, 2025
63bf8b5
Add test invalid unit for match coords and docstrings
May 15, 2025
da1c965
Update docstrings
May 15, 2025
5d53512
Try to fix new linter issues
May 15, 2025
54c8565
Correct error in logger warning
May 15, 2025
e1c9633
Force check_antimeridian to False in distance euclidean if unit is no…
Jun 19, 2025
fbcb163
Remove outdated test for raise of ValueError when check_antimeridian …
Jun 19, 2025
41b66bb
Add function to get coordinates from axis of coordinates'crs
Jun 27, 2025
7d1d3f3
Update unit names to be consistent with epsg notation and remove unit…
Jun 27, 2025
2176402
Clarify docstring check_if_geo_coords
Jun 27, 2025
8edb184
Make conversion between radians and degrees more consistent
Jun 27, 2025
91600a9
Remove deprecated infer_unit_coords function
Jun 27, 2025
f0d8dcc
Update tests
Jun 27, 2025
d45e55f
Force input coords and centroids to have crs attribute in match_centr…
Jun 27, 2025
409ff73
Re-harmonize unit names and raise error when crs of centroids or coor…
Jun 27, 2025
028fa0b
Add missing tests
Jun 27, 2025
2da2e2e
Fix linter issues
Jun 27, 2025
e2022ba
Refix linter
Jun 27, 2025
9c4b51e
Wrap valuerror raising in check_if_geo_coords
Jul 28, 2025
f14d5f0
Update tests
Jul 28, 2025
a733e8e
Remove useless info in get_crs_unit docstring
Jul 28, 2025
685c241
Raise separate exceptions for missing crs in coord_gdf and centroids
luseverin Jul 28, 2025
a5d5c20
Fix error in _nearest_neighbor_approx docstring
Jul 28, 2025
16bcc84
Make clearer error message for _nearest_neighbor with non-allowed units
Jul 30, 2025
07a4a73
Simplify crs check in match_centroids
Jul 30, 2025
f2d49b3
Correct typo and update tests for new error messages in match_centroids
Jul 30, 2025
0f3de31
Only warn for check_antimeridian when it is true and add tests
Jul 30, 2025
c67d6da
Allow for units other than degree km and m by keeping distance thresh…
Jul 30, 2025
a260848
Update thresholds in test to be consisten with handling of thresholds…
Jul 30, 2025
2f6bb5e
Remove mention to calling functions in error message in _nearest_neig…
luseverin Jul 30, 2025
734541a
Remove mention to calling functions in error message in _nearest_neig…
luseverin Jul 30, 2025
86d8126
Update docstrings match_centroids
Jul 30, 2025
faf8666
update docstrings for match_coordinates
Jul 30, 2025
b55b02a
Update changelog
Jul 30, 2025
45175c2
Remove confusing comments in code
Aug 5, 2025
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ Code freeze date: YYYY-MM-DD
### Added

### Changed
- Update `util.coordinates.match_centroids` and `util.coordinates.match_coordinates` so that they also
accept coordinates that are not defined in degree.
- Implement cheap test to check that input coordinates at least seem geographic for functions that require
geographic coordinates as input (e.g. `util.coordinates.dist_to_coast`, `util.coordinates.coord_on_land`).
- `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)
### Fixed

Expand Down
2 changes: 1 addition & 1 deletion climada/hazard/test/test_tc_tracks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1341,7 +1341,7 @@ def test_track_land_params(self):
lon_test = np.array([170, 179.18, 180.05])
lat_test = np.array([-60, -16.56, -16.85])
on_land = np.array([False, True, True])
lon_shift = np.array([-360, 0, 360])
lon_shift = np.array([360, 360, 360])
# ensure both points are considered on land as is
np.testing.assert_array_equal(
u_coord.coord_on_land(lat=lat_test, lon=lon_test), on_land
Expand Down
2 changes: 2 additions & 0 deletions climada/hazard/trop_cyclone/trop_cyclone_windfields.py
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,8 @@ def _coriolis_parameter(lat: np.ndarray) -> np.ndarray:
cp : np.ndarray of same shape as input
Coriolis parameter.
"""
u_coord.check_if_geo_coords(lat, 0)

return 2 * V_ANG_EARTH * np.sin(np.radians(np.abs(lat)))


Expand Down
Loading
Loading