[gradsusr] Script to mask out members of an ensemble

Stefan Fronzek sfronzek at sonnenkinder.org
Fri Dec 10 09:49:50 EST 2010


Dear all,

I was trying to calculate the average of an ensemble (stored in the e-dimension) where single ensemble members are masked out. I came up with a script for this task, find it attached should anybody be interested. Comments welcome!

emask.gs - creates a mask for selecting or deselecting individual ensemble
           members; modified from Wesley Ebisuzaki"s monmask.gs (v1.0.1)
           Defines a mask ("emask") where the nth ensemble member is set to one
           and the others are undefined and a second mask ("emaskinv") where the
           nth ensemble member is set to undefined and the others to 1.
Usage: run emask {e}
  e - ensemble member in the e-dimension
Example: in a 10-member ensemble, deselect a member when calculating averages
    set lat 40
    set lon -90
    set e 1 10
    run emask 5
    set e 1
    display ave(expression*emaskinv,e=1,e=10)

Best regards,
Stefan
-- 
GMX DSL Doppel-Flat ab 19,99 €/mtl.! Jetzt auch mit 
gratis Notebook-Flat! http://portal.gmx.net/de/go/dsl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: emask.gs
Type: application/octet-stream
Size: 1622 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20101210/6f138481/attachment-0003.obj 


More information about the gradsusr mailing list