xarray-tutorial icon indicating copy to clipboard operation
xarray-tutorial copied to clipboard

Cartopy plot not rendering

Open scottyhq opened this issue 1 year ago • 3 comments

https://tutorial.xarray.dev/intermediate/hvplot.html#geography

In theory, errors should be caught by CI, but situations come up with caching execution where if the failure is accidentally overlooked, the notebook isn't executed again unless it's content changes...

https://github.com/xarray-contrib/xarray-tutorial/blob/865c6e0be714f087f017dc1b7ab49b420a5ea743/_config.yml#L35-L37

File ~/micromamba/envs/xarray-tutorial/lib/python3.11/site-packages/cartopy/img_transform.py:278, in regrid(array, source_x_coords, source_y_coords, source_proj, target_proj, target_x_points, target_y_points, mask_extrapolated)
    274 else:
    275     # Versions of scipy >= v0.16 added the balanced_tree argument,
    276     # which caused the KDTree to hang with this input.
    277     kdtree = scipy.spatial.cKDTree(xyz, balanced_tree=False)
--> 278     _, indices = kdtree.query(target_xyz, k=1)
    279 mask = indices >= len(xyz)
    280 indices[mask] = 0

File _ckdtree.pyx:795, in scipy.spatial._ckdtree.cKDTree.query()

ValueError: 'x' must be finite, check for nan or inf values

scottyhq avatar Jun 28 '23 02:06 scottyhq

Pin scipy? https://github.com/SciTools/cartopy/issues/2199

dcherian avatar Jul 03 '23 22:07 dcherian

will be fixed in cartopy>=0.22 or can add pykdtree to the environment (https://github.com/SciTools/cartopy/issues/2217#issuecomment-1642371632)

scottyhq avatar Jul 27 '23 00:07 scottyhq

Greetings! Just wanted to check in and see if there has been any movement on this.

mzuranski avatar Dec 05 '23 02:12 mzuranski

fixed by #256

scottyhq avatar May 17 '24 18:05 scottyhq