Index

Abstract Quantile Matching model

Types

QuantileMatching.EmpiricalQuantileMatchingModelType
EmpiricalQuantileMatchingModel{T}

Structure containing the different distributions for performing empirical quantile matching.

Details

  • targetsample: target sample (local-scale sample for the calibration period)
  • actualsample: actual sample (large-scale sample for the calibration period)
  • projsample: projected sample (large-scale sample for the projected period)
  • nbins: number of bins used to compute the transfert function
  • extrapolation: extrapolation method when large-scale values lies outside the range of the local-scale values.

It should be an Interpolations.BoundaryCondition type like for example Interpolations.Flat() and Interpolations.Line().

If extrapolation = Interpolations.Flat(), there is no extrapolation of the local-scale quantile. The post-processed value is either the minimum or the maximum of the local-scale values.

If extrapolation = Interpolations.Line(), post-processed quantiles beyond the range of the local-scale values are extrapolated using a linear model.

If the projsample is not provided, the quantile matching model is assumed to be stationary and the actual distribution is post-processed.

See also ParametricQuantileMatchingModel

source
QuantileMatching.ParametricQuantileMatchingModelType
ParametricQuantileMatchingModel{T}

Structure containing the different distributions for performing parametric quantile matching.

Details

  • targetdist: target distribution (local-scale distribution for the calibration period)
  • actualdist: actual distribution (large-scale distribution for the calibration period)
  • projdist: projected distribution (large-scale distribution for the projected period)

If the projdist is not provided, the quantile matching model is assumed to be stationary and the actual distribution is post-processed.

See also EmpiricalQuantileMatchingModel

source

Methods

Base.matchFunction
match(qmm::AbstractQuantileMappingModel, x::Vector{<:Real})

Match the values in x according to the model qmm.

Details

The function uses the cdf-t method proposed by Michelangeli et al. (2009).

This is a type-stable function. This is why it takes a vector as argument and returns a vector. For matching a scalar value x, wrap it in the vector [x].

Reference

Michelangeli, P.-A., Vrac, M., and Loukos, H. (2009), Probabilistic downscaling approaches: Application to wind cumulative distribution functions, Geophys. Res. Lett., 36, L11708, doi:10.1029/2009GL038401.

source
Base.matchMethod
match(pqm::ParametricQuantileMatchingModel{Stationary}, x::Real)

Parametric quantile matching of the actual value x according to the parametric quantile matching model pqm.

Note

If x is outside the support of the actual distribution and the target distribution is unbounded, the function returns an infinite value.

source

Functions

QuantileMatching.censorMethod
censor(y::Vector{<:Real}, u::Real ; fillvalue::Real=0)

Return the vector for which the value below u are filled with fillvalue and where u is substracted from the remaining values.

See also pwet and wet_threshold.

source
QuantileMatching.ecdfMethod
ecdf(y::Vector{<:Real})::Tuple{Vector{<:Real}, Vector{<:Real}}

Compute the empirical cumulative distribution function using the Gumbel formula.

Details

The empirical quantiles are computed using the Gumbel plotting positions as as recommended by Makkonen (2006).

Example

julia> (x, F̂) = Extremes.ecdf(y)

Reference

Makkonen, L. (2006). Plotting positions in extreme value analysis. Journal of Applied Meteorology and Climatology, 45(2), 334-340.

source
QuantileMatching.eqmMethod
eqm(y::Vector{<:Real}, x::Vector{<:Real})

Return the corrected values of the actual sample x relative to the target sample y by empirical quantile matching.

Details

The quantile matching is done in two steps. The first step is to adjust the proportion of wet days and the second step is to correct for non-zero values.

source
QuantileMatching.pqmMethod
pqm(pd::Type{<:ContinuousUnivariateDistribution}, y::AbstractVector{<:Real}, x::AbstractVector{<:Real})

Return the corrected values of the actual sample x relative to the target sample y by parametric quantile matching specified by pd.

Details

The quantile matching is done in two steps. The first step is to adjust the proportion of wet days and the second step is to correct for non-zero values using the specified distribution.

source