[gradsusr] Median for ensembles.
Davide Sacchetti
davide.sacchetti at arpal.gov.it
Tue May 8 04:40:02 EDT 2012
so you set lat/lon/height, loop the ensemble members in a while loop,
and store the value at that point for each ensemble in enem.ee, from
which you get med.tt, being tt time index.
It seems ok.
>From this point the only solution I know is to define a variable varying
on X and to plot it changing X axis labels. Suppose you know med.tt for
tt varying from 1 to 13: set t 1, set y 1, set x 1 13, define
newvar=maskout(any_var,-1), loop over i from 1 to 13, set defval newvar
i 1 med.i; Now you have variable newvar defined with med values in it.
The only problem is that if you issue a display newvar, 'lon' it will be
drawn on X axis ... solution is to control x axis labels
a bit complicated but it should work ...
bye bye
Davide
On Mon, 2012-05-07 at 11:39 -0700, Ryglicki, David CIV FNMOC wrote:
> Hello, everyone.
>
> The frame for this question is plotting a median line (as opposed to a mean) for a box-whisker plot. The logic surrounding the plot, I get, but my question is specifically about the middle of my script.
>
> The way I have it now, I set lat/lon/height, loop the ensemble members in a while loop, and store the value at that point for each ensemble in a dummy variable (emem.ee). I then run that through a bubble sort, figure out if there's an odd or even number of ensemble members, do the math, and boom, we have a median - med.tt, with tt being the time index.
>
> My question is how do I get the variables in med.tt into a displayable grads variable - say, "median" - so that when I'm finally getting ready to plot, I can just type in "d median?" Is this even possible via some combination of tloop and define? Should I remove this process from GrADS entirely and compute it in a Fortran program?
>
> Additionally, if anyone out there in gradsusr land has a script for computing and plotting median in a line graph, I would not say no to that. I couldn't find one in several attempted Google searches.
>
> David Ryglicki, Ph.D.
> N3 Models
> Fleet Numerical Meteorology and Oceanography Center
> Bldg 702, Rm 146
> Office: 831|656|4519
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
--
--> Attenzione cambio indirizzo: davide.sacchetti at arpal.gov.it
--
Davide Sacchetti
Centro Funzionale Meteo Idrologico di Protezione Civile della Regione Liguria
ARPAL Unità Tecnica Complessa di livello Regionale
V.le Brigare Partigiane 2 16121 Genova (I)
tel: +39 010 6437535 fax: +39 010 6437520
mail: davide.sacchetti at arpal.gov.it web: www.meteoliguria.it
More information about the gradsusr
mailing list