Version 3 (modified by 8 years ago) (diff) | ,
---|
PDAF_diag_histogram
This page documents the routine PDAF_diag_histogram
of PDAF, which was introduced with PDAF V1.12.
This routine increments information on an ensemble rank histogram. The histogram gives a binned representation of the ensemble distribution relative to the state vector.
Inputs are the ensemble array and a state vector about which the histogram is computed. In addition, the index of the element has to be specified for which the histogram is computed. If this is 0, the histogram information is collected over all elements. Also, the value 'ncall' has to be set. It gives the number of calls used to increment the histogram and is needed to compute the delta-measure that describes the deviation from the ideal histogram.
The input/output array 'hist' has to be allocated externally. In addition, it has to be initialized with zeros before the first call.
The routine can be called in the pre/poststep routine of PDAF both before and after the analysis step to collect the histogram information.
The interface is the following:
SUBROUTINE PDAF_diag_histogram(ncall, dim, dim_ens, element, & state, ens, hist, delta, status)
with the following arguments:
ncall
:integer, intent(in)
Number of calls to routine (>=1)dim
:integer, intent(in)
Size of state vectordim_ens
:integer, intent(in)
Ensemble sizeelement
:integer, intent(in)
Element of state vector for which the histogram is computed. Ifelement=0
, the histogram is computed over the whole state vectorstate
:real, intent(in), dimension(dim)
State vectorens
:real, intent(in), dimension(dim, dim_ens)
State ensemblehist
:integer, intent(inout), dimension(dim, dim_ens+1)
Histogram about the statedelta
:real, intent(out)
Measure of deviation from flat histogramstatus
:integer, intent(out)
Status flag
Notes:
- The array
hist
has to be allocated and initialized with zeros before the first call toPDAF_diag_histogram
- The value of
delta
is >0 if the histogram is not flat. However, delta is not bounded and is hence difficult to interpret. - An example of using
PDAF_diag_histogram
can be found in the Lorenz-96 model example (see testsuite/src/lorenz96/compute_truermse.F90).