[Paraview] Convert Large CGNS Dataset to numpy

Thomas PEDOT thomas.pedot at gmail.com
Mon Dec 5 11:04:35 EST 2016


Hi,
I have some CGNS files I want to "convert" to numpy array. To write my
script I first use a more direct method :

   - Converting CGNS to VTK
   - Use vtk_to_numpy method
   - process numpy array

This task is time consuming and I need a more direct option (if possible).

For this, I tried to use paraview CGNSReader and simple module.

I'm able to convert CGNS data to numpy with small data set (Some MB) with
this approach :







*Case = CGNSSeriesReader(filename)Case.UpdatePipeline()rawData =
servermanager.Fetch(Case)import vtk.numpy_interface.dataset_adapter as dsa#
Wrap the raw data object to access NumPy friendly APIdata =
dsa.WrapDataObject(rawData)*

But as it said her <http://www.paraview.org/Wiki/ParaView/Python_Scripting>e
*: **Do not do this if data is large otherwise the client will run out of
memory.*

So, I can I do this without running out of memory ? I don't need to load
all Point Arrays at once.

Is it possible to select just 'Temperature' for example and only one block
? I guess it might be less memory consuming.

Any other ideas ?
Thanks,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20161205/807c5bd3/attachment.html>


More information about the ParaView mailing list