Skip to content

pyncview crashes when reading a file created by ncdiff #10

Description

@hburchard

Below is the error message. Any ideas what is happening here? Both individual nc files are read by pyncview without problems. Help would be very much appreciated. Cheers, Hans.

Traceback (most recent call last):
File "/home/hb/.local/lib/python3.8/site-packages/pyncview/pyncview.py", line 1587, in onSelectionChanged
self.figurepanel.figure.setUpdating(oldupdating)
File "/home/hb/.local/lib/python3.8/site-packages/xmlplot/plot.py", line 694, in setUpdating
if allowupdates and self.dirty: self.update()
File "/home/hb/.local/lib/python3.8/site-packages/xmlplot/plot.py", line 833, in update
validplot = self.draw()
File "/home/hb/.local/lib/python3.8/site-packages/xmlplot/plot.py", line 994, in draw
varslices = var.getSlice(tuple(dimbounds))
File "/home/hb/.local/lib/python3.8/site-packages/xmlplot/expressions.py", line 843, in getSlice
s = [node[bounds].getValue(dataonly=dataonly) for node in self.root]
File "/home/hb/.local/lib/python3.8/site-packages/xmlplot/expressions.py", line 843, in
s = [node[bounds].getValue(dataonly=dataonly) for node in self.root]
File "/home/hb/.local/lib/python3.8/site-packages/xmlplot/expressions.py", line 771, in getValue
return LazyExpression.argument2value(self.args[0],slices,dataonly=dataonly)
File "/home/hb/.local/lib/python3.8/site-packages/xmlplot/expressions.py", line 281, in argument2value
res = arg.getValue(extraslices=procslic,dataonly=dataonly)
File "/home/hb/.local/lib/python3.8/site-packages/xmlplot/expressions.py", line 771, in getValue
return LazyExpression.argument2value(self.args[0],slices,dataonly=dataonly)
File "/home/hb/.local/lib/python3.8/site-packages/xmlplot/expressions.py", line 281, in argument2value
res = arg.getValue(extraslices=procslic,dataonly=dataonly)
File "/home/hb/.local/lib/python3.8/site-packages/xmlplot/expressions.py", line 482, in getValue
return self.args[0].getSlice(slics,dataonly=dataonly)
File "/home/hb/.local/lib/python3.8/site-packages/xmlplot/data/netcdf.py", line 1004, in getSlice
coords_stag = xmlplot.common.broadcastSelective(coords_stag,newcoorddims,[l+1 for l in dat.shape],newdimnames)
File "/home/hb/.local/lib/python3.8/site-packages/xmlplot/common.py", line 513, in broadcastSelective
assert source.ndim==len(sourcedims), 'Number of source dimensions (%i) and source shape (%i) mismatch.' % (len(sourcedims),source.ndim)
AssertionError: Number of source dimensions (1) and source shape (2) mismatch.
Traceback (most recent call last):
File "/home/hb/.local/lib/python3.8/site-packages/pyncview/pyncview.py", line 1587, in onSelectionChanged
self.figurepanel.figure.setUpdating(oldupdating)
File "/home/hb/.local/lib/python3.8/site-packages/xmlplot/plot.py", line 694, in setUpdating
if allowupdates and self.dirty: self.update()
File "/home/hb/.local/lib/python3.8/site-packages/xmlplot/plot.py", line 833, in update
validplot = self.draw()
File "/home/hb/.local/lib/python3.8/site-packages/xmlplot/plot.py", line 994, in draw
varslices = var.getSlice(tuple(dimbounds))
File "/home/hb/.local/lib/python3.8/site-packages/xmlplot/expressions.py", line 843, in getSlice
s = [node[bounds].getValue(dataonly=dataonly) for node in self.root]
File "/home/hb/.local/lib/python3.8/site-packages/xmlplot/expressions.py", line 843, in
s = [node[bounds].getValue(dataonly=dataonly) for node in self.root]
File "/home/hb/.local/lib/python3.8/site-packages/xmlplot/expressions.py", line 771, in getValue
return LazyExpression.argument2value(self.args[0],slices,dataonly=dataonly)
File "/home/hb/.local/lib/python3.8/site-packages/xmlplot/expressions.py", line 281, in argument2value
res = arg.getValue(extraslices=procslic,dataonly=dataonly)
File "/home/hb/.local/lib/python3.8/site-packages/xmlplot/expressions.py", line 771, in getValue
return LazyExpression.argument2value(self.args[0],slices,dataonly=dataonly)
File "/home/hb/.local/lib/python3.8/site-packages/xmlplot/expressions.py", line 281, in argument2value
res = arg.getValue(extraslices=procslic,dataonly=dataonly)
File "/home/hb/.local/lib/python3.8/site-packages/xmlplot/expressions.py", line 482, in getValue
return self.args[0].getSlice(slics,dataonly=dataonly)
File "/home/hb/.local/lib/python3.8/site-packages/xmlplot/data/netcdf.py", line 1004, in getSlice
coords_stag = xmlplot.common.broadcastSelective(coords_stag,newcoorddims,[l+1 for l in dat.shape],newdimnames)
File "/home/hb/.local/lib/python3.8/site-packages/xmlplot/common.py", line 513, in broadcastSelective
assert source.ndim==len(sourcedims), 'Number of source dimensions (%i) and source shape (%i) mismatch.' % (len(sourcedims),source.ndim)
AssertionError: Number of source dimensions (1) and source shape (2) mismatch.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions