<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
hello<br>I still don't found a solution to fix this problem.<br>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...<br>Anybody?<br><br><hr id="stopSpelling">From: karimhamid2@hotmail.com<br>To: gradsusr@gradsusr.org<br>Date: Fri, 10 Dec 2010 14:05:07 +0100<br>Subject: [gradsusr] ensemble windchill<br><br>
<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}
</style>
Hi<br><br>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...<br>Therefore , the min, max,..etc aren't correct in the tloop formula...<br><br>Obviously I do something wrong in my script philosophy but what??<br>Thx<br><br>(I use grads 2.0)<br>***********<br>function main( args )<br>'reinit'<br>'sdfopen http://nomads.ncep.noaa.gov:9090/dods/gens_bc/gens'datum''mon''day'/gep_all_'run'z'<br><br>* Calculate the ensemble mean <br>* ---------------------------<br> 'set lon 4'<br> 'set lat 51'<br> 'set t 1 37'<br><br>'define wind = (mag(ugrd10m,vgrd10m))'<br>'define windH = const(const(maskout(wind,wind-1),1),0,-u)'<br>'define windL = const(const(maskout(wind,0.999-wind),1),0,-u)'<br>'define W = wind*2.2369363'<br>'define T = (9/5)*(tmp2m-273.15)+32'<br>'define chillf= 35.74+(0.6215*T)-(35.75*pow(W,0.16))+(0.4275*T*pow(W,0.16))'<br>'define chillC = (chillf-32)*(5/9)'<br>'define chill2 = (windL*(tmp2m-273.15))+(windH*chillC)'<br><br>'define ensmean=ave(chill2,e=1,e=21)'<br><br> 'set cmark 0'<br> 'set vrange -20 10'<br> 'set ylint 5'<br> 'set cstyle 2'<br> 'set ccolor 4'<br> 'set cthick 3'<br> 'display ensmean'<br> <br>* Calculate the variance<br>* ----------------------<br> diffsq = 'pow(chill2-ensmean,2)'<br><br>variance = 'ave('diffsq',e=1,e=21)'<br>'define stddev=sqrt('variance')'<br><br>* Calculate the min/max<br>* ---------------------<br> 'define ensmin=tloop(min(chill2,e=1,e=21))'<br><br> 'set cmark 0'<br> 'set vrange -20 10'<br> 'set ylint 5'<br> 'set cstyle 1'<br> 'set ccolor 4'<br> 'set cthick 3'<br> 'd ensmin'<br><br> 'define ensmax=tloop(max(chill2,e=1,e=21))'<br><br> 'set cmark 0'<br> 'set vrange -20 10'<br> 'set ylint 5'<br> 'set cstyle 1'<br> 'set ccolor 2'<br> 'set cthick 3'<br> 'd ensmax'<br> <br>* Plot the results<br>* ----------------<br> 'set t 1 37'<br> 'set lon 4'<br> 'set lat 51'<br> 'set vrange -20 10'<br> 'set ylint 5'<br><br>* Draw error bars for min/max<br>* ---------------------------<br> 'set gxout errbar'<br> 'set bargap 70'<br> 'set rgb 16 183 183 183'<br> 'set ccolor 16'<br> 'set cthick 3'<br> 'd ensmin;ensmax'<br><br>* Draw bars for +/- standard deviation<br>* ------------------------------------<br> plus = '(ensmean+stddev)'<br> minus = '(ensmean-stddev)'<br><br> 'set gxout bar'<br> 'set bargap 50'<br> 'set baropts filled'<br> 'set rgb 16 183 183 183'<br> 'set ccolor 16'<br> 'd 'minus';'plus<br><br>* Draw line for Ensemble mean <br>* ---------------------------<br> 'set gxout line'<br> 'set cmark 0'<br> 'set cthick 6'<br> 'set digsiz 0.05'<br> 'set ccolor 2'<br> 'd ensmean'<br><br>'printim c:\model\upload\test\ensemble.png'<br><br>*clear<br>'quit'<br>                                           
<br>_______________________________________________
gradsusr mailing list
gradsusr@gradsusr.org
http://gradsusr.org/mailman/listinfo/gradsusr                                            </body>
</html>