[gradsusr] plot the average wind vector
Jeff Duda
jeffduda319 at gmail.com
Wed Nov 9 16:48:44 EST 2011
Yi-Chih,
For my second suggestion, just define the variable as a dummy value first.
define uave = 0
define vave = 0
I think set defval will then overwrite the data.
Jeff
On Wed, Nov 9, 2011 at 3:41 PM, Yi-Chih Huang <dscpln at gmail.com> wrote:
> Jeff,
>
> Thanks much for the response. However, both ways are not working as
> follows. I am wondering why it is so hard to show the average wind vectors?
>
> Thanks,
>
> Yi-Chih
>
> ###############################################
> ga-> define uave = aave(u, x=65, x=93, y=37, y=65)
> Define memory allocation size = 8 bytes
> ga-> define vave = aave(v, x=65, x=93, y=37, y=65)
> Define memory allocation size = 8 bytes
> ga-> set gxout vector
> ga-> d uave;vave
> Result value = 0.995036
>
> ###############################################
> ga-> test.gs
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Warning: defined name not found
> Syntax Error: Invalid Operand
> 'u_value' not a variable or function name
> Error ocurred at column 1
> DISPLAY error: Invalid expression
> Expression = u_value
>
>
> On Wed, Nov 9, 2011 at 3:55 PM, Jeffrey Duda <jdduda at iastate.edu> wrote:
>
>> Yi-Chih,
>> The two things I would try are:
>> 1) Instead of displaying the areal average using "d aave...", try
>> defining the variable as the output of aave like this:
>> "define uave = aave(u, x=65, x=93, y=37, y=65)"
>> "define vave = aave(v, x=65, x=93, y=37, y=65)"
>> "set gxout vector"
>> "d uave;vave"
>>
>> 2) If (1) doesn't work, use the set defval<http://www.iges.org/grads/gadoc/gradcomdsetdefval.html>command to individually set the value of the component fields by using the
>> two aave commands, one for each component. That is, try something like:
>> ii = 65
>> jj = 37
>> ii_max = 93
>> jj_max = 65
>> 'd aave(u, x=65, x=93, y=37, y=65)'
>> u_value = subwrd(result,4)
>> 'd aave(v, x=65, x=93, y=37, y=65)'
>> v_value = subwrd(result,4)
>> while (ii <= ii_max)
>> while (jj <= jj_max)
>> 'set defval uave 'ii' 'jj' 'u_value
>> 'set defval vave 'ii' 'jj' v_value
>> jj = jj + 1
>> endwhile
>> ii = ii + 1
>> endwhile
>>
>> 'd uave;vave'
>>
>> Jeff Duda
>>
>> On Tue, Nov 8, 2011 at 10:50 AM, Yi-Chih Huang <dscpln at gmail.com> wrote:
>>
>>> Hello,
>>>
>>> I am trying to plot the average wind vector over a horizontal
>>> range. But I can't get an arrow, but only a value at most as below. Could
>>> anyone tell me the right commands to show the average wind vector over a
>>> horizontal range?
>>>
>>> ga-> d aave(u, x=65, x=93, y=37, y=65);aave(v, x=65, x=93, y=37, y=65)
>>> Result value = -3.55342
>>> ga-> d amean(u, x=65, x=93, y=37, y=65);amean(v, x=65, x=93, y=37, y=65)
>>> Result value = -3.56684
>>> ga-> d ave(u, x=65, x=93, y=37, y=65);ave(v, x=65, x=93, y=37, y=65)
>>> Error from AVE: Invalid option flags
>>> Operation Error: Error from ave function
>>> Error ocurred at column 1
>>> DISPLAY error: Invalid expression
>>> Expression = ave(u,x=65,x=93,y=37,y=65)
>>>
>>> Thanks much,
>>>
>>> Yi-Chih
>>>
>>> _______________________________________________
>>> gradsusr mailing list
>>> gradsusr at gradsusr.org
>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>
>>>
>>
>>
>> --
>> Jeff Duda
>> Iowa State University
>> Meteorology Graduate Student
>> www.meteor.iastate.edu/~jdduda <http://www.meteor.iastate.edu/%7Ejdduda>
>>
>> _______________________________________________
>> 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
>
>
--
Jeff Duda
Grad student - PhD, Meteorology
University of Oklahoma School of Meteorology - Center for Analysis and
Prediction of Storms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20111109/fa9dd0bf/attachment-0003.html
More information about the gradsusr
mailing list