NCL Home >
Documentation >
Functions >
Statistics,
Extreme values
extval_return_period
Calculates the period of an event (eg, flood, heat wave, drought) occurring given an average event recurrence interval and specified probability level.
Available in version 6.4.0 and later.
Prototype
function extval_return_period ( Tr [*] : numeric, Pr [*] : numeric ) return_val [ variable of type double if Tr .or. Nr is "double"; else, type "float" is returned]
Arguments
TrA scalar or one dimensional numeric array containing the average event recurrence interval(s).
PrA scalar or one dimensional numeric array specifying the probability [0 <= Pr <= 1).
Return value
A variable of type double if Tr .or. Pr is "double"; else, type "float" is returned.
Description
Estimate the return period (recurrence interval):
Nr = log(Pr)/log(1-(1.0/Tr))
See Also
Examples
Example 1: If an 'event' occures every 100 years (=Tr), for how many years should the specified level of confidence (=Pr) apply?
Ta = 100 ; recurrence years (days ... whatever) Pr = 0.95 ; user specified Nr = extval_return_period(Ta, Pr) ; Nr=5.1 years at 0.95 probability
Example 2: Illustrate returned dimensionality and numeric type.
Ta = 100 ; Pa = 0.95 Na = extval_return_period(Ta, Pa) ; Nr is scalar; float Tb = (/ 5.4, 23.7, 50, 100 /) Pb = 0.99 Nb = extval_return_period(Tb, Pb) ; Nb(4); float Tc = 100d0 Pc = (/ 0.90, 0.95, 0.975, 0.99, 0.999/) Nc = extval_return_period(Tc, Pc) ; Nc(5); double Td = (/ 20, 50, 100, 100 /) Pd = (/ 0.90, 0.95, 0.975, 0.99, 0.999 /) Nd = extval_return_period(Td, Pd) ; Nd(4,5); float