Yi-Chih,<br>For my second suggestion, just define the variable as a dummy value first. <br><br>define uave = 0<br>define vave = 0<br><br>I think set defval will then overwrite the data.<br><br>Jeff<br><br><div class="gmail_quote">
On Wed, Nov 9, 2011 at 3:41 PM, Yi-Chih Huang <span dir="ltr"><<a href="mailto:dscpln@gmail.com">dscpln@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Jeff,<br><br> 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?<br><br> Thanks,<br><br> Yi-Chih<br>
<br>###############################################<br>ga-> define uave = aave(u, x=65, x=93, y=37, y=65)<br>Define memory allocation size = 8 bytes<br>ga-> define vave = aave(v, x=65, x=93, y=37, y=65)<br>Define memory allocation size = 8 bytes<br>
ga-> set gxout vector<br>ga-> d uave;vave<br>Result value = 0.995036<br><br>###############################################<br>ga-> <a href="http://test.gs" target="_blank">test.gs</a><br>Warning: defined name not found<br>
Warning: defined name not found<br>
Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>
Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>
Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>
Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>
Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>
Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>
Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>
Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>Warning: defined name not found<br>
Syntax Error: Invalid Operand <br> 'u_value' not a variable or function name<br> Error ocurred at column 1<br>DISPLAY error: Invalid expression <br> Expression = u_value<br><br><br><div class="gmail_quote">On Wed, Nov 9, 2011 at 3:55 PM, Jeffrey Duda <span dir="ltr"><<a href="mailto:jdduda@iastate.edu" target="_blank">jdduda@iastate.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">Yi-Chih,<br>The two things I would try are:<br>1) Instead of displaying the areal average using "d aave...", try defining the variable as the output of aave like this:<br>
"define uave = aave(u, x=65, x=93, y=37, y=65)"<br>
"define vave = aave(v, x=65, x=93, y=37, y=65)"<br>"set gxout vector"<br>"d uave;vave"<br><br>2) If (1) doesn't work, use the <a href="http://www.iges.org/grads/gadoc/gradcomdsetdefval.html" target="_blank">set defval</a> 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:<br>
ii = 65<br>jj = 37<br>ii_max = 93<br>jj_max = 65<br>'d aave(u, x=65, x=93, y=37, y=65)'<br>u_value = subwrd(result,4)<br>'d aave(v, x=65, x=93, y=37, y=65)'<br>v_value = subwrd(result,4)<br>while (ii <= ii_max)<br>
while (jj <= jj_max)<br> 'set defval uave 'ii' 'jj' 'u_value<br> 'set defval vave 'ii' 'jj' v_value<br> jj = jj + 1<br> endwhile<br> ii = ii + 1<br>endwhile<br>
<br>'d uave;vave'<br><br>Jeff Duda<br><br><div class="gmail_quote"><div><div></div><div>On Tue, Nov 8, 2011 at 10:50 AM, Yi-Chih Huang <span dir="ltr"><<a href="mailto:dscpln@gmail.com" target="_blank">dscpln@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex"><div><div></div><div>
Hello,<br><br> 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?<br>
<br>ga-> d aave(u, x=65, x=93, y=37, y=65);aave(v, x=65, x=93, y=37, y=65)<br>Result value = -3.55342<br>ga-> d amean(u, x=65, x=93, y=37, y=65);amean(v, x=65, x=93, y=37, y=65)<br>Result value = -3.56684<br>ga-> d ave(u, x=65, x=93, y=37, y=65);ave(v, x=65, x=93, y=37, y=65)<br>
Error from AVE: Invalid option flags<br>Operation Error: Error from ave function<br> Error ocurred at column 1<br>DISPLAY error: Invalid expression<br> Expression = ave(u,x=65,x=93,y=37,y=65)<br><br> Thanks much,<br>
<br> Yi-Chih<br>
<br></div></div>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><font color="#888888"><br><br clear="all"><br>-- <br>Jeff Duda<br>Iowa State University<br>Meteorology Graduate Student<br><a href="http://www.meteor.iastate.edu/%7Ejdduda" target="_blank">www.meteor.iastate.edu/~jdduda</a><br>
</font><br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br>
<br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Jeff Duda<br>Grad student - PhD, Meteorology<br>University of Oklahoma School of Meteorology - Center for Analysis and Prediction of Storms<br><br>