Calculate [value of the current timestep - value of the previous timestep] of a variable

Hi!

I am creating a rain precipitation vizualization with ParaView and the hourly variable that stores the information is cumulative

Timestep 0 = Timestep 0
Timestep 1 = Timestep 0 + Timestep 1
Timestep 2 = Timestep 0 + Timestep 1 + Timestep 2

I would like to visualize the difference between the current timestep and the previous one, so it demonstrate the hourly value, not the total accumulation

Is that possible?

You can use the Temporal Shift Scale filter to get a copy of the data set at a different timestep. Both the data from the original reader and the data from the temporal shift will be available in the pipeline, so you can use them together.

I’m not sure what you mean by “visualize the difference,” but perhaps you want to use Append Attributes and then the Calculator filter to take the difference of the same field from the two different datasets (i.e. datasets from different times).

Thank you, Kenneth! It worked =)

After using your way it came to my mind to do it in the following manner:

Use the TemporalArrayOperator on the dataset with the variable used

Add a track in the AnimationView with the properties First Time Step Index and Second Time Step Index of the TemporalArrayOperator one going from [1, maxtime] and [0, maxtime-1]

This way the calculator filter don’t throw an error when it gets to the last timestep thats shifted by one.

1 Like

Nice solution! I forgot about the Temporal Array Operator filter, and that’s a clever use of the animation controls.

I think the data processing I want to conduct is similar, but after reading the conversation and trying “TemporalArrayOperator” I am still not sure how the problem was solved (I am not familiar with these filters). Can anyone explain the details? I have a variable called “exhumation” that records my model’s cumulative exhumation. Now I want to calculate the exhumation rate for every timestep. Therefore, I want to create a new variable “ExhumationRate”: ExhumationRate = [Exhumation(timestep=N) - Exhumation(timestep=N-1)]/timestep. Finally, I want to make a movie of the exhumation rate map over time.and use “plot selection over time” for a selected cell to see the exhumation rate change over time at one location.