Dear vtk-users,
I am using the vtk library in python to importe a netcdf file.
The netcdf file contains data of two variables for different time steps.
It will be converted into a vtkStructuredGrid
The vtkStructuredGrid then should have PointData for different time steps.
reader_nc = vtk.vtkNetCDFCFReader()
reader_nc.SetFileName(scr_netcdf_path)
reader_nc.UpdateMetaData()
reader_nc.SetSphericalCoordinates(0)
reader_nc.SetOutputTypeToStructured()
reader_nc.Update()
source_nc = reader_nc.GetOutput()
How do I access the PointData of the two variabls at the different time steps?
numpy_support.vtk_to_numpy(src.GetPointData().GetArray(0))
Gives me the data for the 1st variable at the very first time step.
How can I access to remaining time steps?
I would really appreciate some hint.
Cheers,