**To**:**David Wang <climater@xxxxxxxxx>****Subject**:**Re: [ferret_users] median averager, not a smoother****From**:**Andrew Wittenberg <Andrew.Wittenberg@xxxxxxxx>**- Date: Sun, 25 Oct 2009 10:02:52 -0400
- Cc: ferret <oar.pmel.ferret_users@xxxxxxxx>
- In-reply-to: <8be1369e0910241258u307f29d8r5a5cab2e9d9c1ede@xxxxxxxxxxxxxx>
- References: <8be1369e0910241258u307f29d8r5a5cab2e9d9c1ede@xxxxxxxxxxxxxx>
- Sender: owner-ferret_users@xxxxxxxx
- User-agent: Thunderbird 2.0.0.23 (X11/20090817)

variable[t=@QNT:.5] would return the temporal median and variable[t=@QNT:.9] would return the temporal 90th percentile.

! Usage: go quantile variable_1d [quantile var_out] ! $1 [ $2 $3 ] ! Return a quantile of a one-dimensional variable. ! The quantile value is interpolated if necessary. ! Default is the median (0.5 quantile). let q_idx = 1 + $2".5" * (`$1,r=lend`-1) let q_sort = samplel($1,sortl(($1))) let q_val = q_sort[t=`q_idx`] let $3"quantile" = `q_val` Andrew David Wang wrote:

Dear Ferret developers,I appreciate the recent, useful addition of median transformationsmoother @MED into Ferret. Sometimes, however, I find myself (probablyothers as well) in need of a median averager, much like @AVE as anarithmetic averager. For instance, I'd like to get the median of a timeseries and use the resultant scalar in other expressions. I wonder ifsuch a transformation could be implemented into future Ferret release.Thanks, David -- turn and live.

**Follow-Ups**:**Re: [ferret_users] median averager, not a smoother***From:*David Wang

**References**:**[ferret_users] median averager, not a smoother***From:*David Wang

- Previous by thread:
**[ferret_users] median averager, not a smoother** - Next by thread:
**Re: [ferret_users] median averager, not a smoother**

Contact Us

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement