[Paraview] Using XDMF to extract data from multi-dimensional array

joseph insley insley at mcs.anl.gov
Mon May 2 17:05:46 EDT 2011


Apologies for cross-posting, I'm hoping that someone from one of these two lists can help with my problem.

I have an hdf5 file which contains a number of Datasets, and I'm having trouble pulling out a subset of one of them.  An h5ls of the file looks something like this:

Var1	Dataset {64, 64, 64}
Var2	Dataset {1, 1, 100, 64, 64, 64}

I can successfully define a Grid for visualizing Var1 using:
<Grid Name="MyGrid">
<Topology  
	Typology Type="3DCORECTMESH" Dimensions="64 64 64" NumberOfElements="64 64 64">
</Topology>
<Geometry Type="ORIGIN_DXDYDZ">
	<DataItem Name="Origin" DataType="Float" Dimensions="3" Format="XML">
		0 0 0
	</DataItem>
	<DataItem Name="Spacing" DataType="Float" Dimensions="3" Format="XML">
		1 1 1
	</DataItem>
</Geometry>
<Attribute Active="1" Type="Scalar" Center="Node" Name="Var1">
	<DataItem DataType="Double"  Dimensions="64 64 64" Format="HDF">
		DataFile.hdf5:Var1
	</DataItem>
</Attribute>
</Grid>


For Var2, the last three dimensions (64, 64, 64) corresponds to a 3DCORECTMESH, similar to Var1.  So, in this example, I would have 100 of them (the first two dimensions of the array are 1, but in future cases they will not be.)  I have tried without success to define a HyperSlab or a SubSet that will allow me to extract one of those 64^3  volumes from this multidimensional array.  Has anyone here done something like this before?  I would have thought that this would be relatively straightforward, but I have not had any luck finding any examples that do quite the right thing.  I'm hoping that this is possible without reading the entire array from disk, as this won't be possible as the sizes increase.  

Any pointers or suggestions would be much appreciated.

Thanks,
joe. 


More information about the ParaView mailing list