[gradsusr] FW: ensemble windchill

Jennifer Adams jma at cola.iges.org
Wed Dec 15 12:06:28 EST 2010


You need to 'set e 1 last' before all your define statements -- e is  
fixed by default when you open a file, so none of your defined  
variables are varying in e, so your ensemble mean is not averaging  
over all members.
--Jennifer

On Dec 15, 2010, at 6:08 AM, eric delaere wrote:

> hello
> I still don't found a solution to fix this problem.
> I'm able to make ensembles with some simple parameters (see http://users.fulladsl.be/spb4195/gfs.htm) 
>  but with parameters, derived from formula (like the wind chill), it  
> doesn't work...
> Anybody?
>
> From: karimhamid2 at hotmail.com
> To: gradsusr at gradsusr.org
> Date: Fri, 10 Dec 2010 14:05:07 +0100
> Subject: [gradsusr] ensemble windchill
>
> Hi
>
> I have problems with printing the ensemble meteogram for the wind  
> chill (with  whiskers & bars). No problem to make a ensemble for eg.  
> T850 or so, but to calculate the wind chill, I need to use some  
> formula & also some maskout & const stuff...
> Therefore , the min, max,..etc aren't correct in the tloop formula...
>
> Obviously I do something wrong in my script philosophy but what??
> Thx
>
> (I use grads 2.0)
> ***********
> function main( args )
> 'reinit'
> 'sdfopen http://nomads.ncep.noaa.gov:9090/dods/gens_bc/gens'datum''mon''day'/gep_all_'run'z'
>
> * Calculate the ensemble mean
> * ---------------------------
>   'set lon 4'
>   'set lat 51'
>   'set t 1 37'
>
> 'define wind = (mag(ugrd10m,vgrd10m))'
> 'define windH = const(const(maskout(wind,wind-1),1),0,-u)'
> 'define windL = const(const(maskout(wind,0.999-wind),1),0,-u)'
> 'define W =  wind*2.2369363'
> 'define T =  (9/5)*(tmp2m-273.15)+32'
> 'define chillf=  35.74+(0.6215*T)-(35.75*pow(W,0.16)) 
> +(0.4275*T*pow(W,0.16))'
> 'define chillC =  (chillf-32)*(5/9)'
> 'define chill2 = (windL*(tmp2m-273.15))+(windH*chillC)'
>
> 'define ensmean=ave(chill2,e=1,e=21)'
>
>  'set cmark 0'
>  'set vrange -20 10'
>  'set ylint 5'
>  'set cstyle 2'
>  'set ccolor 4'
>  'set cthick 3'
>  'display ensmean'
>
> * Calculate the variance
> * ----------------------
>   diffsq = 'pow(chill2-ensmean,2)'
>
> variance = 'ave('diffsq',e=1,e=21)'
> 'define stddev=sqrt('variance')'
>
> * Calculate the min/max
> * ---------------------
>  'define ensmin=tloop(min(chill2,e=1,e=21))'
>
>  'set cmark 0'
>  'set vrange -20 10'
>  'set ylint 5'
>  'set cstyle 1'
>  'set ccolor 4'
>  'set cthick 3'
>  'd ensmin'
>
>   'define ensmax=tloop(max(chill2,e=1,e=21))'
>
>  'set cmark 0'
>  'set vrange -20 10'
>  'set ylint 5'
>  'set cstyle 1'
>  'set ccolor 2'
>  'set cthick 3'
>  'd ensmax'
>
> * Plot the results
> * ----------------
>   'set t 1 37'
>   'set lon 4'
>   'set lat 51'
>   'set vrange -20 10'
>   'set ylint 5'
>
> * Draw error bars for min/max
> * ---------------------------
>   'set gxout errbar'
>   'set bargap 70'
>   'set rgb 16 183 183 183'
>   'set ccolor 16'
>   'set cthick 3'
>   'd ensmin;ensmax'
>
> * Draw bars for +/- standard deviation
> * ------------------------------------
>   plus  = '(ensmean+stddev)'
>   minus = '(ensmean-stddev)'
>
>   'set gxout bar'
>   'set bargap 50'
>   'set baropts filled'
>   'set rgb 16 183 183 183'
>   'set ccolor 16'
>   'd 'minus';'plus
>
> * Draw line for Ensemble mean
> * ---------------------------
>   'set gxout line'
>   'set cmark 0'
>   'set cthick 6'
>   'set digsiz 0.05'
>   'set ccolor 2'
>   'd ensmean'
>
> 'printim c:\model\upload\test\ensemble.png'
>
> *clear
> 'quit'
>
> _______________________________________________ gradsusr mailing  
> list gradsusr at gradsusr.org http://gradsusr.org/mailman/listinfo/gradsusr 
> <ATT00001.txt>_______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr

--
Jennifer M. Adams
IGES/COLA
4041 Powder Mill Road, Suite 302
Calverton, MD 20705
jma at cola.iges.org



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20101215/6e3e75d3/attachment-0003.html 


More information about the gradsusr mailing list