<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    hi Sagar,<br>
    <br>
    the reason why asum and asumg give the same answer is that world
    coordinates (e.g., lat/lon) bounds were on the grid boundary.&nbsp; I
    wrote asumg to ignore if a the world coordinate bound was in the
    middle of a grid box.&nbsp; If it was, then asum would only add half the
    value of that grid box to the sum whereas asumg would add the whole
    value.<br>
    <br>
    best /r Mike <br>
    <br>
    <div class="moz-cite-prefix">On 2012-10-16 19:35 , Sagar Parajuli
      wrote:<br>
    </div>
    <blockquote cite="mid:00c001cdabd5$71634f90$5429eeb0$@utexas.edu"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <meta name="Generator" content="Microsoft Word 14 (filtered
        medium)">
      <!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
      <style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Thank
            you, I just used asumg and it seems that both give the same
            result.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Sincerely,<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#E36C0A">Sagar
            Prasad Parajuli<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#E36C0A">Graduate
            Student/Research Assistant<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#E36C0A">University
            of Texas at Austin<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#E36C0A">Jackson
            School of Geosciences<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#E36C0A">1
            University Station C1100, JGB 5.322<br>
            Austin, TX 78712<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#E36C0A">Contact:
            <a moz-do-not-send="true" href="mailto:psagar@utexas.edu"><span
                style="color:#E36C0A">psagar@utexas.edu</span></a><o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#E36C0A">Cell:
            512 965 4093<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><img
              id="Picture_x0020_1"
              src="cid:part2.07000209.00040607@noaa.gov"
              alt="texas-longhorn-logo" height="40" border="0"
              width="80"><o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">
            <a class="moz-txt-link-abbreviated" href="mailto:gradsusr-bounces@gradsusr.org">gradsusr-bounces@gradsusr.org</a>
            [<a class="moz-txt-link-freetext" href="mailto:gradsusr-bounces@gradsusr.org">mailto:gradsusr-bounces@gradsusr.org</a>] <b>On Behalf Of </b>Jeff
            Duda<br>
            <b>Sent:</b> Tuesday, October 16, 2012 2:27 PM<br>
            <b>To:</b> GrADS Users Forum<br>
            <b>Subject:</b> Re: [gradsusr] summing<o:p></o:p></span></p>
        <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
        <p class="MsoNormal" style="margin-bottom:12.0pt">Sagar,<br>
          Note that asum uses weighting by latitude to account for
          projected grids.&nbsp; If you want to ignore that, use asumg.<br>
          <br>
          Jeff<o:p></o:p></p>
        <div>
          <p class="MsoNormal">On Tue, Oct 16, 2012 at 2:25 PM, Sagar
            Parajuli &lt;<a moz-do-not-send="true"
              href="mailto:psagar@utexas.edu" target="_blank">psagar@utexas.edu</a>&gt;
            wrote:<o:p></o:p></p>
          <div>
            <div>
              <p class="MsoNormal"
                style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Thank
                  you, I didn&#8217;t realize the asum function.</span><o:p></o:p></p>
              <p class="MsoNormal"
                style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
              <p class="MsoNormal"
                style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
              <p class="MsoNormal"
                style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
              <p class="MsoNormal"
                style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Sincerely,</span><o:p></o:p></p>
              <p class="MsoNormal"
                style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
              <p class="MsoNormal"
                style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#E36C0A">Sagar
                  Prasad Parajuli</span><o:p></o:p></p>
              <p class="MsoNormal"
                style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#E36C0A">Graduate
                  Student/Research Assistant</span><o:p></o:p></p>
              <p class="MsoNormal"
                style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#E36C0A">University
                  of Texas at Austin</span><o:p></o:p></p>
              <p class="MsoNormal"
                style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#E36C0A">Jackson
                  School of Geosciences</span><o:p></o:p></p>
              <p class="MsoNormal"
                style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#E36C0A">1
                  University Station C1100, JGB 5.322<br>
                  Austin, TX 78712</span><o:p></o:p></p>
              <p class="MsoNormal"
                style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#E36C0A">Contact:
                  <a moz-do-not-send="true"
                    href="mailto:psagar@utexas.edu" target="_blank"><span
                      style="color:#E36C0A">psagar@utexas.edu</span></a></span><o:p></o:p></p>
              <p class="MsoNormal"
                style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#E36C0A">Cell:
                  512 965 4093</span><o:p></o:p></p>
              <p class="MsoNormal"
                style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><o:p></o:p></p>
              <p class="MsoNormal"
                style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
              <p class="MsoNormal"
                style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">
                  <a moz-do-not-send="true"
                    href="mailto:gradsusr-bounces@gradsusr.org"
                    target="_blank">gradsusr-bounces@gradsusr.org</a>
                  [mailto:<a moz-do-not-send="true"
                    href="mailto:gradsusr-bounces@gradsusr.org"
                    target="_blank">gradsusr-bounces@gradsusr.org</a>] <b>On
                    Behalf Of </b>Jeff Duda<br>
                  <b>Sent:</b> Tuesday, October 16, 2012 2:16 PM<br>
                  <b>To:</b> GrADS Users Forum<br>
                  <b>Subject:</b> Re: [gradsusr] summing</span><o:p></o:p></p>
              <p class="MsoNormal"
                style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
              <p class="MsoNormal"
                style="mso-margin-top-alt:auto;margin-bottom:12.0pt">Sagar,<br>
                Either nest the sum functions or use the asum function
                for areal sums.<br>
                <br>
                Jeff Duda<o:p></o:p></p>
              <div>
                <p class="MsoNormal"
                  style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On
                  Tue, Oct 16, 2012 at 2:11 PM, Sagar Parajuli &lt;<a
                    moz-do-not-send="true"
                    href="mailto:psagar@utexas.edu" target="_blank">psagar@utexas.edu</a>&gt;
                  wrote:<o:p></o:p></p>
                <div>
                  <div>
                    <p class="MsoNormal"
                      style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi,
                      can anyone suggest how to sum the values in a
                      grid. I have to first in t-direction and then in x
                      and y direction.<o:p></o:p></p>
                    <p class="MsoNormal"
                      style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
                    <p class="MsoNormal"
                      style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">define
                      a=sum(dstflxt*area, t=1, t=365)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (summing in
                      t-direction, this works fine)<o:p></o:p></p>
                    <p class="MsoNormal"
                      style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
                    <p class="MsoNormal"
                      style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">define
                      b= sum(a,x=1,x=288,y=1,y=192)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (summing in x
                      and y direction, this doesn&#8217;t work)<o:p></o:p></p>
                    <p class="MsoNormal"
                      style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">d
                      b<o:p></o:p></p>
                    <p class="MsoNormal"
                      style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
                    <p class="MsoNormal"
                      style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">It
                      displays error in sum options.<o:p></o:p></p>
                    <p class="MsoNormal"
                      style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
                    <p class="MsoNormal"
                      style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Please
                      help.<o:p></o:p></p>
                    <p class="MsoNormal"
                      style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
                    <p class="MsoNormal"
                      style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
                    <p class="MsoNormal"
                      style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
                    <p class="MsoNormal"
                      style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Sincerely,<o:p></o:p></p>
                    <p class="MsoNormal"
                      style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
                    <p class="MsoNormal"
                      style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
                        style="color:#E36C0A">Sagar Prasad Parajuli</span><o:p></o:p></p>
                    <p class="MsoNormal"
                      style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
                        style="color:#E36C0A">Graduate Student/Research
                        Assistant</span><o:p></o:p></p>
                    <p class="MsoNormal"
                      style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
                        style="color:#E36C0A">University of Texas at
                        Austin</span><o:p></o:p></p>
                    <p class="MsoNormal"
                      style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
                        style="color:#E36C0A">Jackson School of
                        Geosciences</span><o:p></o:p></p>
                    <p class="MsoNormal"
                      style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
                        style="color:#E36C0A">1 University Station
                        C1100, JGB 5.322<br>
                        Austin, TX 78712</span><o:p></o:p></p>
                    <p class="MsoNormal"
                      style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
                        style="color:#E36C0A">Contact: <a
                          moz-do-not-send="true"
                          href="mailto:psagar@utexas.edu"
                          target="_blank"><span style="color:#E36C0A">psagar@utexas.edu</span></a></span><o:p></o:p></p>
                    <p class="MsoNormal"
                      style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
                        style="color:#E36C0A">Cell: 512 965 4093</span><o:p></o:p></p>
                    <p class="MsoNormal"
                      style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
                  </div>
                </div>
                <p class="MsoNormal"
                  style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><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><o:p></o:p></p>
              </div>
              <p class="MsoNormal"
                style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><span
                  style="color:#888888"><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<o:p></o:p></span></p>
            </div>
          </div>
          <p class="MsoNormal" style="margin-bottom:12.0pt"><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><o:p></o:p></p>
        </div>
        <p class="MsoNormal" style="margin-bottom:12.0pt"><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<o:p></o:p></p>
      </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>