SciTools / cartopy

Cartopy - a cartographic python library with matplotlib support
https://scitools.org.uk/cartopy/docs/latest
BSD 3-Clause "New" or "Revised" License
1.41k stars 359 forks source link

Plotting custom coastline fails in some projections since Matplolib 3.8 #2260

Closed oliviermarti closed 11 months ago

oliviermarti commented 11 months ago

Description

Plotting custom coastline fails in some projections since Matplolib 3.8

The coastline is a series of longitude/latitude values. A few values are set to np.nan to interrupt the line between continental masses.

The code will produce a first figure, which is close to what we want. But with an obvious problem.

The second figure fails in the present environment, but was perfectly fine with older version of Matplotlib (and other packages, but I haven't a log of that)

Thanks,

Olivier

Code to reproduce

import xarray as xr
import matplotlib.pyplot as plt
import cartopy.crs as ccrs

f_c = 'https://thredds-su.ipsl.fr/thredds/dodsC/tgcc_thredds/work/p86mart/GRAF/DATA/eorca1.4.2_coastline.nc'
d_c = xr.open_dataset (f_c)

# Read line data
## lon_coast, lat_coast contain nan where the line must be interrupted
lon_coast = d_c['lon_coast'] ; lat_coast = d_c['lat_coast']

# Describe the model projection in the file
ProjIn = ccrs.PlateCarree (central_longitude=0) 

# Projection for plots
ProjPlot = ccrs.Robinson (central_longitude=0) # Plotted projection

# Creates the figure, with a projection
fix, ax = plt.subplots ( 1, 2, subplot_kw={'projection':ProjPlot} )

# Plot model coastline 
## This plot works, but is not what we want !
ax[0].plot (lon_coast.fillna(0), lat_coast.fillna(0), linewidth=2, color='red' , transform=ProjIn)

# This plot fails. It was OK with Matplotlib 3.7
np.seterr (all='ignore') # Does not help
ax[1].plot (lon_coast, lat_coast, linewidth=1, color='blue', transform=ProjIn)

Traceback

--------------------------------------------------------------------------
GEOSException                             Traceback (most recent call last)
Cell In[17], line 27
     25 # This plot fails. It was OK with Matplotlib 3.7
     26 np.seterr (all='ignore') # Does not help
---> 27 ax[1].plot (lon_coast, lat_coast, linewidth=1, color='blue', transform=ProjIn)

File ~/mambaforge/envs/FULL/lib/python3.10/site-packages/matplotlib/axes/_axes.py:1723, in Axes.plot(self, scalex, scaley, data, *args, **kwargs)
   1721 lines = [*self._get_lines(self, *args, data=data, **kwargs)]
   1722 for line in lines:
-> 1723     self.add_line(line)
   1724 if scalex:
   1725     self._request_autoscale_view("x")

File ~/mambaforge/envs/FULL/lib/python3.10/site-packages/matplotlib/axes/_base.py:2309, in _AxesBase.add_line(self, line)
   2306 if line.get_clip_path() is None:
   2307     line.set_clip_path(self.patch)
-> 2309 self._update_line_limits(line)
   2310 if not line.get_label():
   2311     line.set_label(f'_child{len(self._children)}')

File ~/mambaforge/envs/FULL/lib/python3.10/site-packages/matplotlib/axes/_base.py:2348, in _AxesBase._update_line_limits(self, line)
   2346 if self.transData.is_affine:
   2347     line_trans_path = line._get_transformed_path()
-> 2348     na_path, _ = line_trans_path.get_transformed_path_and_affine()
   2349     data_path = trf_to_data.transform_path_affine(na_path)
   2350 else:

File ~/mambaforge/envs/FULL/lib/python3.10/site-packages/matplotlib/transforms.py:2776, in TransformedPath.get_transformed_path_and_affine(self)
   2770 def get_transformed_path_and_affine(self):
   2771     """
   2772     Return a copy of the child path, with the non-affine part of
   2773     the transform already applied, along with the affine part of
   2774     the path necessary to complete the transformation.
   2775     """
-> 2776     self._revalidate()
   2777     return self._transformed_path, self.get_affine()

File ~/mambaforge/envs/FULL/lib/python3.10/site-packages/matplotlib/transforms.py:2752, in TransformedPath._revalidate(self)
   2746 def _revalidate(self):
   2747     # only recompute if the invalidation includes the non_affine part of
   2748     # the transform
   2749     if (self._invalid == self._INVALID_FULL
   2750             or self._transformed_path is None):
   2751         self._transformed_path = \
-> 2752             self._transform.transform_path_non_affine(self._path)
   2753         self._transformed_points = \
   2754             Path._fast_from_codes_and_verts(
   2755                 self._transform.transform_non_affine(self._path.vertices),
   2756                 None, self._path)
   2757     self._invalid = 0

File ~/mambaforge/envs/FULL/lib/python3.10/site-packages/matplotlib/transforms.py:2426, in CompositeGenericTransform.transform_path_non_affine(self, path)
   2424     return path
   2425 elif not self._a.is_affine and self._b.is_affine:
-> 2426     return self._a.transform_path_non_affine(path)
   2427 else:
   2428     return self._b.transform_path_non_affine(
   2429                             self._a.transform_path(path))

File ~/mambaforge/envs/FULL/lib/python3.10/site-packages/cartopy/mpl/geoaxes.py:186, in InterProjectionTransform.transform_path_non_affine(self, src_path)
    182 geoms = cpatch.path_to_geos(src_path,
    183                             getattr(self, 'force_path_ccw', False))
    185 for geom in geoms:
--> 186     proj_geom = self.target_projection.project_geometry(
    187         geom, self.source_projection)
    188     transformed_geoms.append(proj_geom)
    190 if not transformed_geoms:

File ~/mambaforge/envs/FULL/lib/python3.10/site-packages/cartopy/crs.py:817, in Projection.project_geometry(self, geometry, src_crs)
    815 if not method_name:
    816     raise ValueError(f'Unsupported geometry type {geom_type!r}')
--> 817 return getattr(self, method_name)(geometry, src_crs)

File ~/mambaforge/envs/FULL/lib/python3.10/site-packages/cartopy/crs.py:922, in Projection._project_multiline(self, geometry, src_crs)
    920 geoms = []
    921 for geom in geometry.geoms:
--> 922     r = self._project_line_string(geom, src_crs)
    923     if r:
    924         geoms.extend(r.geoms)

File ~/mambaforge/envs/FULL/lib/python3.10/site-packages/cartopy/crs.py:823, in Projection._project_line_string(self, geometry, src_crs)
    822 def _project_line_string(self, geometry, src_crs):
--> 823     return cartopy.trace.project_linear(geometry, src_crs, self)

File lib/cartopy/trace.pyx:585, in cartopy.trace.project_linear()

File ~/mambaforge/envs/FULL/lib/python3.10/site-packages/shapely/prepared.py:45, in PreparedGeometry.covers(self, other)
     43 def covers(self, other):
     44     """Returns True if the geometry covers the other, else False"""
---> 45     return self.context.covers(other)

File ~/mambaforge/envs/FULL/lib/python3.10/site-packages/shapely/geometry/base.py:650, in BaseGeometry.covers(self, other)
    648 def covers(self, other):
    649     """Returns True if the geometry covers the other, else False"""
--> 650     return _maybe_unpack(shapely.covers(self, other))

File ~/mambaforge/envs/FULL/lib/python3.10/site-packages/shapely/decorators.py:77, in multithreading_enabled.<locals>.wrapped(*args, **kwargs)
     75     for arr in array_args:
     76         arr.flags.writeable = False
---> 77     return func(*args, **kwargs)
     78 finally:
     79     for arr, old_flag in zip(array_args, old_flags):

File ~/mambaforge/envs/FULL/lib/python3.10/site-packages/shapely/predicates.py:688, in covers(a, b, **kwargs)
    642 @multithreading_enabled
    643 def covers(a, b, **kwargs):
    644     """Returns True if no point in geometry B is outside geometry A.
    645 
    646     Parameters
   (...)
    686     False
    687     """
--> 688     return lib.covers(a, b, **kwargs)

GEOSException: IllegalArgumentException: CGAlgorithmsDD::orientationIndex encountered NaN/Inf numbers
Full environment definition ### Operating system Mac OS X 13.5.2 ### Cartopy versions (and others) Version python : 3.10.12 | packaged by conda-forge | (main, Jun 23 2023, 22:39:40) [Clang 15.0.7 ] Version numpy : 1.23.5 Version xarray : 2023.9.0 Version Matplotlib : 3.8.0 Version Cartopy : 0.22.0 ### conda list ``` # packages in environment at /Users/marti/mambaforge/envs/FULL: # # Name Version Build Channel _py-xgboost-mutex 2.0 cpu_0 conda-forge _r-mutex 1.0.1 anacondar_1 conda-forge affine 2.4.0 pyhd8ed1ab_0 conda-forge antlr-python-runtime 4.7.2 py310h2ec42d9_1003 conda-forge anyio 4.0.0 pyhd8ed1ab_0 conda-forge aom 3.6.1 he965462_0 conda-forge appdirs 1.4.4 pyh9f0ad1d_0 conda-forge appnope 0.1.3 pyhd8ed1ab_0 conda-forge argon2-cffi 23.1.0 pyhd8ed1ab_0 conda-forge argon2-cffi-bindings 21.2.0 py310h6729b98_4 conda-forge arrow 1.3.0 pyhd8ed1ab_0 conda-forge asttokens 2.4.0 pyhd8ed1ab_0 conda-forge async-lru 2.0.4 pyhd8ed1ab_0 conda-forge atk-1.0 2.38.0 h1d18e73_1 conda-forge attrs 23.1.0 pyh71513ae_1 conda-forge aws-c-auth 0.7.4 h7fea801_1 conda-forge aws-c-cal 0.6.2 hfc10710_2 conda-forge aws-c-common 0.9.3 h0dc2134_0 conda-forge aws-c-compression 0.2.17 hd41bdd4_3 conda-forge aws-c-event-stream 0.3.2 hab6341b_1 conda-forge aws-c-http 0.7.13 h868b204_1 conda-forge aws-c-io 0.13.32 hc4800aa_4 conda-forge aws-c-mqtt 0.9.6 he6da789_2 conda-forge aws-c-s3 0.3.17 h5997705_3 conda-forge aws-c-sdkutils 0.1.12 hd41bdd4_2 conda-forge aws-checksums 0.1.17 hd41bdd4_2 conda-forge aws-crt-cpp 0.23.1 h4e3dc9b_5 conda-forge aws-sdk-cpp 1.11.156 h99d1da1_3 conda-forge babel 2.12.1 pyhd8ed1ab_1 conda-forge backcall 0.2.0 pyh9f0ad1d_0 conda-forge backports 1.0 pyhd8ed1ab_3 conda-forge backports.functools_lru_cache 1.6.5 pyhd8ed1ab_0 conda-forge bagit 1.8.1 pypi_0 pypi beautifulsoup4 4.12.2 pyha770c72_0 conda-forge bleach 6.0.0 pyhd8ed1ab_0 conda-forge blosc 1.21.5 heccf04b_0 conda-forge bokeh 3.2.2 pyhd8ed1ab_0 conda-forge branca 0.6.0 pyhd8ed1ab_0 conda-forge brotli 1.1.0 h0dc2134_1 conda-forge brotli-bin 1.1.0 h0dc2134_1 conda-forge brotli-python 1.1.0 py310h9e9d8ca_1 conda-forge brunsli 0.1 h046ec9c_0 conda-forge bs4 4.12.2 hd8ed1ab_0 conda-forge bwidget 1.9.14 h694c41f_1 conda-forge bzip2 1.0.8 h0d85af4_4 conda-forge c-ares 1.19.1 h0dc2134_0 conda-forge c-blosc2 2.10.4 h0dcb076_0 conda-forge ca-certificates 2023.7.22 h8857fd0_0 conda-forge cached-property 1.5.2 hd8ed1ab_1 conda-forge cached_property 1.5.2 pyha770c72_1 conda-forge cairo 1.16.0 hfdb49f2_1017 conda-forge cartopy 0.22.0 py310h5e4fcda_0 conda-forge cattrs 23.1.2 pyhd8ed1ab_0 conda-forge cctools_osx-64 973.0.1 ha1c5b94_14 conda-forge cdat_info 8.2.1 pyhd8ed1ab_2 conda-forge cdms2 3.1.5 py310h747318d_21 conda-forge cdo 2.2.2 h4f18e44_2 conda-forge cdsapi 0.6.1 pyhd8ed1ab_0 conda-forge cdtime 3.1.4 py310h90346de_11 conda-forge certifi 2023.7.22 pyhd8ed1ab_0 conda-forge cf-units 3.2.0 py310hc1335a1_0 conda-forge cf_xarray 0.8.4 pyhd8ed1ab_0 conda-forge cffi 1.16.0 py310hdca579f_0 conda-forge cfitsio 4.3.0 h66f91ea_0 conda-forge cftime 1.6.2 py310hf0b6da5_2 conda-forge cfunits 3.3.6 pyhd8ed1ab_0 conda-forge charls 2.4.2 he965462_0 conda-forge charset-normalizer 3.2.0 pyhd8ed1ab_0 conda-forge clang 16.0.6 hc177806_1 conda-forge clang-16 16.0.6 default_h762fdd7_1 conda-forge clang_osx-64 16.0.6 h8787910_1 conda-forge clangxx 16.0.6 default_h762fdd7_1 conda-forge clangxx_osx-64 16.0.6 h1b7723c_1 conda-forge click 8.1.7 unix_pyh707e725_0 conda-forge click-plugins 1.1.1 py_0 conda-forge cligj 0.7.2 pyhd8ed1ab_1 conda-forge cloudpickle 2.2.1 pyhd8ed1ab_0 conda-forge cmcrameri 1.7 pyhd8ed1ab_0 conda-forge cmocean 3.0.3 pyhd8ed1ab_0 conda-forge colorama 0.4.6 pyhd8ed1ab_0 conda-forge colorcet 3.0.1 pyhd8ed1ab_0 conda-forge colorspacious 1.1.2 pyh24bf2e0_0 conda-forge comm 0.1.4 pyhd8ed1ab_0 conda-forge compiler-rt 16.0.6 he1888fc_0 conda-forge compiler-rt_osx-64 16.0.6 he1888fc_0 conda-forge configobj 5.0.8 pyhd8ed1ab_0 conda-forge contourpy 1.1.1 py310h88cfcbd_1 conda-forge cryptography 41.0.4 py310ha1817de_0 conda-forge curl 8.3.0 h5f667d7_0 conda-forge cycler 0.11.0 pyhd8ed1ab_0 conda-forge cython 3.0.2 py310h9e9d8ca_2 conda-forge cytoolz 0.12.2 py310h6729b98_1 conda-forge dask 2023.9.3 pyhd8ed1ab_0 conda-forge dask-core 2023.9.3 pyhd8ed1ab_0 conda-forge dav1d 1.2.1 h0dc2134_0 conda-forge debugpy 1.8.0 py310h9e9d8ca_1 conda-forge decorator 5.1.1 pyhd8ed1ab_0 conda-forge defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge demjson3 3.0.6 pypi_0 pypi deprecation 2.1.0 pyh9f0ad1d_0 conda-forge dill 0.3.7 pypi_0 pypi distarray 2.12.2 pyh050c7b8_4 conda-forge distributed 2023.9.3 pyhd8ed1ab_0 conda-forge eccodes 2.32.0 h008e9a8_0 conda-forge ecmwf-api-client 1.6.3 pyhd8ed1ab_0 conda-forge entrypoints 0.4 pyhd8ed1ab_0 conda-forge eofs 1.4.0 py_0 conda-forge esgf-pyclient 0.3.1 pyh1a96a4e_2 conda-forge esmf 8.4.2 mpi_mpich_h528c01e_103 conda-forge esmpy 8.4.2 pyhc1e730c_4 conda-forge esmvalcore 2.4.0 pyhd8ed1ab_3 conda-forge esmvaltool 2.4.0 pyhd8ed1ab_0 conda-forge esmvaltool-ncl 2.4.0 hd8ed1ab_0 conda-forge esmvaltool-python 2.4.0 pyhd8ed1ab_0 conda-forge esmvaltool-r 2.4.0 hd8ed1ab_0 conda-forge et_xmlfile 1.1.0 pyhd8ed1ab_0 conda-forge exceptiongroup 1.1.3 pyhd8ed1ab_0 conda-forge executing 1.2.0 pyhd8ed1ab_0 conda-forge expat 2.5.0 hf0c8a7f_1 conda-forge f90nml 1.4.3 pyhd8ed1ab_0 conda-forge fancycompleter 0.9.1 py310h2ec42d9_1006 conda-forge fftw 3.3.10 nompi_h4fa670e_108 conda-forge findlibs 0.0.5 pyhd8ed1ab_0 conda-forge fiona 1.9.4 py310h10f461c_0 conda-forge fire 0.5.0 pyhd8ed1ab_0 conda-forge flake8 6.1.0 pyhd8ed1ab_0 conda-forge flake8-docstrings 1.7.0 pyhd8ed1ab_0 conda-forge folium 0.14.0 pyhd8ed1ab_0 conda-forge font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge font-ttf-inconsolata 3.000 h77eed37_0 conda-forge font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge font-ttf-ubuntu 0.83 hab24e00_0 conda-forge fontconfig 2.14.2 h5bb23bf_0 conda-forge fonts-conda-ecosystem 1 0 conda-forge fonts-conda-forge 1 0 conda-forge fonttools 4.43.0 py310h6729b98_0 conda-forge fqdn 1.5.1 pyhd8ed1ab_0 conda-forge freetype 2.12.1 h60636b9_2 conda-forge freexl 2.0.0 h3ec172f_0 conda-forge fribidi 1.0.10 hbcb3906_0 conda-forge fsspec 2023.9.2 pyh1a96a4e_0 conda-forge future 0.18.3 pyhd8ed1ab_0 conda-forge g2clib 1.7.0 h694c41f_4 conda-forge gdal 3.7.2 py310hbe79b9e_4 conda-forge gdk-pixbuf 2.42.10 h5968b1e_3 conda-forge geopandas 0.14.0 pyhd8ed1ab_0 conda-forge geopandas-base 0.14.0 pyha770c72_0 conda-forge geos 3.12.0 he965462_0 conda-forge geotiff 1.7.1 hc41fca6_13 conda-forge gettext 0.21.1 h8a4c099_0 conda-forge gflags 2.2.2 hb1e8313_1004 conda-forge gfortran_impl_osx-64 12.3.0 h54fd467_1 conda-forge gfortran_osx-64 12.3.0 h18f7dce_1 conda-forge ghostscript 10.02.0 he965462_0 conda-forge giflib 5.2.1 hb7f2c08_3 conda-forge glog 0.6.0 h8ac2a54_0 conda-forge gmp 6.2.1 h2e338ed_0 conda-forge graphite2 1.3.13 h2e338ed_1001 conda-forge graphviz 8.1.0 hc7f41f9_0 conda-forge gsl 2.7 h93259b0_0 conda-forge gsw 3.6.17 py310hc1335a1_0 conda-forge gtk2 2.24.33 h7c1209e_2 conda-forge gts 0.7.6 h53e17e3_4 conda-forge harfbuzz 8.2.1 h7666e2a_0 conda-forge hdf4 4.2.15 h9804679_6 conda-forge hdf5 1.14.2 mpi_mpich_h3618df7_0 conda-forge hdfeos2 2.20 h7122b0a_1003 conda-forge hdfeos5 5.1.16 hca3f194_15 conda-forge holoviews 1.17.1 pyhd8ed1ab_0 conda-forge humanfriendly 10.0 py310h2ec42d9_4 conda-forge hvplot 0.8.4 pyhd8ed1ab_1 conda-forge icu 73.2 hf5e326d_0 conda-forge idna 3.4 pyhd8ed1ab_0 conda-forge imagecodecs 2023.9.18 py310hb72ea00_0 conda-forge imageio 2.31.1 pyh24c5eb1_0 conda-forge imagemagick 7.1.1_19 pl5321hfd0a208_0 conda-forge importlib-metadata 6.8.0 pyha770c72_0 conda-forge importlib_metadata 6.8.0 hd8ed1ab_0 conda-forge importlib_resources 6.1.0 pyhd8ed1ab_0 conda-forge iniconfig 2.0.0 pyhd8ed1ab_0 conda-forge ipdb 0.13.13 pyhd8ed1ab_0 conda-forge ipykernel 6.25.2 pyh1050b4e_0 conda-forge ipympl 0.9.3 pyhd8ed1ab_0 conda-forge ipython 8.16.1 pyh31c8845_0 conda-forge ipython_genutils 0.2.0 py_1 conda-forge ipywidgets 8.1.1 pyhd8ed1ab_0 conda-forge iris 3.7.0 pyha770c72_0 conda-forge isl 0.25 hb486fe8_0 conda-forge isodate 0.6.1 pyhd8ed1ab_0 conda-forge isoduration 20.11.0 pyhd8ed1ab_0 conda-forge itsdangerous 2.1.2 pyhd8ed1ab_0 conda-forge jasper 4.0.0 h794afb9_1 conda-forge jbig 2.1 h0d85af4_2003 conda-forge jedi 0.19.1 pyhd8ed1ab_0 conda-forge jinja2 3.1.2 pyhd8ed1ab_1 conda-forge joblib 1.3.2 pyhd8ed1ab_0 conda-forge json-c 0.17 h8e11ae5_0 conda-forge json5 0.9.14 pyhd8ed1ab_0 conda-forge jsonpointer 2.4 py310h2ec42d9_3 conda-forge jsonschema 4.19.1 pyhd8ed1ab_0 conda-forge jsonschema-specifications 2023.7.1 pyhd8ed1ab_0 conda-forge jsonschema-with-format-nongpl 4.19.1 pyhd8ed1ab_0 conda-forge jupyter-lsp 2.2.0 pyhd8ed1ab_0 conda-forge jupyter_client 8.3.1 pyhd8ed1ab_0 conda-forge jupyter_core 5.3.2 py310h2ec42d9_0 conda-forge jupyter_events 0.7.0 pyhd8ed1ab_2 conda-forge jupyter_server 2.7.3 pyhd8ed1ab_1 conda-forge jupyter_server_terminals 0.4.4 pyhd8ed1ab_1 conda-forge jupyterlab 4.0.6 pyhd8ed1ab_0 conda-forge jupyterlab_pygments 0.2.2 pyhd8ed1ab_0 conda-forge jupyterlab_server 2.25.0 pyhd8ed1ab_0 conda-forge jupyterlab_widgets 3.0.9 pyhd8ed1ab_0 conda-forge jupytext 1.15.2 pyh5da7574_0 conda-forge jxrlib 1.1 h35c211d_2 conda-forge kealib 1.5.2 h052fcf7_1 conda-forge kiwisolver 1.4.5 py310h88cfcbd_1 conda-forge kneed 0.8.5 pypi_0 pypi krb5 1.21.2 hb884880_0 conda-forge latexcodec 2.0.1 pyh9f0ad1d_0 conda-forge lazy-object-proxy 1.9.0 py310h6729b98_1 conda-forge lazy_loader 0.3 pyhd8ed1ab_0 conda-forge lcms2 2.15 ha53face_2 conda-forge ld64_osx-64 609 ha20a434_14 conda-forge lerc 4.0.0 hb486fe8_0 conda-forge libabseil 20230802.1 cxx17_h048a20a_0 conda-forge libaec 1.1.1 he965462_0 conda-forge libarchive 3.7.2 h0b5dc4a_0 conda-forge libarrow 13.0.0 heeec12f_5_cpu conda-forge libavif16 1.0.1 h4fa63ff_2 conda-forge libblas 3.9.0 18_osx64_openblas conda-forge libboost-headers 1.82.0 h694c41f_5 conda-forge libbrotlicommon 1.1.0 h0dc2134_1 conda-forge libbrotlidec 1.1.0 h0dc2134_1 conda-forge libbrotlienc 1.1.0 h0dc2134_1 conda-forge libcblas 3.9.0 18_osx64_openblas conda-forge libcdms 3.1.2 h7f27781_128 conda-forge libcf 1.0.3 py310haa577ff_117 conda-forge libclang-cpp16 16.0.6 default_h762fdd7_1 conda-forge libcrc32c 1.1.2 he49afe7_0 conda-forge libcurl 8.3.0 h5f667d7_0 conda-forge libcxx 16.0.6 hd57cbcb_0 conda-forge libdeflate 1.19 ha4e1b8e_0 conda-forge libedit 3.1.20191231 h0678c8f_2 conda-forge libev 4.33 haf1e3a3_1 conda-forge libevent 2.1.12 ha90c15b_1 conda-forge libexpat 2.5.0 hf0c8a7f_1 conda-forge libffi 3.4.2 h0d85af4_5 conda-forge libgd 2.3.3 h91ac1b9_8 conda-forge libgdal 3.7.2 h57f23c7_4 conda-forge libgfortran 5.0.0 13_2_0_h97931a8_1 conda-forge libgfortran-devel_osx-64 12.3.0 h0b6f5ec_1 conda-forge libgfortran5 13.2.0 h2873a65_1 conda-forge libgirepository 1.78.1 h388745a_1 conda-forge libglib 2.78.0 hc62aa5d_0 conda-forge libgoogle-cloud 2.12.0 hc7e40ee_2 conda-forge libgrpc 1.57.0 ha2534ac_1 conda-forge libiconv 1.17 hac89ed1_0 conda-forge libidn2 2.3.4 hb7f2c08_0 conda-forge libjpeg-turbo 2.1.5.1 h0dc2134_1 conda-forge libkml 1.3.0 hab3ca0e_1017 conda-forge liblapack 3.9.0 18_osx64_openblas conda-forge libllvm14 14.0.6 hc8e404f_4 conda-forge libllvm16 16.0.6 he4b1e75_2 conda-forge libnetcdf 4.9.2 mpi_mpich_h7b431e5_12 conda-forge libnghttp2 1.52.0 he2ab024_0 conda-forge libopenblas 0.3.24 openmp_h48a4ad5_0 conda-forge libpnetcdf 1.12.3 mpi_mpich_hb9078ee_101 conda-forge libpng 1.6.39 ha978bb4_0 conda-forge libpq 16.0 h3df487d_1 conda-forge libprotobuf 4.23.4 he0c2237_6 conda-forge librsvg 2.56.3 hec3db73_0 conda-forge librttopo 1.1.0 h23f359d_14 conda-forge libsodium 1.0.18 hbcb3906_1 conda-forge libspatialindex 1.9.3 he49afe7_4 conda-forge libspatialite 5.1.0 h231fb02_0 conda-forge libsqlite 3.43.0 h58db7d2_0 conda-forge libssh2 1.11.0 hd019ec5_0 conda-forge libthrift 0.19.0 h064b379_1 conda-forge libtiff 4.6.0 haeeb97c_1 conda-forge libtool 2.4.7 hf0c8a7f_0 conda-forge libunistring 0.9.10 h0d85af4_0 conda-forge libutf8proc 2.8.0 hb7f2c08_0 conda-forge libuuid 2.38.1 hb7f2c08_0 conda-forge libwebp 1.3.2 h772a4e4_0 conda-forge libwebp-base 1.3.2 h0dc2134_0 conda-forge libxcb 1.15 hb7f2c08_0 conda-forge libxgboost 1.7.6 cpu_h72f100a_2 conda-forge libxml2 2.11.5 h3346baf_1 conda-forge libxslt 1.1.37 h20bfa82_1 conda-forge libzip 1.10.1 hc158999_3 conda-forge libzlib 1.2.13 h8a1eda9_5 conda-forge libzopfli 1.0.3 h046ec9c_0 conda-forge lime 0.2.0.1 pyhd8ed1ab_1 conda-forge linkify-it-py 2.0.0 pyhd8ed1ab_0 conda-forge lipd 0.2.8.8 pypi_0 pypi llvm-openmp 16.0.6 hff08bdf_0 conda-forge llvm-tools 16.0.6 he4b1e75_2 conda-forge llvmlite 0.40.1 py310hd8379ad_0 conda-forge locket 1.0.0 pyhd8ed1ab_0 conda-forge lxml 4.9.3 py310h479f746_1 conda-forge lz4 4.3.2 py310h4c8952d_1 conda-forge lz4-c 1.9.4 hf0c8a7f_0 conda-forge lzo 2.10 haf1e3a3_1000 conda-forge magics 4.14.2 h419c579_1 conda-forge magics-python 1.5.8 pyhd8ed1ab_1 conda-forge make 4.3 h22f3db7_1 conda-forge mapclassify 2.5.0 pyhd8ed1ab_1 conda-forge markdown 3.4.4 pyhd8ed1ab_0 conda-forge markdown-it-py 3.0.0 pyhd8ed1ab_0 conda-forge markupsafe 2.1.3 py310h6729b98_1 conda-forge matplotlib-base 3.8.0 py310hf92ae1b_1 conda-forge matplotlib-inline 0.1.6 pyhd8ed1ab_0 conda-forge mccabe 0.7.0 pyhd8ed1ab_0 conda-forge mdit-py-plugins 0.4.0 pyhd8ed1ab_0 conda-forge mdurl 0.1.0 pyhd8ed1ab_0 conda-forge minizip 4.0.1 h64dbd51_5 conda-forge mistune 3.0.1 pyhd8ed1ab_0 conda-forge mpc 1.3.1 h81bd1dd_0 conda-forge mpfr 4.2.0 h4f9bd69_0 conda-forge mpi 1.0 mpich conda-forge mpich 4.1.2 hd33e60e_100 conda-forge msgpack-python 1.0.6 py310h88cfcbd_0 conda-forge multiprocess 0.70.15 pypi_0 pypi munch 4.0.0 pyhd8ed1ab_0 conda-forge munkres 1.1.4 pyh9f0ad1d_0 conda-forge myproxyclient 2.1.0 pyhd8ed1ab_2 conda-forge natsort 8.4.0 pyhd8ed1ab_0 conda-forge nbclient 0.8.0 pyhd8ed1ab_0 conda-forge nbconvert 7.8.0 pyhd8ed1ab_0 conda-forge nbconvert-core 7.8.0 pyhd8ed1ab_0 conda-forge nbconvert-pandoc 7.8.0 pyhd8ed1ab_0 conda-forge nbformat 5.9.2 pyhd8ed1ab_0 conda-forge nc-time-axis 1.4.1 pyhd8ed1ab_0 conda-forge nceplibs-g2c 1.7.0 h48f9dc5_4 conda-forge ncl 6.6.2 h0c4400e_50 conda-forge nco 5.1.8 h6025318_0 conda-forge ncurses 6.4 hf0c8a7f_0 conda-forge nest-asyncio 1.5.6 pyhd8ed1ab_0 conda-forge netcdf-fortran 4.6.1 mpi_mpich_h4ee704f_2 conda-forge netcdf4 1.6.4 nompi_py310h5076b6f_103 conda-forge networkx 3.1 pyhd8ed1ab_0 conda-forge nibabel 5.1.0 pypi_0 pypi nitime 0.10.1 pypi_0 pypi notebook-shim 0.2.3 pyhd8ed1ab_0 conda-forge nspr 4.35 hea0b92c_0 conda-forge nss 3.94 hd6ac835_0 conda-forge numba 0.57.1 py310he09a53b_0 conda-forge numpy 1.23.5 pypi_0 pypi openblas 0.3.24 openmp_hd7704e8_0 conda-forge openjpeg 2.5.0 ha4da562_3 conda-forge openpyxl 3.1.2 py310h6729b98_1 conda-forge openssl 3.1.3 h8a1eda9_0 conda-forge orc 1.9.0 ha4ae40d_2 conda-forge overrides 7.4.0 pyhd8ed1ab_0 conda-forge packaging 23.2 pyhd8ed1ab_0 conda-forge palettable 3.3.3 pyhd8ed1ab_0 conda-forge pandas 2.1.1 py310h5262a37_1 conda-forge pandoc 3.1.3 h9d075a6_0 conda-forge pandocfilters 1.5.0 pyhd8ed1ab_0 conda-forge panel 1.2.3 pyhd8ed1ab_0 conda-forge pango 1.50.14 h19c1c8a_2 conda-forge parallelio 2.6.2 mpi_mpich_h29132f8_100 conda-forge param 1.13.0 pyh1a96a4e_0 conda-forge parso 0.8.3 pyhd8ed1ab_0 conda-forge partd 1.4.1 pyhd8ed1ab_0 conda-forge pathos 0.3.1 pypi_0 pypi patsy 0.5.3 pyhd8ed1ab_0 conda-forge pcre2 10.40 h1c4e4bc_0 conda-forge pdbpp 0.10.3 pyhd8ed1ab_0 conda-forge peakutils 1.3.4 pyhd8ed1ab_0 conda-forge pep8 1.7.1 py_0 conda-forge pep8-naming 0.13.3 pyhd8ed1ab_0 conda-forge perl 5.32.1 4_h0dc2134_perl5 conda-forge pexpect 4.8.0 pyh1a96a4e_2 conda-forge pickleshare 0.7.5 py_1003 conda-forge pikepdf 5.6.1 py310h7a76584_1 conda-forge pillow 10.0.1 py310h5e9aaff_1 conda-forge pint 0.22 pyhd8ed1ab_1 conda-forge pip 23.2.1 pyhd8ed1ab_0 conda-forge pixman 0.42.2 he965462_0 conda-forge pkg-config 0.29.2 ha3d46e9_1008 conda-forge pkgutil-resolve-name 1.3.10 pyhd8ed1ab_1 conda-forge platformdirs 3.11.0 pyhd8ed1ab_0 conda-forge plotly 5.17.0 pyhd8ed1ab_0 conda-forge pluggy 1.3.0 pyhd8ed1ab_0 conda-forge ply 3.11 pypi_0 pypi pooch 1.7.0 pyhd8ed1ab_4 conda-forge poppler 23.08.0 h122f3cb_2 conda-forge poppler-data 0.4.12 hd8ed1ab_0 conda-forge postgresql 16.0 hc940a54_1 conda-forge pox 0.3.3 pypi_0 pypi ppft 1.7.6.7 pypi_0 pypi proj 9.3.0 h7d51f5a_1 conda-forge prometheus_client 0.17.1 pyhd8ed1ab_0 conda-forge prompt-toolkit 3.0.39 pyha770c72_0 conda-forge prompt_toolkit 3.0.39 hd8ed1ab_0 conda-forge prov 2.0.0 pyhd3deb0d_0 conda-forge psutil 5.9.5 py310h6729b98_1 conda-forge pthread-stubs 0.4 hc929b4f_1001 conda-forge ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge pure_eval 0.2.2 pyhd8ed1ab_0 conda-forge py-xgboost 1.7.6 cpu_py310h84be057_2 conda-forge pyarrow 13.0.0 py310h038dea3_5_cpu conda-forge pybind11 2.11.1 py310h88cfcbd_2 conda-forge pybind11-global 2.11.1 py310h88cfcbd_2 conda-forge pybtex 0.24.0 pyhd8ed1ab_2 conda-forge pycairo 1.25.0 py310h0b97775_1 conda-forge pycodestyle 2.11.0 pyhd8ed1ab_0 conda-forge pycountry 22.3.5 pyhd8ed1ab_0 conda-forge pycparser 2.21 pyhd8ed1ab_0 conda-forge pyct 0.4.6 py_0 conda-forge pyct-core 0.4.6 py_0 conda-forge pydocstyle 6.3.0 pyhd8ed1ab_0 conda-forge pydot 1.4.2 py310h2ec42d9_4 conda-forge pyflakes 3.1.0 pyhd8ed1ab_0 conda-forge pygments 2.16.1 pyhd8ed1ab_0 conda-forge pygobject 3.46.0 py310hae22443_1 conda-forge pyhht 0.1.0 pypi_0 pypi pyleoclim 0.13.0 pypi_0 pypi pyobjc-core 10.0 py310hef2d279_0 conda-forge pyobjc-framework-cocoa 10.0 py310hef2d279_1 conda-forge pyopenssl 23.2.0 pyhd8ed1ab_1 conda-forge pyparsing 3.1.1 pyhd8ed1ab_0 conda-forge pyproj 3.6.1 py310h3455fa7_2 conda-forge pyreadr 0.4.9 py310hfbd5ada_1 conda-forge pyrepl 0.9.0 py310h6729b98_8 conda-forge pyshp 2.3.1 pyhd8ed1ab_0 conda-forge pysocks 1.7.1 pyha2e5f31_6 conda-forge pytest 7.4.2 pyhd8ed1ab_0 conda-forge python 3.10.12 had23ca6_0_cpython conda-forge python-cdo 1.6.0 pyhd8ed1ab_0 conda-forge python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge python-fastjsonschema 2.18.1 pyhd8ed1ab_0 conda-forge python-json-logger 2.0.7 pyhd8ed1ab_0 conda-forge python-stratify 0.3.0 py310hf0b6da5_1 conda-forge python-tzdata 2023.3 pyhd8ed1ab_0 conda-forge python-xxhash 3.3.0 py310h6729b98_1 conda-forge python.app 1.4 py310h6729b98_3 conda-forge python_abi 3.10 4_cp310 conda-forge pytz 2023.3.post1 pyhd8ed1ab_0 conda-forge pyviz_comms 3.0.0 pyhd8ed1ab_0 conda-forge pywavelets 1.4.1 py310hf0b6da5_1 conda-forge pyyaml 6.0.1 py310h6729b98_1 conda-forge pyzmq 25.1.1 py310h998be00_1 conda-forge qpdf 10.6.3 h9804679_1 conda-forge r-abind 1.4_5 r43hc72bb7e_1005 conda-forge r-akima 0.6_3.4 r43hfe07776_2 conda-forge r-backports 1.4.1 r43h6dc245f_2 conda-forge r-base 4.3.1 h61172b1_5 conda-forge r-bigmemory 4.6.1 r43hac7d2d5_2 conda-forge r-bigmemory.sri 0.1.6 r43hc72bb7e_1 conda-forge r-callr 3.7.3 r43hc72bb7e_1 conda-forge r-checkmate 2.2.0 r43h6dc245f_1 conda-forge r-class 7.3_22 r43h6dc245f_1 conda-forge r-classint 0.4_10 r43hfe07776_0 conda-forge r-cli 3.6.1 r43hac7d2d5_1 conda-forge r-climdex.pcic 1.1_11 r43hac7d2d5_2 conda-forge r-climprojdiags 0.3.2 r43hc72bb7e_1 conda-forge r-codetools 0.2_19 r43hc72bb7e_1 conda-forge r-colorspace 2.1_0 r43h6dc245f_1 conda-forge r-contfrac 1.1_12 r43h6dc245f_1004 conda-forge r-cpp11 0.4.6 r43hc72bb7e_0 conda-forge r-crayon 1.5.2 r43hc72bb7e_2 conda-forge r-cyclocomp 1.1.1 r43hc72bb7e_0 conda-forge r-dbi 1.1.3 r43hc72bb7e_2 conda-forge r-desc 1.4.2 r43hc72bb7e_2 conda-forge r-desolve 1.38 r43hcebeb90_0 conda-forge r-digest 0.6.33 r43hac7d2d5_0 conda-forge r-docopt 0.7.1 r43hc72bb7e_3 conda-forge r-doparallel 1.0.17 r43hc72bb7e_2 conda-forge r-dotcall64 1.0_2 r43hfe07776_2 conda-forge r-e1071 1.7_13 r43hac7d2d5_1 conda-forge r-ellipsis 0.3.2 r43h6dc245f_2 conda-forge r-elliptic 1.4_0 r43hc72bb7e_4 conda-forge r-evaluate 0.22 r43hc72bb7e_0 conda-forge r-fansi 1.0.4 r43h6dc245f_1 conda-forge r-farver 2.1.1 r43hac7d2d5_2 conda-forge r-fields 15.2 r43hfe07776_0 conda-forge r-foreach 1.5.2 r43hc72bb7e_2 conda-forge r-functional 0.6 r43ha770c72_1004 conda-forge r-generics 0.1.3 r43hc72bb7e_2 conda-forge r-geomap 2.5_5 r43h6dc245f_0 conda-forge r-geomapdata 2.0_2 r43hc72bb7e_0 conda-forge r-ggplot2 3.4.3 r43hc72bb7e_0 conda-forge r-glue 1.6.2 r43h6dc245f_2 conda-forge r-goftest 1.2_3 r43h6dc245f_2 conda-forge r-gridextra 2.3 r43hc72bb7e_1005 conda-forge r-gtable 0.3.4 r43hc72bb7e_0 conda-forge r-highr 0.10 r43hc72bb7e_1 conda-forge r-hypergeo 1.2_13 r43hc72bb7e_1004 conda-forge r-isoband 0.2.7 r43hac7d2d5_2 conda-forge r-iterators 1.0.14 r43hc72bb7e_2 conda-forge r-jsonlite 1.8.7 r43h6dc245f_0 conda-forge r-kernsmooth 2.23_22 r43h06293e5_0 conda-forge r-knitr 1.44 r43hc72bb7e_0 conda-forge r-labeling 0.4.3 r43hc72bb7e_0 conda-forge r-lattice 0.21_9 r43h6dc245f_0 conda-forge r-lazyeval 0.2.2 r43h6dc245f_4 conda-forge r-lifecycle 1.0.3 r43hc72bb7e_2 conda-forge r-lintr 3.1.0 r43hc72bb7e_0 conda-forge r-lmom 3.0 r43hfe07776_0 conda-forge r-lmomco 2.4.11 r43hc72bb7e_0 conda-forge r-lmoments 1.3_1 r43hb3f7bb8_5 conda-forge r-logging 0.10_108 r43ha770c72_4 conda-forge r-lubridate 1.9.3 r43h6dc245f_0 conda-forge r-magrittr 2.0.3 r43h6dc245f_2 conda-forge r-mapproj 1.2.11 r43h6dc245f_1 conda-forge r-maps 3.4.1 r43h6dc245f_2 conda-forge r-mass 7.3_60 r43h6dc245f_1 conda-forge r-matrix 1.6_1.1 r43hc46c21c_0 conda-forge r-mba 0.1_0 r43hac7d2d5_1 conda-forge r-mgcv 1.9_0 r43h9c380c6_0 conda-forge r-multiapply 2.1.4 r43hc72bb7e_1 conda-forge r-munsell 0.5.0 r43hc72bb7e_1006 conda-forge r-nbclust 3.0.1 r43hc72bb7e_2 conda-forge r-ncdf4 1.21 r43h6c36c2e_6 conda-forge r-ncdf4.helpers 0.3_6 r43hc72bb7e_2 conda-forge r-nlme 3.1_163 r43hfe07776_0 conda-forge r-pcict 0.5_4.4 r43h6dc245f_1 conda-forge r-pillar 1.9.0 r43hc72bb7e_1 conda-forge r-pkgconfig 2.0.3 r43hc72bb7e_3 conda-forge r-plyr 1.8.9 r43hac7d2d5_0 conda-forge r-processx 3.8.2 r43h6dc245f_0 conda-forge r-proxy 0.4_27 r43h6dc245f_2 conda-forge r-ps 1.7.5 r43h6dc245f_1 conda-forge r-purrr 1.0.2 r43h6dc245f_0 conda-forge r-r.cache 0.16.0 r43hc72bb7e_2 conda-forge r-r.methodss3 1.8.2 r43hc72bb7e_2 conda-forge r-r.oo 1.25.0 r43hc72bb7e_2 conda-forge r-r.utils 2.12.2 r43hc72bb7e_1 conda-forge r-r6 2.5.1 r43hc72bb7e_2 conda-forge r-rcolorbrewer 1.1_3 r43h785f33e_2 conda-forge r-rcpp 1.0.11 r43hac7d2d5_0 conda-forge r-rcpparmadillo 0.12.6.4.0 r43he9b8800_0 conda-forge r-rematch2 2.1.2 r43hc72bb7e_3 conda-forge r-remotes 2.4.2.1 r43hc72bb7e_0 conda-forge r-reshape 0.8.9 r43hbe3e9c8_2 conda-forge r-rex 1.2.1 r43hc72bb7e_2 conda-forge r-rlang 1.1.1 r43hac7d2d5_1 conda-forge r-rpmg 2.2_7 r43hc72bb7e_0 conda-forge r-rprojroot 2.0.3 r43hc72bb7e_0 conda-forge r-s2 1.1.4 r43hc0060d5_1 conda-forge r-s2dverification 2.10.3 r43hc72bb7e_2 conda-forge r-scales 1.2.1 r43hc72bb7e_2 conda-forge r-sf 1.0_14 r43haae5d93_1 conda-forge r-snow 0.4_4 r43hc72bb7e_2 conda-forge r-sp 2.1_0 r43h6dc245f_0 conda-forge r-spam 2.9_1 r43hcebeb90_2 conda-forge r-specsverification 0.5_3 r43hac7d2d5_3 conda-forge r-spei 1.8.1 r43hc72bb7e_1 conda-forge r-styler 1.10.2 r43hc72bb7e_0 conda-forge r-tibble 3.2.1 r43h6dc245f_2 conda-forge r-timechange 0.2.0 r43hac7d2d5_1 conda-forge r-tlmoments 0.7.5.3 r43hac7d2d5_1 conda-forge r-udunits2 0.13.2.1 r43h6dc245f_2 conda-forge r-units 0.8_4 r43hac7d2d5_0 conda-forge r-utf8 1.2.3 r43h6dc245f_1 conda-forge r-uuid 1.1_1 r43h6dc245f_0 conda-forge r-vctrs 0.6.3 r43hac7d2d5_0 conda-forge r-viridis 0.6.4 r43hc72bb7e_0 conda-forge r-viridislite 0.4.2 r43hc72bb7e_1 conda-forge r-withr 2.5.1 r43hc72bb7e_0 conda-forge r-wk 0.8.0 r43hac7d2d5_0 conda-forge r-xfun 0.40 r43hac7d2d5_0 conda-forge r-xml2 1.3.5 r43h2e0d1c5_0 conda-forge r-xmlparsedata 1.0.5 r43hc72bb7e_2 conda-forge r-yaml 2.3.7 r43h6dc245f_1 conda-forge r-zoo 1.8_12 r43h6dc245f_1 conda-forge rasterio 1.3.8 py310h8e9ad67_3 conda-forge rav1e 0.6.6 h7205ca4_2 conda-forge rdflib 7.0.0 pyhd8ed1ab_0 conda-forge re2 2023.03.02 h096449b_0 conda-forge readline 8.2 h9e318b2_1 conda-forge referencing 0.30.2 pyhd8ed1ab_0 conda-forge regionmask 0.11.0 pyhd8ed1ab_0 conda-forge requests 2.31.0 pyhd8ed1ab_0 conda-forge requests-cache 1.1.0 pyhd8ed1ab_0 conda-forge rfc3339-validator 0.1.4 pyhd8ed1ab_0 conda-forge rfc3986-validator 0.1.1 pyh9f0ad1d_0 conda-forge rpds-py 0.10.3 py310h3461e44_1 conda-forge rpy2 3.5.11 py310r43hc1335a1_2 conda-forge rtree 1.0.1 py310had9ce37_3 conda-forge ruamel.yaml 0.17.35 py310h6729b98_0 conda-forge ruamel.yaml.clib 0.2.7 py310h6729b98_2 conda-forge scikit-image 0.21.0 py310h9e9d8ca_0 conda-forge scikit-learn 1.3.1 py310h9d3367e_0 conda-forge scipy 1.11.3 py310h2db466d_0 conda-forge seaborn 0.13.0 hd8ed1ab_0 conda-forge seaborn-base 0.13.0 pyhd8ed1ab_0 conda-forge seawater 3.3.4 py_1 conda-forge send2trash 1.8.2 pyhd1c38e8_0 conda-forge setuptools 68.2.2 pyhd8ed1ab_0 conda-forge shapely 2.0.1 py310h29d0617_3 conda-forge sigtool 0.1.3 h88f4db0_0 conda-forge simplegeneric 0.8.1 py_1 conda-forge simplejson 3.19.1 py310h6729b98_1 conda-forge sip 6.7.11 pypi_0 pypi six 1.16.0 pyh6c4a22f_0 conda-forge snappy 1.1.10 h225ccf5_0 conda-forge sniffio 1.3.0 pyhd8ed1ab_0 conda-forge snowballstemmer 2.2.0 pyhd8ed1ab_0 conda-forge snuggs 1.4.7 py_0 conda-forge sortedcontainers 2.4.0 pyhd8ed1ab_0 conda-forge soupsieve 2.5 pyhd8ed1ab_1 conda-forge sparse 0.14.0 pyhd8ed1ab_0 conda-forge spectral 0.23.1 pypi_0 pypi sqlite 3.43.0 h2b0dec6_0 conda-forge stack_data 0.6.2 pyhd8ed1ab_0 conda-forge statsmodels 0.14.0 py310hc1335a1_1 conda-forge suntime 1.2.5 pypi_0 pypi svt-av1 1.7.0 he965462_0 conda-forge tabulate 0.9.0 pypi_0 pypi tapi 1100.0.11 h9ce4665_0 conda-forge tblib 2.0.0 pyhd8ed1ab_0 conda-forge tempest-remap 2.2.0 h8893032_2 conda-forge tenacity 8.2.3 pyhd8ed1ab_0 conda-forge termcolor 2.3.0 pyhd8ed1ab_0 conda-forge terminado 0.17.1 pyhd1c38e8_0 conda-forge tftb 0.1.4 pypi_0 pypi threadpoolctl 3.2.0 pyha21a80b_0 conda-forge tifffile 2023.9.26 pyhd8ed1ab_0 conda-forge tiledb 2.16.3 hd3a41d5_3 conda-forge timeseries 0.5.0 pypi_0 pypi tinycss2 1.2.1 pyhd8ed1ab_0 conda-forge tk 8.6.13 hef22860_0 conda-forge tktable 2.10 ha166976_5 conda-forge toml 0.10.2 pyhd8ed1ab_0 conda-forge tomli 2.0.1 pyhd8ed1ab_0 conda-forge tomlkit 0.12.1 pyha770c72_0 conda-forge toolz 0.12.0 pyhd8ed1ab_0 conda-forge tornado 6.3.3 py310h6729b98_1 conda-forge tqdm 4.66.1 pyhd8ed1ab_0 conda-forge traitlets 5.11.2 pyhd8ed1ab_0 conda-forge types-python-dateutil 2.8.19.14 pyhd8ed1ab_0 conda-forge typing-extensions 4.8.0 hd8ed1ab_0 conda-forge typing_extensions 4.8.0 pyha770c72_0 conda-forge typing_utils 0.1.0 pyhd8ed1ab_0 conda-forge tzcode 2023c hb7f2c08_0 conda-forge tzdata 2023c h71feb2d_0 conda-forge tzlocal 5.0.1 py310h2ec42d9_1 conda-forge uc-micro-py 1.0.1 pyhd8ed1ab_0 conda-forge udunits2 2.2.28 h516ac8c_2 conda-forge ujson 5.8.0 py310h9e9d8ca_0 conda-forge unicodedata2 15.1.0 py310h6729b98_0 conda-forge unidecode 1.3.7 pypi_0 pypi uri-template 1.3.0 pyhd8ed1ab_0 conda-forge uriparser 0.9.7 hf0c8a7f_1 conda-forge url-normalize 1.4.3 pyhd8ed1ab_0 conda-forge urllib3 2.0.5 pyhd8ed1ab_0 conda-forge wcwidth 0.2.8 pyhd8ed1ab_0 conda-forge webcolors 1.13 pyhd8ed1ab_0 conda-forge webencodings 0.5.1 pyhd8ed1ab_2 conda-forge webob 1.8.7 pyhd8ed1ab_0 conda-forge websocket-client 1.6.3 pyhd8ed1ab_0 conda-forge wget 3.2 pypi_0 pypi wheel 0.41.2 pyhd8ed1ab_0 conda-forge widgetsnbextension 4.0.9 pyhd8ed1ab_0 conda-forge wmctrl 0.5 pyhd8ed1ab_0 conda-forge xarray 2023.9.0 pyhd8ed1ab_0 conda-forge xcdat 0.5.0 pyhd8ed1ab_2 conda-forge xerces-c 3.2.4 h6314983_3 conda-forge xesmf 0.8.2 pyhd8ed1ab_0 conda-forge xgboost 1.7.6 cpu_py310h84be057_2 conda-forge xgcm 0.8.1 pyhd8ed1ab_0 conda-forge xlrd 2.0.1 pyhd8ed1ab_3 conda-forge xlsxwriter 3.1.6 pyhd8ed1ab_0 conda-forge xorg-kbproto 1.0.7 h35c211d_1002 conda-forge xorg-libice 1.1.1 h0dc2134_0 conda-forge xorg-libsm 1.2.4 h0dc2134_0 conda-forge xorg-libx11 1.8.6 hbd0b022_0 conda-forge xorg-libxau 1.0.11 h0dc2134_0 conda-forge xorg-libxdmcp 1.1.3 h35c211d_0 conda-forge xorg-libxext 1.3.4 hb7f2c08_2 conda-forge xorg-libxrender 0.9.11 h0dc2134_0 conda-forge xorg-libxt 1.3.0 h0dc2134_1 conda-forge xorg-renderproto 0.11.1 h0d85af4_1002 conda-forge xorg-xextproto 7.3.0 hb7f2c08_1003 conda-forge xorg-xproto 7.0.31 h35c211d_1007 conda-forge xxhash 0.8.2 h4140336_0 conda-forge xyzservices 2023.7.0 pyhd8ed1ab_0 conda-forge xz 5.2.6 h775f41a_0 conda-forge yamale 4.0.4 pyh6c4a22f_0 conda-forge yaml 0.2.5 h0d85af4_2 conda-forge zeromq 4.3.4 he49afe7_1 conda-forge zfp 1.0.0 hf3d7188_4 conda-forge zict 3.0.0 pyhd8ed1ab_0 conda-forge zipp 3.17.0 pyhd8ed1ab_0 conda-forge zlib 1.2.13 h8a1eda9_5 conda-forge zlib-ng 2.0.7 hb7f2c08_0 conda-forge zstd 1.5.5 h829000d_0 conda-forge ``` ### pip list
oliviermarti commented 11 months ago

I've made some tests by degrading/upgrading some python modules : the problem clearly appears between cartopy 0.21.1 and 0.22. Recent versions of geos and shapely packages are OK.

greglucas commented 11 months ago

I think we may be getting an invalid line somewhere in this new fast-path check. I suppose the easy thing is to ignore these geometries. But, I can't come up with a simple test case that fails, something like this. Do you have a simpler reproducer?

x = np.array([0, 1, 2, np.nan, 4, 5, 6])
y = np.array([0, 1, 2, np.nan, 4, 5, 6])

ax.plot(x, y, transform=cartopy.crs.PlateCarree())

Here is what I think would solve the issue:

diff --git a/lib/cartopy/trace.pyx b/lib/cartopy/trace.pyx
index d4550b47..a47000dc 100644
--- a/lib/cartopy/trace.pyx
+++ b/lib/cartopy/trace.pyx
@@ -582,6 +582,9 @@ def project_linear(geometry not None, src_crs not None,
     cdef bool geom_fully_inside = False
     if isinstance(dest_projection, (ccrs._RectangularProjection, ccrs._WarpedRectangularProjection)):
         dest_line = sgeom.LineString([(x[0], x[1]) for x in dest_coords])
+        if dest_line.is_valid:
+            # We can only check for covers with valid geometries
+            geom_fully_inside = gp_domain.covers(dest_line)
         geom_fully_inside = gp_domain.covers(dest_line)

     lines = LineAccumulator()
oliviermarti commented 11 months ago

The simplest I can write :

import numpy as np
import matplotlib.pyplot as plt
import cartopy.crs as ccrs

x = np.array ( [10, 20, 30, np.nan, 50, 60, 70] )
y = np.array ( [10, 20, 30, np.nan, 50, 60, 70] )

fix, ax = plt.subplots ( 1, 1, subplot_kw={'projection':ccrs.Robinson()} )

ax.plot (x, y, transform=ccrs.PlateCarree () )`

Note that only a few projections encounter the problem : Robinson, Mollweide. It seems to be limited to some projections with a global covers. Orthographic, and more generally projections that shows only out part of the globe are OK.

greglucas commented 11 months ago

Thanks! The linked PR does have a minimal reproducer similar to yours now. https://github.com/SciTools/cartopy/pull/2262