-
-
Save darothen/c7560d8d19ffca90024c1f2df4927599 to your computer and use it in GitHub Desktop.
Hello!
I am having a similar issue but my lat and lon are 2 dimensional and not equally spaced (it's in a polar projection). add_cyclic_point() seem to only work with 1 dimensional longitudes. Is there an equivalent way to make it work in this case?
Thank you!
@Sumit-Mukherjee Please share the code
@Wamashudu Inside the function add_cyclic_point, modify the following snippet setting atol (default value 1e-5) according to your data values (for my case it is 0.1).
if not np.allclose(delta_coord, delta_coord[0], atol=0.1):
raise ValueError('The coordinate must be equally spaced.')
Commenting out these two lines will also work.
@sevfour I also encounter the same problem, have you found out a way to solve this? Thanks in advance if you can share your experience.
It worked! One more way I found is to set the tolerance (rtol) in numpy.allclose used in the function add_cyclic_point() according to my coordinate values. Thank you for the suggestion.