25.08.15 back again - daplff/hiWi_cont GitHub Wiki
Back again. Time to plan.
Time left to work this summer: (ideally) This week: 3 weekdays. Next week: 5 weekdays. Week after: possibly 4 weekdays. Need to schedule in FA as well, possibly next weekend.
Sum: up to 12 weekdays.
ABSOLUTE MINIMUM 9 days work, full-time.
Ultimate goal: working, demoable C++ class, visualisable data. Reproduced test cases.
Tasks, summed up from previous:
- Starting Parameters. This is important, to not have to load from file every time. Maybe include the file generator thing, because that's quite important too.
- Extend to export more variables.
- Export netcdf output to vtk in a better way using python-netcdf.
- Validate some test cases.
- Finish up C++ class interface.
- Make a user's guide/docu.
Starting parameters:
Need some hour to plan. Whole day to implement. = 2 days
Extend to export more variables:
Ground work done, just need to know which. If ignoring flagged ones, bit longer. = Half a day.
Export to vtk using python:
A lot of stuff read already. Half a day if optimistic = one day.
Validate test cases:
Need to set up stuff and make a bit more structure. First need to have same output variables. Hard to tell, but at least one day, preferably in chunks.
Finish up C++ class interface:
Big task only if I think too much on it.
Thus, do it as it comes along.
Make user's guide/docu:
Should go over everything, maybe in chunks. Maybe a day, could be more or less.
AT LEAST 7 days of present tasks. Go erik, you can do it!
Today's work
- start with netcdf to vtk via python using scientific.io.netcdf and vtk
- copy-paste roland's code for now and edit to suit
- alternatively make general for all variables :heavy_check_mark: (even xpos/ypos...)
Results:
-
did quite a bit of reasearch in clean creating of the points in the unstructured grid without using for loops (seems like for loops are bad in python like in matlab?) but found nothing. Managed to use vtk.util.numpy_support.numpy_to_vtk to turn single numpy arrays (each variable after extraction from netcdf) into vtkFloatArray -s that could then be added to the dataset similarly to how was done in Roland's example, but no similar thing was found for the points, which need not single arrays, but 3-tuples. could check how resizing a contigous 1-D array works, but it seems overkill.
-
finished python script using scientific.io.netcdf and vtk
-
creating paraview-readable vtk unstructured grid binary from my files :)
-
currently exporting xpos and ypos as well, should be removed. Also not working for multiple-timestep file (extracts first available timestep. Doesn't save time either - hmm...)
also...
- implemented all particle variables (now that they're visualizable!)
- looks pretty! threshold for some reason doesn't work directly on the unstructured grid, but works on a set of glyphs on the points. interesting.
- it appears that the surface elevation is NOT corrected for bottom elevation. stupid, maybe... will need to have a look how to fix/ get both. Seems to be same in original though..