# Rescale to data range sometimes produces garbage bounds with XDMF HDF5 file

**URL:** https://discourse.paraview.org/t/rescale-to-data-range-sometimes-produces-garbage-bounds-with-xdmf-hdf5-file/8193
**Category:** ParaView Support
**Tags:** python
**Created:** [October 14, 2021, 5:37pm UTC](https://discourse.paraview.org/t/rescale-to-data-range-sometimes-produces-garbage-bounds-with-xdmf-hdf5-file/8193 "2021-10-14T17:37:59Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![APrescott](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/838e76/32.png) [@APrescott](https://discourse.paraview.org/u/APrescott)
#### Post date: [October 14, 2021, 5:37pm UTC](https://discourse.paraview.org/t/rescale-to-data-range-sometimes-produces-garbage-bounds-with-xdmf-hdf5-file/8193/1 "2021-10-14T17:37:59Z")

</div>

Hello Paraview community, this is my first post!

I’ve been experiencing some issues with visualizing a model output HDF5 data set using XDMF3. **The problem** : intermittently, the “Rescale to Data Range” tool sets the colormap bounds to seemingly garbage values, often on the order of ± 1E30 but it varies with every load; the data set values all lie in [0,1]. Interestingly, when this happens, the “Rescale to Visible Data Range” tool sets the colormap correctly.

About the data: The .h5 file is created and written to in Python using h5py, and I have written code that manually writes the .xmf file. I load the data in Paraview with the XDMF Reader. The data exists as cell data in a 2D curvilinear grid, with dimensions stored as [time, spatial dim1, spatial dim2]. In the example file attached, the cell dimensions are [5, 600, 10] and the grid point dimensions are [601, 11]. I use the “hyperslab” XDMF item type to get slices of the cell data at each time value – I’ve seen elsewhere that hyperslab doesn’t always play nicely with Paraview, so maybe this is where the problem lies?

The most recent time that I loaded this file, the automatic colormap scale for time=1 was [-1.4E-70, 7.7E291]. When I reset the session and reload the same exact file, the colormap auto scaled correctly to [0, 0.78]. But then I reset/reload again, and the auto colormap is [-8.4E298, 0.0] !

I have triple quadruple checked the dataset and am confident that the entire .h5 cell array is written to, so I don’t think that it contains garbage data.

Any ideas as to what’s going on? All help is appreciated.

OS: Windows 10 v 20H2  
Paraview version: 5.9.1 downloaded from Paraview website  
Graphics hardware: Intel UHD Graphics 620

Thank you,  
Alexander

p.s. This hasn’t mattered for other .h5 files I’ve visualized but just in case it’s important: the .h5 and .xmf files are stored in the WSL2 file system, Paraview installed on the Windows side.

[cells.h5](https://discourse.paraview.org/uploads/short-url/mfCCy1xYR35lxlC6xe6SatSC1Ks.h5) (288.0 KB)  
[cells.xmf](https://discourse.paraview.org/uploads/short-url/dp3D0swKoOeh2GL5fKIAQgBADXN.xmf) (4.8 KB)
