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

iso plot failure #73

Open
chaosphere2112 opened this issue Nov 23, 2016 · 6 comments
Open

iso plot failure #73

chaosphere2112 opened this issue Nov 23, 2016 · 6 comments
Assignees
Labels
enhancement high Highest priority issue
Milestone

Comments

@chaosphere2112
Copy link
Contributor

@doutriaux1 as discussed:

inPath = '/work/durack1/Shared/model_data/140220_AusCOM1-0/'
inFile = 'AusCOM1-0.Salt.Omon.so.00011231-00501231.nc'
>>> f_h = cdm.open(os.path.join(inPath,inFile))
>>> so = f_h('so')
f_h.close()
>>> so = so[0:1,]
>>> import vcs
>>> x = vcs.init()
>>> so.shape
(1, 50, 300, 360)
>>> iso = x.createisofill()
>>> x.plot(so[0,],iso)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/uvcdat/2.4.0rc1/lib/python2.7/site-packages/vcs/Canvas.py", line 2524, in plot
    a = self.__plot(arglist, keyargs)
  File "/usr/local/uvcdat/2.4.0rc1/lib/python2.7/site-packages/vcs/Canvas.py", line 2717, in __plot
    "with a method that is not meshfill")
RuntimeError: You are attempting to plot unstructured gridwith a method that is not meshfill
>>> x.plot(so[0,].filled(),iso)
ERROR: In /export/doutriaux1/build/build/VTK/Filters/Modeling/vtkBandedPolyDataContourFilter.cxx, line 240
vtkBandedPolyDataContourFilter (0x29f0dc0): No input data!
ERROR: In /export/doutriaux1/build/build/VTK/Filters/Modeling/vtkBandedPolyDataContourFilter.cxx, line 240
vtkBandedPolyDataContourFilter (0x2992ed0): No input data!
<vcs.displayplot.Dp object at 0x7ff47f2d7250>
>>> x.plot(np.ma.masked_greater(so[0,].filled(),1.e15),iso)
ERROR: In /export/doutriaux1/build/build/VTK/Filters/Modeling/vtkBandedPolyDataContourFilter.cxx, line 240
vtkBandedPolyDataContourFilter (0x55c8c30): No input data!
<vcs.displayplot.Dp object at 0x7ff47f2d7750>
>>> x.clear()
>>> x.plot(MV.masked_greater(so[0,].filled(),1.e15),iso)
ERROR: In /export/doutriaux1/build/build/VTK/Filters/Modeling/vtkBandedPolyDataContourFilter.cxx, line 240
vtkBandedPolyDataContourFilter (0x40a4ba0): No input data!
<vcs.displayplot.Dp object at 0x7ff47f167250>
>>> b = np.ma.masked_less(so[0,],0)
>>> b.count()
2665221
>>> x.plot(b)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/uvcdat/2.4.0rc1/lib/python2.7/site-packages/vcs/Canvas.py", line 2524, in plot
    a = self.__plot(arglist, keyargs)
  File "/usr/local/uvcdat/2.4.0rc1/lib/python2.7/site-packages/vcs/Canvas.py", line 3628, in __plot
    arglist[0] = self._reconstruct_tv(arglist, keyargs)
  File "/usr/local/uvcdat/2.4.0rc1/lib/python2.7/site-packages/vcs/Canvas.py", line 757, in _reconstruct_tv
    mesh = grid.getMesh()
AttributeError: 'NoneType' object has no attribute 'getMesh'
>>> b = np.ma.masked_less(so[0].filled(),0)
>>> x.plot(b)
<vcs.displayplot.Dp object at 0x7ff47f167750>
>>> x.plot(np.ma.masked_less(so[0].filled(),0))
<vcs.displayplot.Dp object at 0x7ff47f167c50>
>>> x.plot(MV.masked_greater(so[0].filled(),1.e15),iso)
ERROR: In /export/doutriaux1/build/build/VTK/Filters/Modeling/vtkBandedPolyDataContourFilter.cxx, line 240
vtkBandedPolyDataContourFilter (0x128a90f0): No input data!
<vcs.displayplot.Dp object at 0x7ff47f176250>
>>> x.plot(np.ma.masked_greater(so[0].filled(),0),iso)
ERROR: In /export/doutriaux1/build/build/VTK/Filters/Modeling/vtkBandedPolyDataContourFilter.cxx, line 240
vtkBandedPolyDataContourFilter (0x11a44f50): No input data!
/usr/local/uvcdat/2.4.0rc1/lib/python2.7/site-packages/numpy/ma/core.py:3855: UserWarning: Warning: converting a masked element to nan.
  warnings.warn("Warning: converting a masked element to nan.")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/uvcdat/2.4.0rc1/lib/python2.7/site-packages/vcs/Canvas.py", line 2524, in plot
    a = self.__plot(arglist, keyargs)
  File "/usr/local/uvcdat/2.4.0rc1/lib/python2.7/site-packages/vcs/Canvas.py", line 3839, in __plot
    returned_kargs = self.backend.plot(*arglist, **keyargs)
  File "/usr/local/uvcdat/2.4.0rc1/lib/python2.7/site-packages/vcs/VTKPlots.py", line 488, in plot
    vtk_backend_grid, vtk_backend_geo))
  File "/usr/local/uvcdat/2.4.0rc1/lib/python2.7/site-packages/vcs/vcsvtk/pipeline2d.py", line 153, in plot
    self._plotInternal()
  File "/usr/local/uvcdat/2.4.0rc1/lib/python2.7/site-packages/vcs/vcsvtk/isofillpipeline.py", line 322, in _plotInternal
    opacity=opacities))
  File "/usr/local/uvcdat/2.4.0rc1/lib/python2.7/site-packages/vcs/VTKPlots.py", line 795, in renderColorBar
    opacity=opacity)
  File "/usr/local/uvcdat/2.4.0rc1/lib/python2.7/site-packages/vcs/template.py", line 1859, in drawColorBar
    if levels[0] < levels[1]:
IndexError: list index out of range
>>> x.plot(np.ma.masked_less(so[0].filled(),0),iso)
ERROR: In /export/doutriaux1/build/build/VTK/Filters/Modeling/vtkBandedPolyDataContourFilter.cxx, line 240
vtkBandedPolyDataContourFilter (0x11cb50b0): No input data!
ERROR: In /export/doutriaux1/build/build/VTK/Filters/Modeling/vtkBandedPolyDataContourFilter.cxx, line 240
vtkBandedPolyDataContourFilter (0x11cbef70): No input data!
<vcs.displayplot.Dp object at 0x7ff47f176b50>
>>> x.clear()
>>> x.plot(np.ma.masked_less(so[0].filled(),0),iso)
ERROR: In /export/doutriaux1/build/build/VTK/Filters/Modeling/vtkBandedPolyDataContourFilter.cxx, line 240
vtkBandedPolyDataContourFilter (0x323b8d0): No input data!
ERROR: In /export/doutriaux1/build/build/VTK/Filters/Modeling/vtkBandedPolyDataContourFilter.cxx, line 240
vtkBandedPolyDataContourFilter (0x303f0a0): No input data!
<vcs.displayplot.Dp object at 0x7ff47f176150>
>>> x.plot(np.ma.masked_less(so[0].filled(),0))
<vcs.displayplot.Dp object at 0x7ff47f176650>
>>> x.plot(np.ma.masked_less(so[0].filled(),0))
<vcs.displayplot.Dp object at 0x7ff47f176c50>
>>> x.plot(b)
<vcs.displayplot.Dp object at 0x7ff47f1f1250>
>>> x.plot(b,iso)
ERROR: In /export/doutriaux1/build/build/VTK/Filters/Modeling/vtkBandedPolyDataContourFilter.cxx, line 240
vtkBandedPolyDataContourFilter (0xb0207c0): No input data!
ERROR: In /export/doutriaux1/build/build/VTK/Filters/Modeling/vtkBandedPolyDataContourFilter.cxx, line 240
vtkBandedPolyDataContourFilter (0xb02aba0): No input data!
<vcs.displayplot.Dp object at 0x7ff47f1f1750>

Migrated from: CDAT/cdat#1594

@durack1
Copy link
Member

durack1 commented Jan 23, 2017

@danlipsa @doutriaux1 this is still an issue in 2.8:

(uvcdat280nox) duro@ocean:[~]:[3227]> ipython
Python 2.7.12 | packaged by conda-forge | (default, Sep  8 2016, 14:22:31) 
Type "copyright", "credits" or "license" for more information.
IPython 5.1.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.
In [1]: inPath = '/work/duro/Shared/model_data/140220_AusCOM1-0/'
In [2]: inFile = 'AusCOM1-0.Salt.Omon.so.00011231-00501231.nc'
In [3]: import os, vcs
In [4]: import cdms2 as cdm
In [5]: f_h = cdm.open(os.path.join(inPath,inFile))
In [6]: so = f_h('so')
In [8]: so.shape
Out[8]: (50, 50, 300, 360)
In [9]: so1 = so[0:1,]
In [10]: so1.shape
Out[10]: (1, 50, 300, 360)
In [12]: x = vcs.init()
In [13]: iso = x.createisofill()
In [14]: x.plot(so1,iso)
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-14-36400289d49d> in <module>()
----> 1 x.plot(so1,iso)

/export/duro/anaconda2/envs/uvcdat280nox/lib/python2.7/site-packages/vcs/Canvas.pyc in plot(self, *actual_args, **keyargs)
   2562 
   2563         # Plot the data
-> 2564         a = self.__plot(arglist, keyargs)
   2565 
   2566         if "continents_line" in keyargs:

/export/duro/anaconda2/envs/uvcdat280nox/lib/python2.7/site-packages/vcs/Canvas.pyc in __plot(self, arglist, keyargs)
   2757                 arglist[3] not in ["meshfill", ]:
   2758             raise RuntimeError("You are attempting to plot unstructured grid" +
-> 2759                                "with a method that is not meshfill")
   2760         # preprocessing for extra keyword (at-plotting-time options)
   2761         cmds = {}

RuntimeError: You are attempting to plot unstructured gridwith a method that is not meshfill

@doutriaux1
Copy link
Contributor

@durack1 yes I don't think we ever fixed this. @danlipsa do you have cycles for this?

@danlipsa
Copy link
Contributor

@doutriaux1 I can put it on my list @durack1 Can I have the nc file?

@durack1
Copy link
Member

durack1 commented Jan 23, 2017

@danlipsa here's a single timeslice
AusCOM1-0.Salt.Omon.so.00010702.nc.zip

@doutriaux1 doutriaux1 modified the milestone: 3.0 May 5, 2017
@doutriaux1 doutriaux1 modified the milestones: 3.0, post 3.0 Mar 29, 2018
@doutriaux1 doutriaux1 modified the milestones: 8.1, 8.2 Mar 27, 2019
@doutriaux1
Copy link
Contributor

@scottwittenburg @danlipsa it would be nice to be able to plot unstructured grids in isofill, since we have the cell points.

@scottwittenburg
Copy link
Collaborator

This is about generating a mesh (using triangulation) when we only have points.

@scottwittenburg scottwittenburg added the high Highest priority issue label May 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement high Highest priority issue
Projects
None yet
Development

No branches or pull requests

5 participants