<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">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() ...&nbsp;</div>
        <div><br>
        </div>
        <div>Anyway, I don't understand what you wanted to calculate.&nbsp;<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">&lt;<a moz-do-not-send="true"
              href="mailto:ivtoman@inet.hr" target="_blank">ivtoman@inet.hr</a>&gt;</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>
                        &nbsp;&nbsp;&nbsp;&nbsp; -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.&nbsp; 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">&lt;<a
                            moz-do-not-send="true"
                            href="mailto:ivtoman@inet.hr"
                            target="_blank">ivtoman@inet.hr</a>&gt;</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"
                            target="_blank">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></fieldset>
                    <br>
                    <pre>_______________________________________________
gradsusr mailing list
<a moz-do-not-send="true" href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>
<a moz-do-not-send="true" 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 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>
            <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>
  </body>
</html>