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

pyncview crashes when reading a file created by ncdiff #10

Open
hburchard opened this issue May 10, 2024 · 0 comments
Open

pyncview crashes when reading a file created by ncdiff #10

hburchard opened this issue May 10, 2024 · 0 comments

Comments

@hburchard
Copy link

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.

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

No branches or pull requests

1 participant