This icon allows you to compute a set of percentiles of a given input fieldset. A percentile is a number such that the given percentage of a distribution is equal to or below it. For instance, the median is the 50th percentile - 50% of the values are equal to or below it.
The generated fields can simply be visualised or saved as GRIB files.
From Macro/Python this icon can be called as
The Percentile Editor
Specifies the data required for the application. This can be any icon returning GRIB data (e.g. MARS Retrieval, GRIB Filter, Formula, Simple Formula). The icon field assist button provides a tailor made MARS request in case you need some guidance in the data specification. Alternatively, parameter Source can be used.
Specifies the GRIB file path and name. Alternatively, parameter Data can be used.
Specifies a list of values from 0 to 100. The total number of values should be equal to or smaller than the number of input fields, as each output field (which corresponds to each percentile value) will use the same input field structure. This will save computer resources and optimize the processing time.
Specifies the interpolation method used to compute the percentiles: nearest_neighbour or linear. The default value is: nearest_neighbour.
Given a list of numbers V, the algorithm used to compute a percentile is the following:
Compute the rank (R) of a P-th percentile. This is done using the following formula:
R = P/100 x (N + 1)
where P is the desired percentile and N is the number of input fields.
Compute the percentile:
If R is an integer, the P-th percentile will be the number with rank R.
If R is not an integer, the P-th percentile is computed by interpolation as follows:
If the interpolation method is Nearest Neighbour, the following equation is used:
P-th = V[int(R + 0.5)]
If the interpolation method is Linear, the following steps are used:
Define IR as the integer portion of R
Define FR as the fractional portion or R
Find the scores with Rank IR and with Rank IR + 1, e.g. V[IR] and V[IR+1]
Interpolate by multiplying the difference between the scores by FR and add the result to the lower score, e.g.
Pth = FR * (V[IR+1] - V[IR]) + V[IR]