3
$\begingroup$

Given a dataset of lines containing 6 wind forecast values plus 1 observed (actual) value in each like:

 FCT1   FCT2     FCT3   FCT4   FCT5     FCT6   OBSERVED
-3.17   3.51    -5.71   1.37   -0.22   -0.65    -2.38   
-2.7    2.21    -0.71   2.73   -0.33   -2.62    -1.38   
-1.2    3.15    -4.17   3.33   -0.48   -1.65    -2.30   
...
-3.0    3.50    -1.79   3.37   -0.18   -0.62    -2.32   

To make a rank histogram (or Talagrand Diagram), I understand that I need to loop through the lines, sort the forecast values for each one and assume that the ordered values (six, in this case) are the inner limits of each bin on the diagram. 6 limits generates 7 bins. Then, I need to take the corresponding observed value and increase the bin it fits (the bin that its range contains the observed value). I need to do it for every row, so each row has its limits. It has to do with What PDF should be fit to a rank histogram?. I think it is not a simple histogram built via hist() in R. Am I wrong?

enter image description here

How about a precipitation forecast data? Like:

 FCT1   FCT2   FCT3   FCT4   FCT5   FCT6   OBSERVED
  0       0     0.1    0     0        0        0
  0       0     0      0     0.02     0        0
  0       0.1   0      0     0        0        3

What am I supposed to do to know the bin that has the range that fits the observed value like 0, for example? How can I build 7 bins from this forecast data?

$\endgroup$
4
  • $\begingroup$ Tkx @gung, text was edited to clarify my doubt. $\endgroup$
    – JRMGarcia
    Commented Aug 20, 2014 at 22:25
  • 1
    $\begingroup$ I've got the answer from test.scs.fsu.edu/presentations/wkshp_Mar2006allgood_rev.pdf: "When two or more forecasts have same value (most commonly 0), random selection is made for which bin receives the count" $\endgroup$
    – JRMGarcia
    Commented Aug 21, 2014 at 12:22
  • $\begingroup$ I have made a rank histogram python function available for anyone to use. github: github.com/oliverangelil/rankhistogram pypi: pypi.python.org/pypi/rank-histogram/0.1 $\endgroup$ Commented Jul 25, 2017 at 4:07
  • $\begingroup$ Old question, but for completeness I'd like to add that there is now also a rank_histogram function in the xskillscore-package, which provides metrics for verifying forecasts when working with xarrays in Python. The output can be plotted as a histogram using matplotlib.pyplot.barplot() and adjusting the keywords as you like. $\endgroup$
    – Mathi
    Commented May 16, 2022 at 14:06

1 Answer 1

3
$\begingroup$

I found the answer in this pdf:

When two or more forecasts have same value (most commonly 0), random selection is made for which bin receives the count.

The formal source can be found in this pdf.

Also, the function verifRankHist() from the R package ensembleBMA, does this job.

$\endgroup$
1
  • $\begingroup$ +1, thanks for clarifying your post & adding a valuable answer. $\endgroup$ Commented Aug 21, 2014 at 17:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.