# vtkXdmfReader select grid in Timeseries

**URL:** https://discourse.vtk.org/t/vtkxdmfreader-select-grid-in-timeseries/9116
**Category:** Support
**Tags:** python, file-formats
**Created:** [August 9, 2022, 11:19am UTC](https://discourse.vtk.org/t/vtkxdmfreader-select-grid-in-timeseries/9116 "2022-08-09T11:19:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![RemDelaporteMathurin](https://discourse.vtk.org/user_avatar/discourse.vtk.org/remdelaportemathurin/32/5401_2.png) [@RemDelaporteMathurin](https://discourse.vtk.org/u/RemDelaporteMathurin)
#### Post date: [August 9, 2022, 11:19am UTC](https://discourse.vtk.org/t/vtkxdmfreader-select-grid-in-timeseries/9116/1 "2022-08-09T11:19:57Z")

</div>

Hi all,

I am rather new to VTK and especially the XDMF reader.

I’m trying to read a file that contains 5 timesteps.

I was able to read it with vtkXdmfReader but I would like to know how to access the data for a given timestep (say the third).

Thanks in advance for your help!

```python
from vtkmodules.vtkIOXdmf2 import vtkXdmfReader

reader = vtkXdmfReader()

reader.SetFileName("checkpoint.xdmf")

reader.UpdateInformation()

print(reader.GetNumberOfGrids()) # prints 5

print(reader.GetNumberOfGridArrays()) # prints 5

print(reader.GetOutputDataObject(0)) # don't really know what it does...

```
