[gradsusr] Hello to all users of Grads
avi kojokro
kojokroavi at gmail.com
Wed Jul 10 14:00:03 EDT 2013
Someone?
2013/7/9 avi kojokro <kojokroavi at gmail.com>
> Oops
>
> My mistake, I forgot to attach the script: So here's the script in
> question:
>
>
>
>
>
>
>
> 'reinit'
>
> 'reset'
>
> 'set xsize 650 500'
>
> 'set display color white'
>
> 'c'
>
> prompt 'Enter date yyyymmdd '
>
> pull date
>
> prompt 'Enter hour hh '
>
> pull hour
>
> f= '
> http://nomads.ncep.noaa.gov:9090/dods/gens_bc/gens'date'/gep_all_'hour'z'
>
> 'sdfopen 'f
>
> prompt 'lat:'
>
> pull lat
>
> prompt 'lon:'
>
> pull lon
>
> prompt 'variable:'
>
> pull v1
>
> prompt 'level:'
>
> pull l1
>
> prompt 'min:'
>
> pull min
>
> prompt 'max:'
>
> pull max
>
> 'set lat 'lat''
>
> 'set lon 'lon''
>
> 'set t 1 65'
>
> 'set lev 'l1''
>
> 'set vrange 'min1' 'max1''
>
> 'set e 1'
>
> s1='sum('v1',e=1,e=21)'
>
> s2='sum('v1'*'v1',e=1,e=21)'
>
> s3='sqrt(('s2'-'s1'*'s1'/21)/20)'
>
> 'set gxout line'
>
> 'set ccolor 1'
>
> 'set cmark 0'
>
> 'set cthick 15'
>
> 'd 's1'/21'
>
> 'set gxout bar'
>
> 'set bargap 50'
>
> 'set ccolor 2'
>
> 'd 's1'/21+'s3';'s1'/21-'s3''
>
> 'set t 1'
>
> 'q time'
>
> ctime = subwrd(result,3)
>
> chour = substr(ctime,1,3)
>
> cday = substr(ctime,4,9)
>
> 'set string 1'
>
> 'set strsiz 0.15'
>
> 'draw string 2.5 0.3 ensemble mean'
>
> 'set string 2'
>
> 'draw string 7 0.3 standard deviation'
>
> 'set string 4'
>
> 'set strsiz 0.2'
>
> 'draw string 3.5 8.1 'v1' standard deviation level 'l1''
>
> 'set string 1'
>
> 'set strsize 0.15'
>
> 'draw string 0.5 8.1 N'lat' E'lon''
>
> 'printim std.png x1000 y700'
>
> 'end'
>
>
>
> 2013/7/9 Mohsen Soltani <soltani.clima at gmail.com>
>
>> Hi Avi,
>>
>> I'm not quite sure what to say about your script. But you may use the
>> following commands to draw average trend+ boxes of standard deviation for
>> your variable.
>>
>> ****************
>> var='slp/100'
>> minlat='36'
>> maxlat='37'
>> minlon='49'
>> maxlon='55'
>> tlast=28
>> 'set x 1'
>> 'set y 1'
>> 'set t 1 'tlast
>> 'define mean =
>> tloop(aave('var',lon='minlon',lon='maxlon',lat='minlat',lat='maxlat'))'
>> 'define pstd = mean +
>> tloop(aave(sqrt(pow('var'-mean,2)),lon='minlon',lon='maxlon',lat='minlat',lat='maxlat'))'
>> 'define mstd = mean -
>> tloop(aave(sqrt(pow('var'-mean,2)),lon='minlon',lon='maxlon',lat='minlat',lat='maxlat'))'
>> 'set vrange 1004 1028'
>> 'set t 0.28 'tlast+0.28
>> 'set gxout bar'
>> 'd mstd;pstd'
>> 'set gxout line'
>> 'd mean'
>> **************************
>> The attached is the output of the above commands. As you sea, I used SLP
>> variable for a period of time in my work. But, you can apply it for any
>> variable at different levels of the atmosphere.
>>
>> Hope you find it useful!
>>
>> Mohsen
>>
>> --
>> April showers bring May flowers!
>> --
>> *Mohsen Soltani, M.Sc.*
>> Climatology Grad Student,
>> Department of Climatology, Faculty of Geography,
>> University of Tehran, Tehran, Iran
>> voice: (+98) 9119772934
>> e-mail: soltani.clima at gmail.com
>>
>>
>> On Tue, Jul 9, 2013 at 1:44 AM, avi kojokro <kojokroavi at gmail.com> wrote:
>>
>>> I have a script of the Ensemble Average + standard deviation, I want to
>>> make this line to be automatically:
>>>
>>> 'set vrange 'min1' 'max1''
>>>
>>> To do something similar to these lines:
>>>
>>>
>>> 'set lev 500'
>>> 'set t 1'
>>> 'define mx=max(hgtprs,t=1,t=65)'
>>> 'd mx'
>>> m1=subwrd(result,4)
>>> 'set lev 500'
>>> 'define mn=min(hgtprs,t=1,t=65)'
>>> 'd mn'
>>> m2=subwrd(result,4)
>>> 'set lev 500'
>>> 'set vrange 'm2-1' 'm1+1
>>>
>>> But I can not attach these lines to the script.
>>> Maybe someone know if i can arrange the script properly?
>>>
>>> I use Windows, and version of Grads 2.0.a9.
>>>
>>> Thanks
>>> Avi.
>>>
>>> _______________________________________________
>>> gradsusr mailing list
>>> gradsusr at gradsusr.org
>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>
>>>
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130710/b9466cfc/attachment-0003.html
More information about the gradsusr
mailing list