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

Support one-dimensional VTK output #6

Open
mdpiper opened this issue Jan 22, 2016 · 0 comments
Open

Support one-dimensional VTK output #6

mdpiper opened this issue Jan 22, 2016 · 0 comments

Comments

@mdpiper
Copy link
Member

mdpiper commented Jan 22, 2016

Dan Parsons (d.parsons@hull.ac.uk) found that setting VTK output for HydroTrend caused his WMT run to fail. Here's the stack trace:

Traceback (most recent call last): 
File "/home/csdms/wmt/bin/wmt-slave.py", line 430, in main env=env) 
File "/home/csdms/wmt/bin/wmt-slave.py", line 398, in launch task.execute() 
File "/home/csdms/wmt/bin/wmt-slave.py", line 311, in execute self.run() 
File "/home/csdms/wmt/bin/wmt-slave.py", line 380, in run model.go(file='model.yaml') 
File "/home/csdms/wmt/internal/coupling/cmt/component/model.py", line 45, in go self._components[self.driver].go(self.duration) 
File "/home/csdms/wmt/internal/coupling/cmt/component/component.py", line 157, in go self.run(stop_time) 
File "/home/csdms/wmt/internal/coupling/cmt/component/component.py", line 176, in run self._events.run(stop_time) 
File "/home/csdms/wmt/internal/coupling/cmt/events/manager.py", line 34, in run event.run(self._timeline.time) 
File "/home/csdms/wmt/internal/coupling/cmt/events/printer.py", line 18, in run self._printer.write() 
File "/home/csdms/wmt/internal/coupling/cmt/portprinter/port_printer.py", line 60, in write self._printer.write(self._field) 
File "/home/csdms/wmt/internal/coupling/cmt/printers/vtk/vtu.py", line 205, in write tofile (field, file_name, **kwargs) 
File "/home/csdms/wmt/internal/coupling/cmt/printers/vtk/vtu.py", line 174, in tofile elements = get_vtu_elements (field, format=format, encoding=encoding) 
File "/home/csdms/wmt/internal/coupling/cmt/printers/vtk/vtu.py", line 124, in get_vtu_elements types = get_vtk_types (field) 
File "/home/csdms/wmt/internal/coupling/cmt/printers/vtk/vtu.py", line 106, in get_vtk_types types = [int (edge_count_to_type.get (offsets[0], VtkPolygon))] IndexError: index out of bounds

This is error is thrown for 1D output because offsets is empty; 2D output is fine.

Dan was able to work around this issue by using netCDF output instead of VTK.

This is likely low priority, since we should just use netCDF.

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