Last active
April 25, 2023 11:55
-
-
Save darothen/c7560d8d19ffca90024c1f2df4927599 to your computer and use it in GitHub Desktop.
Example of adding cyclic points to DataArrays for plotting with Cartopy
@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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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!