[gradsusr] How to use ave with coll2gr
Jennifer Adams
jma at cola.iges.org
Sun Aug 10 09:31:24 EDT 2014
Hi, Eric --
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.
--Jennifer
On Aug 1, 2014, at 10:49 AM, Eric Aligo wrote:
> Hi,
>
> 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:
>
>
> 'd ave(coll2gr(3,-u),lon='lon1',lon='lon2')'
>
> Is it not possible to use ave or mean with coll2gr?
>
> Eric
> --
> 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
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
--
Jennifer M. Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
111 Research Hall, Mail Stop 2B3
George Mason University
4400 University Drive
Fairfax, VA 22030
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20140810/de7c3dc6/attachment.html
More information about the gradsusr
mailing list