We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb2e16a commit 70fbde2Copy full SHA for 70fbde2
climada/util/coordinates.py
@@ -232,6 +232,7 @@ def lon_normalize(lon, center=0.0):
232
Normalized longitudinal coordinates. Since the input `lon` is modified in place (!), the
233
returned array is the same Python object (instead of a copy).
234
"""
235
+ check_if_geo_coords(lat=[0], lon=lon)
236
if center is None:
237
center = 0.5 * sum(lon_bounds(lon))
238
bounds = (center - 180, center + 180)
@@ -286,6 +287,7 @@ def lon_bounds(lon, buffer=0.0):
286
287
bounds : tuple (lon_min, lon_max)
288
Bounding box of the given points.
289
290
291
lon = lon_normalize(lon.copy())
292
lon_uniq = np.unique(lon)
293
lon_uniq = np.concatenate([lon_uniq, [360 + lon_uniq[0]]])
0 commit comments