# Rankhist: Rank histogram for ensemble forecasts

## Description

Calculate the rank histogram for an archive of ensemble forecasts and their corresponding verifying observations.

## Usage

Rankhist(ens, obs, reduce.bins = 1, handle.na = "na.fail")

## Arguments

ens

matrix of dimension (N,K). An archive of K-member ensemble forecasts for N time instances.

obs

vector of length N. The corresponding verifying observations.

reduce.bins

number of adjacent bins that will be merged into one bin; has to be a divisor of K+1

handle.na

how should missing values in ensemble and observation data be handled; possible values are 'na.fail' (fails if any data is missing) and 'use.complete' (only uses times where all ensemble members and obs are available); default: 'na.fail'

## Value

a vector of length (K+1)/reduce.bins containing the rank counts

## References

Anderson J.L. (1996). A Method for Producing and Evaluating Probabilistic Forecasts from Ensemble Model Integrations. J. Climate, 9, 1518--1530.
Hammill T.M. (2001). Interpretation of Rank Histograms for Verifying Ensemble Forecasts. Mon. Wea. Rev., 129, 550--560.

## See Also

PlotRankhist, TestRankhist

## Examples

# NOT RUN {
data(eurotempforecast)
rh <- Rankhist(ens, obs)
# }