<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Oh, sorry, I missed this comment that your error was at line 13. My earlier correct is still valid, but your script hasn't gotten there yet. <div><br></div><div>You have this:</div><div><blockquote type="cite"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 10pt; position: static; z-index: auto; "><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; "><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "> 'd rainmax'<br>> rainmax=subwrd(result,10)</div></div></div></div></blockquote></div><div><br></div><div><div>But you are parsing the output from the display command with 'gxout shaded'. The 'result' variable probably contains something like this: </div></div><div><div>"Contouring: 0 to 50 interval 5"</div></div><div>and there is no 10th word for subwrd to parse. </div><div>Put some statements in your script like: </div><div> 'say 'rainmax </div><div>and you'll see why it's not working.</div><div>--Jennifer</div><div><br></div><div><br></div><div><br></div><div><br><div><div>On May 30, 2011, at 1:57 AM, hassan quamrul wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 10pt; position: static; z-index: auto; "><div style="RIGHT: auto"><span style="RIGHT: auto">No actually it giving error at line 13 (if(rainmax<=10)</span></div> <div style="RIGHT: auto"><span style="RIGHT: auto"></span> </div> <div style="RIGHT: auto"><span style="RIGHT: auto"><var id="yui-ie-cursor"></var></span> </div> <div></div> <div> </div> <div>S.M.Quamrul Hassan<br>Meteorologist<br>Storm Warning Centre<br>Bangladesh Meteorological Department<br>Agargaon, Dhaka-1207<br>Tel: +880 2 9135742<br>Fax: +880 2 8118230<br>Cell: +8801916255449<br></div> <div style="FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 10pt"> <div style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"><font size="2" face="Arial"> <div style="BORDER-BOTTOM: #ccc 1px solid; BORDER-LEFT: #ccc 1px solid; PADDING-BOTTOM: 0px; LINE-HEIGHT: 0; MARGIN: 5px 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; FONT-SIZE: 0px; BORDER-TOP: #ccc 1px solid; BORDER-RIGHT: #ccc 1px solid; PADDING-TOP: 0px" class="hr" readonly="true" contenteditable="false"></div><b><span style="FONT-WEIGHT: bold">From:</span></b> fadzil mnor <<a href="mailto:fadzilmnor84@gmail.com">fadzilmnor84@gmail.com</a>><br><b><span style="FONT-WEIGHT: bold">To:</span></b> hassan quamrul <<a href="mailto:smquamrul77@yahoo.com">smquamrul77@yahoo.com</a>>; GrADS Users Forum <<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>><br><b><span style="FONT-WEIGHT: bold">Sent:</span></b> Monday, May 30, 2011 11:40 AM<br><b><span style="FONT-WEIGHT: bold">Subject:</span></b> Re: [gradsusr] What's wrong in the script?<br></font><br>Line 20.<br>Does removing asterisk will solve the prob?<br><br>regards,<br>Fadzil<br><br>On 5/30/11, hassan quamrul <<a href="mailto:smquamrul77@yahoo.com" ymailto="mailto:smquamrul77@yahoo.com">smquamrul77@yahoo.com</a>> wrote:<br>> Dear All,<br>><br>> I am trying to plot rainfall from WRF output for different range (say 10 mm<br>> to 250mm) for a perticular color cobination colorbar .Please see below the<br>> script, but it not working (if statement).<br>> What's wrong. Any can help? Please.<br>><br>> 'reinit'<br>> 'open 2011052900.ctl'<br>> 'set display color white'<br>> 'c'<br>> 'set gxout shaded'<br>> 'set mpdset hires'<br>> 'set lat 18 28'<br>> 'set lon 84 97'<br>> 'set t 9'<br>> 'define rainmax=max(max(rainc,lon=84,lon=97),lat=18,lat=28)'<br>> 'd rainmax'<br>> rainmax=subwrd(result,10)<br>> if( rainmax=<10 )<br>> 'set clevs .1 1 2 4 6 8 10'<br>> 'set ccols 0 3 10 7 12 8 2 6 6'<br>> endif<br>> if(rainmax>10 & <=24)<br>> 'set clevs 1 4 8 12 16 20 24'<br>> 'set ccols 0 3 10 7 12 8 2 6 6'<br>> *endif<br>> if(rainmax>24 & <=30)<br>> 'set clevs 1 5 10 15 20 25 30'<br>> 'set ccols 0 3 10 7 12 8 2 6 6'<br>> endif<br>> if( rainmax>30 & <=40 )<br>> 'set clevs 1 5 10 15 20 30 40'<br>> 'set ccols 0 3 10 7 12 8 2 6 6'<br>> endif<br>> if( rainmax>50 & <=60 )<br>> 'set clevs 1 5 10 20 30 40 60'<br>> 'set ccols 0 3 10 7 12 8 2 6 6'<br>> endif<br>> if( rainmax>60 & <=100 )<br>> 'set clevs 1 10 20 40 60 80 100'<br>> 'set ccols 0 3 10 7 12 8 2 6 6'<br>> endif<br>> if( rainmax>100 & <=140 )<br>> 'set clevs 1 10 20 40 70 100 140'<br>> 'set ccols 0 3 10 7 12 8 2 6 6'<br>> endif<br>> if( rainmax>140 & <=180 )<br>> 'set clevs 1 10 20 40 80 120 180'<br>> 'set ccols 0 3 10 7 12 8 2 6 6'<br>> endif<br>> if( rainmax>180 & <=250 )<br>> 'set clevs 1 10 20 40 80 160 250'<br>> 'set ccols 0 3 10 7 12 8 2 6 6'<br>> endif<br>> 'd rainmax'<br>> 'cbar'<br>> 'draw title Rainfall(mm), 00Z,19.08.10 to 00Z,20.08.10'<br>> 'printim wrf_rain_2010081900_24.gif'<br>><br>><br>> regards.<br>><br>><br>> S.M.Quamrul Hassan<br>> Meteorologist<br>> Storm Warning Centre<br>> Bangladesh Meteorological Department<br>> Agargaon, Dhaka-1207<br>> Tel: +880 2 9135742<br>> Fax: +880 2 8118230<br>> Cell: +8801916255449<br><br><br></div></div></div></div>_______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>http://gradsusr.org/mailman/listinfo/gradsusr<br></blockquote></div><br><div apple-content-edited="true"> <div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 12px; "><div>--</div><div>Jennifer M. Adams</div><div>IGES/COLA</div><div>4041 Powder Mill Road, Suite 302</div><div>Calverton, MD 20705</div><div><a href="mailto:jma@cola.iges.org">jma@cola.iges.org</a></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></div> </div><br></div></body></html>