Skip to content

Commit e36ded8

Browse files
committed
Add test for geographic coords in coord_on_land
1 parent b594b7f commit e36ded8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

climada/util/coordinates.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,8 @@ def coord_on_land(lat, lon, land_geom=None):
648648
% (lat.size, lon.size))
649649
if lat.size == 0:
650650
return np.empty((0,), dtype=bool)
651+
if not check_if_geo_coords(lat, lon):
652+
raise ValueError('Input lat and lon coordinates are not geographic.')
651653
delta_deg = 1
652654
lons = lon.copy()
653655
if land_geom is None:

0 commit comments

Comments
 (0)