# Assign time to a timestep

**URL:** https://discourse.paraview.org/t/assign-time-to-a-timestep/3505
**Category:** ParaView Support
**Created:** [February 5, 2020, 1:20am UTC](https://discourse.paraview.org/t/assign-time-to-a-timestep/3505 "2020-02-05T01:20:01Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![Someone\_fromjapan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/someone_fromjapan/32/2892_2.png) [@Someone\_fromjapan](https://discourse.paraview.org/u/Someone_fromjapan)
#### Post date: [February 5, 2020, 1:20am UTC](https://discourse.paraview.org/t/assign-time-to-a-timestep/3505/1 "2020-02-05T01:20:01Z")

</div>

Is there a simple way to assign time to a timestep without going to python?  
I have a field data step-by-step evolution loaded as enumerated file series.  
So in Paraview it appears as time 1,2,3,4,5…  
But I know the exact time vector, with a value for every time step.  
I also know the uniform time difference for every step. like dt=1.2494e-09.

It is possible assigning this difference to the time data? Like scaling the time vector 1.2494e-09:1 ?  
I need it for further taking FFT and checking spectrum at particular spatial positions.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [February 5, 2020, 2:27am UTC](https://discourse.paraview.org/t/assign-time-to-a-timestep/3505/2 "2020-02-05T02:27:54Z")

</div>

You can specify it in a .pvd file.

---

<div class="post-metadata">

### Author: ![Someone\_fromjapan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/someone_fromjapan/32/2892_2.png) [@Someone\_fromjapan](https://discourse.paraview.org/u/Someone_fromjapan)
#### Post date: [February 5, 2020, 6:05am UTC](https://discourse.paraview.org/t/assign-time-to-a-timestep/3505/3 "2020-02-05T06:05:46Z")

</div>

I can’t if it is not provided.  
The step-by-step data is old-format vtk. so there are only steps available. The step time difference is something I calculate separately.

The question is not about loading, but about assigning correct time to the data already loaded with integer time.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [February 5, 2020, 6:15am UTC](https://discourse.paraview.org/t/assign-time-to-a-timestep/3505/4 "2020-02-05T06:15:29Z")

</div>

There is no such Filter in ParaView yet, and it actually is not a trivial feature to add because of the way timesteps works in VTK.

---

<div class="post-metadata">

### Author: ![Someone\_fromjapan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/someone_fromjapan/32/2892_2.png) [@Someone\_fromjapan](https://discourse.paraview.org/u/Someone_fromjapan)
#### Post date: [February 5, 2020, 6:52am UTC](https://discourse.paraview.org/t/assign-time-to-a-timestep/3505/5 "2020-02-05T06:52:48Z")

</div>

Why is it not trivial? In the timestep properties I can type in any float number for any timestep iterator manually. Why can’t it be just filled in on incremental basis with a filter? or overwritten by a vector of values using another filter?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [February 5, 2020, 6:55am UTC](https://discourse.paraview.org/t/assign-time-to-a-timestep/3505/6 "2020-02-05T06:55:09Z")

</div>

time steps have to be provided during the RequestInformation pass. It is not trivial to have access to the timesteps at this point.

[https://vtk.org/Wiki/VTK/Time\_Support](https://vtk.org/Wiki/VTK/Time_Support)  
[https://vtk.org/Wiki/VTK/Tutorials/New\_Pipeline](https://vtk.org/Wiki/VTK/Tutorials/New_Pipeline)

---

<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: [February 5, 2020, 12:07pm UTC](https://discourse.paraview.org/t/assign-time-to-a-timestep/3505/7 "2020-02-05T12:07:31Z")

</div>

How about that:

[https://gitlab.kitware.com/paraview/paraview/blob/v5.5.0/Documentation/release/ParaView-5.5.0.md#json-based-new-meta-file-format-for-series-added](https://gitlab.kitware.com/paraview/paraview/blob/v5.5.0/Documentation/release/ParaView-5.5.0.md#json-based-new-meta-file-format-for-series-added)

---

<div class="post-metadata">

### Author: ![olesenm](https://discourse.paraview.org/user_avatar/discourse.paraview.org/olesenm/32/17416_2.png) [@olesenm](https://discourse.paraview.org/u/olesenm)
#### Post date: [February 5, 2020, 12:15pm UTC](https://discourse.paraview.org/t/assign-time-to-a-timestep/3505/8 "2020-02-05T12:15:35Z")

</div>

> [@Someone\_fromjapan](#):
>
> Why is it not trivial? In the timestep properties I can type in any float number for any timestep iterator manually. Why can’t it be just filled in on incremental basis with a filter? or overwritten by a vector of values using another filter?

If you are also the generator of the VTK files, you could add in as `FIELD_DATA`, which presumably makes it available for you to access in ParaView.  
We use the field name `TimeValue` for compatibility with what Catalyst generates.

---

<div class="post-metadata">

### Author: ![Andy\_Bauer](https://discourse.paraview.org/user_avatar/discourse.paraview.org/andy_bauer/32/5442_2.png) [@Andy\_Bauer](https://discourse.paraview.org/u/Andy_Bauer)
#### Post date: [February 5, 2020, 1:15pm UTC](https://discourse.paraview.org/t/assign-time-to-a-timestep/3505/9 "2020-02-05T13:15:42Z")

</div>

If it is just scaling the time you can use the `Temporal Shift Scale` filter.

---

<div class="post-metadata">

### Author: ![Someone\_fromjapan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/someone_fromjapan/32/2892_2.png) [@Someone\_fromjapan](https://discourse.paraview.org/u/Someone_fromjapan)
#### Post date: [February 5, 2020, 11:50pm UTC](https://discourse.paraview.org/t/assign-time-to-a-timestep/3505/10 "2020-02-05T23:50:52Z")

</div>

**Mathieu** , oh, you mean it is created during import? And not accessible to filters?  
Technically, import sources are also kind of filters…  
And you can take data from one source and map it to the grid from another source.  
Why can’t we generate a custom timestep source, and map a data with grids to that? But I didn’t find a way for doing it with a few mouseclicks.

**Jean** that is interesting!  
It still needs a lot of scripting, because I am not the source of files, and get the dataset of unknown length form the binary solver.

**Andy**  
`Temporal Shift Scale` filter, it is interesting, but I did not get how it works, so skipped it as not related. Now I will check it again…

---

<div class="post-metadata">

### Author: ![Someone\_fromjapan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/someone_fromjapan/32/2892_2.png) [@Someone\_fromjapan](https://discourse.paraview.org/u/Someone_fromjapan)
#### Post date: [February 5, 2020, 11:55pm UTC](https://discourse.paraview.org/t/assign-time-to-a-timestep/3505/11 "2020-02-05T23:55:13Z")

</div>

**Andy**  
errrmmm…  
the time is scaled, but the data stays out of time scope at 1,2,3,“seconds”, while we are speaking in term of picoseconds… so it is not an applicable filter. I don’t even understand what it does and who would need it…

---

<div class="post-metadata">

### Author: ![s1291](https://discourse.paraview.org/user_avatar/discourse.paraview.org/s1291/32/15950_2.png) [@s1291](https://discourse.paraview.org/u/s1291)
#### Post date: [February 15, 2023, 12:57am UTC](https://discourse.paraview.org/t/assign-time-to-a-timestep/3505/12 "2023-02-15T00:57:55Z")

</div>

Thank you for the tip.

In my case, I had to use GNU sed to assign the times correctly in the `.pvd` file.

---

<div class="post-metadata">

### Author: ![s1291](https://discourse.paraview.org/user_avatar/discourse.paraview.org/s1291/32/15950_2.png) [@s1291](https://discourse.paraview.org/u/s1291)
#### Post date: [February 15, 2023, 1:42am UTC](https://discourse.paraview.org/t/assign-time-to-a-timestep/3505/13 "2023-02-15T01:42:02Z")

</div>

One needs to select the first dataset and select the “Ignore Time” checkbox.
