PyNcView is a cross-platform NetCDF viewer written in Python. It provides an easy-to-use graphical user interface to the creation of animations and publication-quality figures.
GNU General Public License v2.0
18
stars
1
forks
source link
pyncview crashes when reading a file created by ncdiff #10
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.
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.