<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">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">
<div bgcolor="#FFFFFF" text="#000000">
<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">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 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>
</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">gradsusr@gradsusr.org</a>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">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">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></div>