<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">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<br>
<br>
<br>
On 09/17/2013 06:57 PM, Jeff Duda wrote:<br>
</div>
<blockquote
cite="mid:CAAig09Au6Nc6Z21wkoA3k0ktY9W-kbo6sHNiUxn_pvQQbK37sg@mail.gmail.com"
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 moz-do-not-send="true"
href="mailto:ivtoman@inet.hr" target="_blank">ivtoman@inet.hr</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">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 moz-do-not-send="true"
href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a moz-do-not-send="true"
href="http://gradsusr.org/mailman/listinfo/gradsusr"
target="_blank">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 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>
</body>
</html>