<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi, Eric -- <div>The coll2gr function is somewhat of a one-trick pony. You can only use it with display, and it doesn't play well with the other functions. This is because it has a requirement that the Z axis must be varying and operations (such as define) have a built-in protocol where the Z dimension gets fixed and the Z-varying result is constructed one level at a time (something like an internal zloop function). I think the only workaround would be to try to write out your cross-section as an ascii file and then bring it back into grads as proper grid. Also, you use 'lon1' and 'lon2' in your arguments to the ave function, but the X dimension of your cross section is not longitdue, it is an abstract X, with a size equal to the the number of profiles in your cross section. </div><div>--Jennifer</div><div><br></div><div><br><div><div>On Aug 1, 2014, at 10:49 AM, Eric Aligo wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<div bgcolor="#FFFFFF" text="#000000">
<font size="+1"><tt>Hi,<br>
<br>
I plot an arbitrary cross section using the collect and coll2gr
commands. I would like to take an average (ave) of a field
along the cross section in order to get a profile of that field,
however, I get error messages when I try to do:<br>
<br>
<br>
'd ave(coll2gr(3,-u),lon='lon1',lon='lon2')'<br>
<br>
Is it not possible to use ave or mean with coll2gr?<br>
<br>
Eric <br>
</tt></font>
<pre class="moz-signature" cols="72">--
Dr. Eric Aligo
I. M. Systems Group, Regional Model Developer
NCEP/EMC
5830 University Research Court
College Park, MD 20740, USA
Phone (301) 683-3686
</pre>
</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>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Jennifer M. Adams<br>Center for Ocean-Land-Atmosphere Studies (COLA)<br>111 Research Hall, Mail Stop 2B3<br>George Mason University<br>4400 University Drive<br>Fairfax, VA 22030 <br><br></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></div></span></span><br class="Apple-interchange-newline">
</div>
<br></div></body></html>