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 89e57ce commit 9b5600eCopy full SHA for 9b5600e
regional_mom6/regional_mom6.py
@@ -410,6 +410,9 @@ def rectangular_hgrid(λ, φ):
410
xarray.Dataset: An FMS-compatible ``hgrid`` that includes all required attributes.
411
"""
412
413
+ assert np.all(np.diff(λ) > 0), "longitudes array λ must be monotonically increasing"
414
+ assert np.all(np.diff(φ) > 0), "latitudes array φ must be monotonically increasing"
415
+
416
R = 6371e3 # mean radius of the Earth; https://en.wikipedia.org/wiki/Earth_radius
417
418
# compute longitude spacing and ensure that longitudes are uniformly spaced
0 commit comments