Commit 73ef1af9 authored by Martin Reinecke's avatar Martin Reinecke

improve grid size checks for GL

parent 8ce837d0
Pipeline #11105 failed with stage
in 21 minutes and 34 seconds
......@@ -187,10 +187,9 @@ class GLSpace(Space):
def _parse_nlat(self, nlat):
nlat = int(nlat)
if nlat < 2:
raise ValueError("nlat must be greater than 2.")
elif nlat % 2 != 0:
raise ValueError("nlat must be a multiple of 2.")
if nlat < 1:
raise ValueError(
"nlat must be a positive number.")
return nlat
def _parse_nlon(self, nlon):
......@@ -198,9 +197,8 @@ class GLSpace(Space):
nlon = 2 * self.nlat - 1
else:
nlon = int(nlon)
if nlon != 2 * self.nlat - 1:
self.logger.warn("nlon was set to an unrecommended value: "
"nlon <> 2*nlat-1.")
if nlon < 1:
raise ValueError("nlon must be a positive number.")
return nlon
# ---Serialization---
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment