<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=ISO-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19394">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff text=#000000>
<DIV><FONT size=2 face=Arial>Maybe the correct formula is</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial><FONT size=3 face="Times New Roman">total average =
((averageA1*sizeA1)+(averageA2*sizeA2)+(averageA3*sizeA3))/(3*size)</FONT><BR></FONT></DIV>
<DIV><FONT size=2 face=Arial>where</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>size = <FONT size=3 face="Times New Roman">sizeA2 +
sizeA2 + sizeA2</FONT></FONT></DIV>
<DIV><FONT size=2 face=Arial><FONT size=3
face="Times New Roman"></FONT></FONT> </DIV>
<DIV><FONT size=2 face=Arial><FONT size=3
face="Times New Roman">?</FONT></DIV></FONT>
<DIV><FONT size=2 face=Arial></FONT><BR>Dr. Antonino Claudio Bonan<BR>-----
Original Message ----- </DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B>
<A title=ivtoman@inet.hr href="mailto:ivtoman@inet.hr">Ivan Toman</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=gradsusr@gradsusr.org
href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, September 17, 2013 9:04
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [gradsusr] Averaging over
multiple dimension ranges</DIV>
<DIV><BR></DIV>
<DIV class=moz-cite-prefix>Hello,<BR><BR>Jeff's idea was to find area sizes
with atot function (or asum like I tried). When I know area sizes, I can
weight them in total average from three rectangular areas:<BR><BR>total
average =
((averageA1*sizeA1)+(averageA2*sizeA2)+(averageA3*sizeA3))/3<BR><BR>It looks
to me that logic is valid.<BR><BR>Ivan<BR><BR><BR><BR>On 09/17/2013 08:43 PM,
Kishore Ragi wrote:<BR></DIV>
<BLOCKQUOTE
cite=mid:CAN4rXbQ+dK4QGavgaYLv88p5avPRrABBMB8xvTwvLj0aMdxViA@mail.gmail.com
type="cite">
<DIV dir=ltr>Ivan,
<DIV><BR></DIV>
<DIV>How can you find the area average with asum? If you can do with asum,
the same is with aave()/ave() ... </DIV>
<DIV><BR></DIV>
<DIV>Anyway, I don't understand what you wanted to
calculate. <BR></DIV>
<DIV><BR></DIV>
<DIV>Regards,</DIV>
<DIV><BR></DIV>
<DIV>Kishore</DIV>
<DIV><BR></DIV>
<DIV><BR></DIV></DIV>
<DIV class=gmail_extra><BR><BR>
<DIV class=gmail_quote>On Tue, Sep 17, 2013 at 11:59 PM, Ivan Toman <SPAN
dir=ltr><<A href="mailto:ivtoman@inet.hr" target=_blank
moz-do-not-send="true">ivtoman@inet.hr</A>></SPAN> wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>
<DIV text="#000000" bgcolor="#FFFFFF">
<DIV>Jeff,<BR><BR>Option (2) seems to be a logical approach and very nice
idea. It looks to me that asum() also works OK for "measuring" area sizes,
it is probably accurate enough.<BR><BR>Best regards,<BR>Ivan
<DIV>
<DIV class=h5><BR><BR><BR>On 09/17/2013 06:57 PM, Jeff Duda
wrote:<BR></DIV></DIV></DIV>
<DIV>
<DIV class=h5>
<BLOCKQUOTE type="cite">
<DIV dir=ltr>
<DIV>
<DIV>
<DIV>
<DIV>
<DIV>You could either...<BR><BR></DIV>(1) Knowing the geometry of earth,
set up a math problem and solve for the areas of a sphere bounded by
such latitudinal/longitudinal coordinates to find the areas of those
three regions (I would use spherical
coordinates)<BR><BR></DIV>OR<BR><BR></DIV>(2) -Create a flat field of
ones (e.g., 'define ones =
tmp2m/tmp2m')<BR></DIV> -Use the atot function
(grads 2.0.2+ only) to compute the sum of the ones field over your area,
which I think should give you the area of each region<BR><BR>Then weight
each areal average by the area and compute the final weighted
average.<BR><BR></DIV>I've never tried this, so I'm not 100% sure it
will work and be accurate. I would play around with the atot
function first to see if it really does give you the areas of the
regions.<BR>
<DIV><BR>Jeff Duda<BR></DIV></DIV>
<DIV class=gmail_extra><BR><BR>
<DIV class=gmail_quote>On Tue, Sep 17, 2013 at 11:45 AM, Ivan Toman
<SPAN dir=ltr><<A href="mailto:ivtoman@inet.hr" target=_blank
moz-do-not-send="true">ivtoman@inet.hr</A>></SPAN> wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>Hello,<BR><BR>If I want to find average value over a
lat/lon range, I would
do:<BR><BR>ave(variable,lat=20,lat=21),lon=70,lon=71)<BR><BR><BR>However,
if I want to do average over multiple areas, for example:<BR><BR>Area
1: lat=20,lat=21 ; lon=60,lon=61<BR>Area 2: lat=30,lat=31 ;
lon=70,lon=71<BR>Area 3: lat=40,lat=41 ; lon=80,lon=81<BR><BR>how can
I solve this problem? I can't simply find three area averages,<BR>sum
them together and divide by three, because areas are not the same
sizes.<BR><BR>Thanks for any hint.<BR><BR>Regards,<BR>Ivan
Toman<BR>_______________________________________________<BR>gradsusr
mailing list<BR><A href="mailto:gradsusr@gradsusr.org" target=_blank
moz-do-not-send="true">gradsusr@gradsusr.org</A><BR><A
href="http://gradsusr.org/mailman/listinfo/gradsusr" target=_blank
moz-do-not-send="true">http://gradsusr.org/mailman/listinfo/gradsusr</A><BR></BLOCKQUOTE></DIV><BR><BR
clear=all><BR>-- <BR>Jeff Duda<BR>Graduate research
assistant<BR>University of Oklahoma School of Meteorology<BR>Center for
Analysis and Prediction of Storms<BR></DIV><BR>
<FIELDSET></FIELDSET> <BR><PRE>_______________________________________________
gradsusr mailing list
<A href="mailto:gradsusr@gradsusr.org" target=_blank moz-do-not-send="true">gradsusr@gradsusr.org</A>
<A href="http://gradsusr.org/mailman/listinfo/gradsusr" target=_blank moz-do-not-send="true">http://gradsusr.org/mailman/listinfo/gradsusr</A>
</PRE></BLOCKQUOTE><BR></DIV></DIV></DIV><BR>_______________________________________________<BR>gradsusr
mailing list<BR><A href="mailto:gradsusr@gradsusr.org"
moz-do-not-send="true">gradsusr@gradsusr.org</A><BR><A
href="http://gradsusr.org/mailman/listinfo/gradsusr" target=_blank
moz-do-not-send="true">http://gradsusr.org/mailman/listinfo/gradsusr</A><BR><BR></BLOCKQUOTE></DIV><BR></DIV><BR>
<FIELDSET class=mimeAttachmentHeader></FIELDSET> <BR><PRE wrap="">_______________________________________________
gradsusr mailing list
<A class=moz-txt-link-abbreviated href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</A>
<A class=moz-txt-link-freetext href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</A>
</PRE></BLOCKQUOTE><BR>
<P>
<HR>
<P></P>_______________________________________________<BR>gradsusr mailing
list<BR>gradsusr@gradsusr.org<BR>http://gradsusr.org/mailman/listinfo/gradsusr<BR></BLOCKQUOTE></BODY></HTML>