[gradsusr] What's wrong in the script?
hassan quamrul
smquamrul77 at yahoo.com
Mon May 30 10:25:54 EDT 2011
Dear Adams,
Thanks for help. I added the line
S.M.Quamrul Hassan
Meteorologist
Storm Warning Centre
Bangladesh Meteorological Department
Agargaon, Dhaka-1207
Tel: +880 2 9135742
Fax: +880 2 8118230
Cell: +8801916255449
From: Jennifer Adams <jma at cola.iges.org>
To: hassan quamrul <smquamrul77 at yahoo.com>; GrADS Users Forum <gradsusr at gradsusr.org>
Sent: Monday, May 30, 2011 7:53 PM
Subject: Re: [gradsusr] What's wrong in the script?
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.
You have this:
'd rainmax'
>> rainmax=subwrd(result,10)
But you are parsing the output from the display command with 'gxout shaded'. The 'result' variable probably contains something like this:
"Contouring: 0 to 50 interval 5"
and there is no 10th word for subwrd to parse.
Put some statements in your script like:
'say 'rainmax
and you'll see why it's not working.
--Jennifer
On May 30, 2011, at 1:57 AM, hassan quamrul wrote:
No actually it giving error at line 13 (if(rainmax<=10)
>
>
>
>S.M.Quamrul Hassan
>Meteorologist
>Storm Warning Centre
>Bangladesh Meteorological Department
>Agargaon, Dhaka-1207
>Tel: +880 2 9135742
>Fax: +880 2 8118230
>Cell: +8801916255449
>
>From: fadzil mnor <fadzilmnor84 at gmail.com>
>To: hassan quamrul <smquamrul77 at yahoo.com>; GrADS Users Forum <gradsusr at gradsusr.org>
>Sent: Monday, May 30, 2011 11:40 AM
>Subject: Re: [gradsusr] What's wrong in the script?
>
>Line 20.
>Does removing asterisk will solve the prob?
>
>regards,
>Fadzil
>
>On 5/30/11, hassan quamrul <smquamrul77 at yahoo.com> wrote:
>> Dear All,
>>
>> I am trying to plot rainfall from WRF output for different range (say 10 mm
>> to 250mm) for a perticular color cobination colorbar .Please see below the
>> script, but it not working (if statement).
>> What's wrong. Any can help? Please.
>>
>> 'reinit'
>> 'open 2011052900.ctl'
>> 'set display color white'
>> 'c'
>> 'set gxout shaded'
>> 'set mpdset hires'
>> 'set lat 18 28'
>> 'set lon 84 97'
>> 'set t 9'
>> 'define rainmax=max(max(rainc,lon=84,lon=97),lat=18,lat=28)'
>> 'd rainmax'
>> rainmax=subwrd(result,10)
>> if( rainmax=<10 )
>> 'set clevs .1 1 2 4 6 8 10'
>> 'set ccols 0 3 10 7 12 8 2 6 6'
>> endif
>> if(rainmax>10 & <=24)
>> 'set clevs 1 4 8 12 16 20 24'
>> 'set ccols 0 3 10 7 12 8 2 6 6'
>> *endif
>> if(rainmax>24 & <=30)
>> 'set clevs 1 5 10 15 20 25 30'
>> 'set ccols 0 3 10 7 12 8 2 6 6'
>> endif
>> if( rainmax>30 & <=40 )
>> 'set clevs 1 5 10 15 20 30 40'
>> 'set ccols 0 3 10 7 12 8 2 6 6'
>> endif
>> if( rainmax>50 & <=60 )
>> 'set clevs 1 5 10 20 30 40 60'
>> 'set ccols 0 3 10 7 12 8 2 6 6'
>> endif
>> if( rainmax>60 & <=100 )
>> 'set clevs 1 10 20 40 60 80 100'
>> 'set ccols 0 3 10 7 12 8 2 6 6'
>> endif
>> if( rainmax>100 & <=140 )
>> 'set clevs 1 10 20 40 70 100 140'
>> 'set ccols 0 3 10 7 12 8 2 6 6'
>> endif
>> if( rainmax>140 & <=180 )
>> 'set clevs 1 10 20 40 80 120 180'
>> 'set ccols 0 3 10 7 12 8 2 6 6'
>> endif
>> if( rainmax>180 & <=250 )
>> 'set clevs 1 10 20 40 80 160 250'
>> 'set ccols 0 3 10 7 12 8 2 6 6'
>> endif
>> 'd rainmax'
>> 'cbar'
>> 'draw title Rainfall(mm), 00Z,19.08.10 to 00Z,20.08.10'
>> 'printim wrf_rain_2010081900_24.gif'
>>
>>
>> regards.
>>
>>
>> S.M.Quamrul Hassan
>> Meteorologist
>> Storm Warning Centre
>> Bangladesh Meteorological Department
>> Agargaon, Dhaka-1207
>> Tel: +880 2 9135742
>> Fax: +880 2 8118230
>> Cell: +8801916255449
>
>
>_______________________________________________
>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
say 'rainmax
after that it giving the same error but with Non-terminated constant.
What's the problem?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110530/5e4436d9/attachment-0003.html
More information about the gradsusr
mailing list