# error loading curvilinear data in hdf5 format in paraview

**URL:** https://discourse.paraview.org/t/error-loading-curvilinear-data-in-hdf5-format-in-paraview/12947
**Category:** ParaView Support
**Created:** [September 27, 2023, 4:10pm UTC](https://discourse.paraview.org/t/error-loading-curvilinear-data-in-hdf5-format-in-paraview/12947 "2023-09-27T16:10:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![paraHuman](https://discourse.paraview.org/user_avatar/discourse.paraview.org/parahuman/32/12292_2.png) [@paraHuman](https://discourse.paraview.org/u/paraHuman)
#### Post date: [September 27, 2023, 4:10pm UTC](https://discourse.paraview.org/t/error-loading-curvilinear-data-in-hdf5-format-in-paraview/12947/1 "2023-09-27T16:10:57Z")

</div>

Hello,  
I have h5 format data in curvilinear coordinates (r, \theta, z) that I am trying to visualize in paraview. I am using the xdmf script available on this site for curvilinear coordinates: [https://github.com/mvanmoer/HDF5\_examples/blob/master/curvilineargrids/scalar/scalar.xdmf](https://link)

I have successfully loaded the rectlinear data before using the scripts that the above github link provides. For the present case, the cylindrical coordinates, I am facing issues. After setting up everything, I get the following error: “H5Dread(): selection+offset not within extent.”  
I have a field variable written in file continua\_qt.h5 and then I have the coordinate info in the file coordinateNew.h5. The script i use to read these to load in paraview is:

```auto
<?xml version="1.0" ?>
<!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>
<Xdmf xmlns:xi="http://www.w3.org/2003/XInclude" Version="2.2">
  <Domain>
    <Grid Name="rectilinear_scalar" GridType="Uniform">
      <Topology TopologyType="3DSMesh" NumberOfElements="64 64 65" />
      <Geometry GeometryType="XYZ">
        <DataItem Name="coords" Dimensions="64 64 65 3" NumberType="Float" Precision="4" Format="HDF">
          coordinatesNew.h5:/var
        </DataItem>
      </Geometry>
      <Attribute Name="qt" AttributeType="Scalar" Center="Node">
        <DataItem Dimensions="64 64 65" NumberType="Float" Precision="4" Format="HDF">
          continua_qt.h5:/var
        </DataItem>
      </Attribute>
    </Grid>
  </Domain>
</Xdmf>

```

The files are attached in the attached zip archive  
[files.zip](https://discourse.paraview.org/uploads/short-url/t0o7aQKqLZ669Ptn0bwlMRrnhnV.zip) (2.0 MB)

I would greatly appreciate it If you can take a look at my files and the script. The files I have shared are small for demo purposes and can be easily opened/loaded on a pc.

---

<div class="post-metadata">

### Author: ![jfavre](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/b5ac83/32.png) [@jfavre](https://discourse.paraview.org/u/jfavre)
#### Post date: [September 28, 2023, 6:18am UTC](https://discourse.paraview.org/t/error-loading-curvilinear-data-in-hdf5-format-in-paraview/12947/2 "2023-09-28T06:18:43Z")

</div>

your dataset in the coordinates file does not have the same dimension as described in the XDMF file

h5ls -r coordinatesNew.h5  
/ Group  
/var Dataset {3, 64, 64, 65}

---

<div class="post-metadata">

### Author: ![paraHuman](https://discourse.paraview.org/user_avatar/discourse.paraview.org/parahuman/32/12292_2.png) [@paraHuman](https://discourse.paraview.org/u/paraHuman)
#### Post date: [September 28, 2023, 9:59am UTC](https://discourse.paraview.org/t/error-loading-curvilinear-data-in-hdf5-format-in-paraview/12947/3 "2023-09-28T09:59:07Z")

</div>

Thank you, Jean! I see the issue!  
I have a question regarding the ordering of coordinates in these xdmf scripts: for the field variable to be loaded (eg. continua\_qt.h5), if the ordering of the coordinates is (\theta, z, r), then does the coordinate file also need to follow the same ordering? Do these files have to be necessarily formatted in (r, \theta, z) order? or does any order work as long as there is consistency between the coordinate and field file?

Thank you again for your response! I am new to this and any help is greatly appreciated!

---

<div class="post-metadata">

### Author: ![paraHuman](https://discourse.paraview.org/user_avatar/discourse.paraview.org/parahuman/32/12292_2.png) [@paraHuman](https://discourse.paraview.org/u/paraHuman)
#### Post date: [September 28, 2023, 11:54pm UTC](https://discourse.paraview.org/t/error-loading-curvilinear-data-in-hdf5-format-in-paraview/12947/4 "2023-09-28T23:54:38Z")

</div>

> [@jfavre](#):
>
> h5ls -r coordinatesNew.h5

Hello again, Jean! I reconstructed the coordinate file, consistent with the field variable dimensions as well as the xdmf format.  
The xdmf reads:

```auto
<?xml version="1.0" ?>
<!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>
<Xdmf xmlns:xi="http://www.w3.org/2003/XInclude" Version="2.2">
  <Domain>
    <Grid Name="rectilinear_scalar" GridType="Uniform">
      <Topology TopologyType="3DSMesh" NumberOfElements="128 96 65" />
      <Geometry GeometryType="XYZ">
        <DataItem Name="coords" Dimensions="128 96 65 3" NumberType="Float" Precision="4" Format="HDF">
          coordinatesNew3.h5:/var
        </DataItem>
      </Geometry>
      <Attribute Name="qt" AttributeType="Scalar" Center="Node">
        <DataItem Dimensions="128 96 65" NumberType="Float" Precision="4" Format="HDF">
          continua_qt.h5:/var
        </DataItem>
      </Attribute>
    </Grid>
  </Domain>
</Xdmf>

```

Here is what my new coordinate file looks like:

```auto
HDF5 "coordinatesNew3.h5" {
GROUP "/" {
   DATASET "var" {
      DATATYPE H5T_IEEE_F64LE
      DATASPACE SIMPLE { ( 128, 96, 65, 3 ) / ( 128, 96, 65, 3 ) }
      DATA {
      (0,0,0,0): 1, 0.0208333, 0.0245437,
      (0,0,1,0): 1.00828, 0.0208333, 0.0245437,
      (0,0,2,0): 1.01721, 0.0208333, 0.0245437,
      (0,0,3,0): 1.02677, 0.0208333, 0.0245437,
      (0,0,4,0): 1.03694, 0.0208333, 0.0245437,
      . . . and so on

```

Here is my new field variable:

```auto
HDF5 "continua_qt.h5" {
GROUP "/" {
   DATASET "var" {
      DATATYPE H5T_IEEE_F64LE
      DATASPACE SIMPLE { ( 128, 96, 65 ) / ( 128, 96, 65 ) }
      DATA {
      (0,0,0): 0.922782, 0.766533, 0.609736, 0.46097, 0.328609, 0.219098,
      (0,0,6): 0.135544, 0.0772192, 0.0402389, 0.0190713, 0.00818513,
      (0,0,11): 0.00317158, 0.00110768, 0.000348555, 9.88892e-05,
      (0,0,15): 2.53372e-05, 5.88025e-06, 1.25104e-06, 2.64079e-07,

```

I am able to load the variable into Paraview but the domain does not load. Only the array loads with the proper number of points, without any visual rendering of that array (basically a blank screen). I also turned on the legend of the array and it shows me the correct \<min,max\> range of the dataset that I expect. The issue is that I do not see any pictures of the loaded array.
