Thread Subject:
ranked histogram plot for ensemble member

Subject: ranked histogram plot for ensemble member

From: Pg

Date: 30 Jun, 2012 16:30:13

Message: 1 of 8

Hi,
I want to plot ranked histogram for my 1000 ensemble members but I don't know how to plot in MATLAB. If some body know let me know pls.

Subject: ranked histogram plot for ensemble member

From: Star Strider

Date: 30 Jun, 2012 16:56:22

Message: 2 of 8

"Pg " <poulomizca@gmail.com> wrote in message <jsn9il$nc9$1@newscl01ah.mathworks.com>...

-----------------------------------------------------------------------

What do you mean by 'ranked histogram'? What are you ranking, and by what criteria?

If you mean 'sorted', see:

>> doc sort

Subject: ranked histogram plot for ensemble member

From: Pg

Date: 1 Jul, 2012 06:21:15

Message: 3 of 8

No it is some times called Talagrand diagrams, i.e., mentioned in Hamill (2001) paper: "Interpretation of ranked histogram for verifying ensemble forecasts"


"Star Strider" wrote in message <jsnb3m$se0$1@newscl01ah.mathworks.com>...
> "Pg " <poulomizca@gmail.com> wrote in message <jsn9il$nc9$1@newscl01ah.mathworks.com>...
>
> -----------------------------------------------------------------------
>
> What do you mean by 'ranked histogram'? What are you ranking, and by what criteria?
>
> If you mean 'sorted', see:
>
> >> doc sort

Subject: ranked histogram plot for ensemble member

From: Bruno Luong

Date: 1 Jul, 2012 06:58:08

Message: 4 of 8

"Pg " <poulomizca@gmail.com> wrote in message <jsoq8r$5hd$1@newscl01ah.mathworks.com>...
> No it is some times called Talagrand diagrams, i.e., mentioned in Hamill (2001) paper: "Interpretation of ranked histogram for verifying ensemble forecasts"

What is the formal definition of it? What's difference with a standard histogram?

Bruno

Subject: ranked histogram plot for ensemble member

From: Star Strider

Date: 1 Jul, 2012 19:28:07

Message: 5 of 8

"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <jsose0$c6f$1@newscl01ah.mathworks.com>...
> "Pg " <poulomizca@gmail.com> wrote in message <jsoq8r$5hd$1@newscl01ah.mathworks.com>...
> > No it is some times called Talagrand diagrams, i.e., mentioned in Hamill (2001) paper: "Interpretation of ranked histogram for verifying ensemble forecasts"
>
> What is the formal definition of it? What's difference with a standard histogram?
>
> Bruno

-------------------------------------------------------------------

It seems to be a standard histogram, and would work with MATLAB's histogram functions. I have no idea if an existing MEX routine exists for it. I'll defer to Bruno for a definitive opinion.

The paper Pg is referring to is available here for free (as is the PDF): http://journals.ametsoc.org/doi/full/10.1175/1520-0493%282001%29129%3C0550%3AIORHFV%3E2.0.CO%3B2. A concise description of the calculation of the Talagrand diagram is on slides 9-10 here: http://collaboration.cmc.ec.gc.ca/cmc/cmoi/product_guide/docs/lib/ens_en.pdf.

I had honestly never heard of this, since my knowledge of meteorology is limited to what I learned to get my Instrument Rating a while ago. The Talagrand diagram seems to be a way of verifying an ensemble of different models (or different model results) w.r.t. observations when such as the MSE would not be appropriate or applicable.

So thank you, Pg, I learned something.

Subject: ranked histogram plot for ensemble member

From: Durga Lal Shrestha

Date: 26 Jul, 2012 05:27:34

Message: 6 of 8

Hi

I have written some of the verification scores including rank histogram, CRPS, PIT, reliability and ROC diagram etc for ensemble and probabilistic forecasting. I was planning to post in FLEX, but didnot find time to do. Basically rank histogram an be computed as below


function rankhist(forecasts,obs);
[M N] = size(forecasts);
r=zeros(M,1);
for i = 1:M
   s = sort([forecasts(i,:);obs(i)]); % sorting the forecasts and obs
   tmp = find(s==obs(i)); % finding the position of the obs
   r =tmp(1);
end
ranks = 1:N+1;
% Plot histogram
sk = histc(r,ranks);


Good luck

"Star Strider" wrote in message <jsq8c7$75p$1@newscl01ah.mathworks.com>...
> "Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <jsose0$c6f$1@newscl01ah.mathworks.com>...
> > "Pg " <poulomizca@gmail.com> wrote in message <jsoq8r$5hd$1@newscl01ah.mathworks.com>...
> > > No it is some times called Talagrand diagrams, i.e., mentioned in Hamill (2001) paper: "Interpretation of ranked histogram for verifying ensemble forecasts"
> >
> > What is the formal definition of it? What's difference with a standard histogram?
> >
> > Bruno
>
> -------------------------------------------------------------------
>
> It seems to be a standard histogram, and would work with MATLAB's histogram functions. I have no idea if an existing MEX routine exists for it. I'll defer to Bruno for a definitive opinion.
>
> The paper Pg is referring to is available here for free (as is the PDF): http://journals.ametsoc.org/doi/full/10.1175/1520-0493%282001%29129%3C0550%3AIORHFV%3E2.0.CO%3B2. A concise description of the calculation of the Talagrand diagram is on slides 9-10 here: http://collaboration.cmc.ec.gc.ca/cmc/cmoi/product_guide/docs/lib/ens_en.pdf.
>
> I had honestly never heard of this, since my knowledge of meteorology is limited to what I learned to get my Instrument Rating a while ago. The Talagrand diagram seems to be a way of verifying an ensemble of different models (or different model results) w.r.t. observations when such as the MSE would not be appropriate or applicable.
>
> So thank you, Pg, I learned something.

Subject: ranked histogram plot for ensemble member

From: Bruno Luong

Date: 26 Jul, 2012 06:30:24

Message: 7 of 8

"Durga Lal Shrestha" <durgals@hotmail.com> wrote in message <juqkg6$pnn$1@newscl01ah.mathworks.com>...
> Hi
>
> I have written some of the verification scores including rank histogram, CRPS, PIT, reliability and ROC diagram etc for ensemble and probabilistic forecasting. I was planning to post in FLEX, but didnot find time to do. Basically rank histogram an be computed as below
>
>
> function rankhist(forecasts,obs);
> [M N] = size(forecasts);
> r=zeros(M,1);
> for i = 1:M
> s = sort([forecasts(i,:);obs(i)]); % sorting the forecasts and obs
> tmp = find(s==obs(i)); % finding the position of the obs
> r =tmp(1);
> end
> ranks = 1:N+1;
> % Plot histogram
> sk = histc(r,ranks);
>

I guess there are typos:
s = sort([forecasts(i,:) obs(i)]);
...
r(i) =tmp(1);

Also it is better to enforce by 'first' (or 'last') argument:

r(i) = find(s==obs(i), 1, 'first');

Bruno

Subject: ranked histogram plot for ensemble member

From: Durga Lal Shrestha

Date: 26 Jul, 2012 06:54:16

Message: 8 of 8

Thanks for spotting.

Durga


"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <juqo60$8f1$1@newscl01ah.mathworks.com>...
> "Durga Lal Shrestha" <durgals@hotmail.com> wrote in message <juqkg6$pnn$1@newscl01ah.mathworks.com>...
> > Hi
> >
> > I have written some of the verification scores including rank histogram, CRPS, PIT, reliability and ROC diagram etc for ensemble and probabilistic forecasting. I was planning to post in FLEX, but didnot find time to do. Basically rank histogram an be computed as below
> >
> >
> > function rankhist(forecasts,obs);
> > [M N] = size(forecasts);
> > r=zeros(M,1);
> > for i = 1:M
> > s = sort([forecasts(i,:);obs(i)]); % sorting the forecasts and obs
> > tmp = find(s==obs(i)); % finding the position of the obs
> > r =tmp(1);
> > end
> > ranks = 1:N+1;
> > % Plot histogram
> > sk = histc(r,ranks);
> >
>
> I guess there are typos:
> s = sort([forecasts(i,:) obs(i)]);
> ...
> r(i) =tmp(1);
>
> Also it is better to enforce by 'first' (or 'last') argument:
>
> r(i) = find(s==obs(i), 1, 'first');
>
> Bruno

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
ensemble verificat... Durga Lal Shrestha 26 Jul, 2012 01:29:37
ranked histogram p... Pg 30 Jun, 2012 12:34:14
rssFeed for this Thread

Contact us