Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recipe carvalhais is failing due to incompatibility of cartopy with scipy>=1.11.0 #3281

Closed
valeriupredoi opened this issue Jul 6, 2023 · 5 comments · Fixed by #3319
Closed

Comments

@valeriupredoi
Copy link
Contributor

Traceback (most recent call last):
  File "/home/b/b382109/ESMValTool/esmvaltool/diag_scripts/land_carbon_cycle/diag_global_turnover.py", line 819, in <module>
    main(config)
  File "/home/b/b382109/ESMValTool/esmvaltool/diag_scripts/land_carbon_cycle/diag_global_turnover.py", line 757, in main
    _plot_single_map(plot_path_mod, tau_ctotal,
  File "/home/b/b382109/ESMValTool/esmvaltool/diag_scripts/land_carbon_cycle/diag_global_turnover.py", line 654, in _plot_single_map
    plt.imshow(_get_data_to_plot(_dat.data),
  File "/home/b/b382109/miniconda3/envs/tool-latest/lib/python3.11/site-packages/matplotlib/pyplot.py", line 2695, in imshow
    __ret = gca().imshow(
            ^^^^^^^^^^^^^
  File "/home/b/b382109/miniconda3/envs/tool-latest/lib/python3.11/site-packages/cartopy/mpl/geoaxes.py", line 318, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/b/b382109/miniconda3/envs/tool-latest/lib/python3.11/site-packages/cartopy/mpl/geoaxes.py", line 1331, in imshow
    img, extent = warp_array(img,
                  ^^^^^^^^^^^^^^^
  File "/home/b/b382109/miniconda3/envs/tool-latest/lib/python3.11/site-packages/cartopy/img_transform.py", line 192, in warp_array
    array = regrid(array, source_native_xy[0], source_native_xy[1],
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/b/b382109/miniconda3/envs/tool-latest/lib/python3.11/site-packages/cartopy/img_transform.py", line 278, in regrid
    _, indices = kdtree.query(target_xyz, k=1)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "_ckdtree.pyx", line 795, in scipy.spatial._ckdtree.cKDTree.query
ValueError: 'x' must be finite, check for nan or inf values

this is signaled and raised here SciTools/cartopy#2199 and it looks like they already have a PR to fix it - keep an eye when SciTools/cartopy#2201 gets merged 🇵🇹

@bouweandela bouweandela changed the title Recipe carvalhais is failing due to incompatoibility of cartopy with scipy>=1.11.0 Recipe carvalhais is failing due to incompatibility of cartopy with scipy>=1.11.0 Jul 6, 2023
@valeriupredoi
Copy link
Contributor Author

@remi-kazeroni SciTools/cartopy#2201 got merged in the meantime so we may want to retest carvalhais with a brand new environment, when cartopy release a new version - not sure when that'd be since their last release was December last year 😬

@valeriupredoi
Copy link
Contributor Author

to check here - https://anaconda.org/conda-forge/cartopy - still at nearly 5 months old 👴

@rbeucher
Copy link
Contributor

Looks like It has been updated.

@remi-kazeroni
Copy link
Contributor

Thanks for spotting that release! Indeed, I could get a successful run with that recipe after updating to cartopy=0.22.0 in my environment. I'll make a PR to remove that recipe from the list of broken ones and close this issue 👍

@valeriupredoi
Copy link
Contributor Author

woohoo cheers gents, this fell of me radar 🎯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants