The EnSight calculator has the StatMoment function to calculate spatial statistical quantities: mean, variance, skew, and kurtosis as shown in the image below from the User Manual.

But the EnSight calculator includes only the ability to calculate three temporal statistical quantities, min max and mean using two calculator functions. An EnSight Python script is provided to calculate temporal mean, temporal variance, temporal skew and temporal kurtosis as well as temporal sum, temporal RMS, temporal min and temporal max scalars. These are calculated over time rather than space, resulting in a spatial scalar with each element containing it’s temporal statistics.

These variables are named per the comments in the python script.

The user will have to edit this python script and change the variable name var_name to be their variable name, change the begin and end time values, and change the values of the variance_flag, skew_flag, and kurt_flag to True or False, in order to calculate these values. Note that in order to calculate variance, skew or kurtosis, all other previous values must be True.

Note that an entire pass through all the timesteps is required for each of the temporal statistical values requested. That is, mean, variance, skew and kurtosis will require a total of 4 passes through all time. Temporal sum, temporal RMS, temporal min, and temporal max will require an additional 4 passes. For large datasets with a large number of times this can take quite a while. First run this with the variance, skew and kurtosis flags set to false and set the min and max time close together to get an idea of how long it takes for one pass through.

Note that this will work for static geometry with temporal variables, or changing coordinate geometry with temporal variables. It will not work for changing connectivity geometry, where the geometry connectivity changes at each timestep. Do a query>dataset to determine if what kind of geometry is in your specific dataset.

The python script makes creative use of the temporal mean function included in EnSight to do temporal integrations using intermediate variables. The Temporal Mean calculator function in EnSight uses, by default, the Trapezoidal rule for temporal integration. The results using this integration are shown below.

As of EnSight 9.2.2(e), a statistical integration option is allowed for Temporal Mean. This methodology simply uses the data and the step size in a rectangular integration. This python script turns this form of integration on for the duration of the script then restores it back to the default of using Trapezoidal Rule. Shown below are the results using this new statistical integration. For this dataset there is not significant difference until the kurtosis.

and the temporal sum, min, max, and RMS are shown below.

Click on the link below to get the python script.