There can be incomplete realizations in an ensemble. Make sure that the calculation is robust for all variants of incomplete curves.
Use RiaTimeHistoryCurveMerger to ensure one definition of time steps and extraction of curve values to be used to compute ensemble statistics.
Remove unused function.