Skip to content

Commit f27c4aa

Browse files
committed
Include possible wrong lat lon extension in error message
1 parent 9ef7323 commit f27c4aa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

climada/util/coordinates.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,10 @@ def dist_to_coast(coord_lat, lon=None, highres=False, signed=False):
585585
f"Mismatching input coordinates size: {lat.size} != {lon.size}"
586586
)
587587
if not check_if_geo_coords(lat, lon):
588-
raise ValueError("Input lat and lon coordinates are not geographic.")
588+
raise ValueError(
589+
"Input lat and lon coordinates are not geographic "
590+
"or have total extents > 180° for lat or > 360° for lon."
591+
)
589592
return dist_to_coast_nasa(lat, lon, highres=highres, signed=signed)
590593

591594

0 commit comments

Comments
 (0)