calcPercentile function

Calculate percentile values from a time series