Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in
UW-Glance
UW-Glance
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 27
    • Issues 27
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 1
    • Merge Requests 1
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Eva Schiffer
  • UW-GlanceUW-Glance
  • Issues
  • #40

Closed
Open
Opened Aug 27, 2019 by Alan De Smet@adesmet
  • Report abuse
  • New issue
Report abuse New issue

Geoplotting large HDF data with cartopy causes crash

(This is part of #23 (closed) Use cartopy instead of basemap._

Eva has some test data that causes glance to crash when trying to geoplot some data. I've been able to reproduce it.

TEST DATA: 40-crash.nc

I'm using these libraries at the moment, all from Anaconda:

# packages in environment at /home/adesmet/src/glance/anaconda:
#
# Name                    Version                   Build  Channel
hdf4                      4.2.13               h3ca952b_2  
hdf5                      1.10.4               hb1b8bf9_0  
libnetcdf                 4.6.1                h11d0813_2  
netcdf4                   1.4.2            py27h808af73_0  
numpy                     1.16.4           py27h7e9f1db_0  
numpy-base                1.16.4           py27hde5b4d6_0  
pyhdf                     0.10.1           py27h3a4e923_1  conda-forge
python                    2.7.16               h9bab390_0  

I'm working with UW-Glance ad359acf, which is the current head of tocartopy.

The failure:

$ glance inspectreport 40-crash.nc --outputpath=out --longitude pixel_longitude --latitude pixel_latitude ^baseline_cmask_seviri_cloud_mask$
ERROR:glance.plotcreatefns:Someone has instantiated PlottingFunctionFactory. This class is NOT meant to be instantiated.
ERROR:glance.plotcreatefns:Someone has instantiated PlottingFunctionFactory. This class is NOT meant to be instantiated.
lat type: <type 'numpy.ndarray'>
lon type: <type 'numpy.ndarray'>
ERROR:shapely.geos:TopologyException: side location conflict at -109 50
Traceback (most recent call last):
  File "/home/adesmet/src/glance/anaconda/bin/glance", line 11, in <module>
    load_entry_point('uwglance', 'console_scripts', 'glance')()
  File "/home/adesmet/src/glance/pyglance/glance/compare.py", line 1613, in main
    rc = lower_locals[args[0].lower()](*args[1:])
  File "/home/adesmet/src/glance/pyglance/glance/compare.py", line 1479, in inspectReport
    return inspect_library_call(clean_path(args[0]), args[1:], tempOptions)
  File "/home/adesmet/src/glance/pyglance/glance/compare.py", line 601, in inspect_library_call
    histRange=varRunInfo[HISTOGRAM_RANGE_KEY] if HISTOGRAM_RANGE_KEY in varRunInfo else None)
  File "/home/adesmet/src/glance/pyglance/glance/plot.py", line 333, in plot_and_save_comparison_figures
    makeSmall, doFork, shouldClearMemoryWithThreads, fullDPI=fullDPI, thumbDPI=thumbDPI)
  File "/home/adesmet/src/glance/pyglance/glance/plot.py", line 98, in _log_spawn_and_wait_if_needed
    fullDPI=fullDPI, thumbDPI=thumbDPI)
  File "/home/adesmet/src/glance/pyglance/glance/plot.py", line 55, in _handle_fig_creation_task
    figure_obj = child_figure_function()
  File "/home/adesmet/src/glance/pyglance/glance/plotcreatefns.py", line 1455, in <lambda>
    units=units_a)),
  File "/home/adesmet/src/glance/pyglance/glance/figures.py", line 613, in create_mapped_figure
    img_temp = maps.contourf_on_map(longitudeClean, latitudeClean, data, axes_obj, in_projection, **kwargs)
  File "/home/adesmet/src/glance/pyglance/glance/graphics.py", line 263, in contourf_on_map
    img_temp = axes_object.contourf(lon, lat, data, levelsToUse, transform=in_projection, **kwargs)
  File "/home/adesmet/src/glance/anaconda/lib/python2.7/site-packages/cartopy/mpl/geoaxes.py", line 1397, in contourf
    if col.get_paths()])
  File "/home/adesmet/src/glance/anaconda/lib/python2.7/site-packages/matplotlib/collections.py", line 196, in get_datalim
    paths = [transform.transform_path_non_affine(p) for p in paths]
  File "/home/adesmet/src/glance/anaconda/lib/python2.7/site-packages/matplotlib/transforms.py", line 2492, in transform_path_non_affine
    return self._a.transform_path_non_affine(path)
  File "/home/adesmet/src/glance/anaconda/lib/python2.7/site-packages/cartopy/mpl/geoaxes.py", line 189, in transform_path_non_affine
    getattr(self, 'force_path_ccw', False))
  File "/home/adesmet/src/glance/anaconda/lib/python2.7/site-packages/cartopy/mpl/patch.py", line 212, in path_to_geos
    collection[-1][0].contains(geom.exterior)):
  File "/home/adesmet/src/glance/anaconda/lib/python2.7/site-packages/shapely/geometry/base.py", line 691, in contains
    return bool(self.impl['contains'](self, other))
  File "/home/adesmet/src/glance/anaconda/lib/python2.7/site-packages/shapely/predicates.py", line 18, in __call__
    self._check_topology(err, this, other)
  File "/home/adesmet/src/glance/anaconda/lib/python2.7/site-packages/shapely/topology.py", line 38, in _check_topology
    self.fn.__name__, repr(geom)))
shapely.errors.TopologicalError: The operation 'GEOSContains_r' could not be performed. Likely cause is invalidity of the geometry <shapely.geometry.polygon.Polygon object at 0x7fbf8927a790>

Trying to plot interactively with glance gui generated similar output.

Edited Aug 27, 2019 by Alan De Smet
To upload designs, you'll need to enable LFS. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: evas/UW-Glance#40