<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:12px"><div dir="ltr" id="yui_3_16_0_1_1415941430844_7248"><span>Hi. <br></span></div><div id="yui_3_16_0_1_1415941430844_7264" dir="ltr"><span id="yui_3_16_0_1_1415941430844_7263">i want to clarify a doubt regarding the computation of average rainfall for a domain say, 9-22N/74-87E. <br></span></div><div id="yui_3_16_0_1_1415941430844_7265" dir="ltr"><span><br></span></div><div id="yui_3_16_0_1_1415941430844_7340" dir="ltr"><span id="yui_3_16_0_1_1415941430844_7339">for this I am using following script. <br></span></div><div id="yui_3_16_0_1_1415941430844_7337" dir="ltr"><span id="yui_3_16_0_1_1415941430844_7338">begin<br style="" class="">fili&nbsp;&nbsp;&nbsp; = "model24_2011060100.nc"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; file<br style="" class="">;***************************************************************<br style="" class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br style="" class="">rf_averg=wgt_areaave(data,1.0,1.0,0)<br style="" class="">print(rf_averg)<br style="" class=""><br style="" class="">So NCL gives me the areaaverf of 6.40mm. <br></span></div><div id="yui_3_16_0_1_1415941430844_12081" dir="ltr"><span id="yui_3_16_0_1_1415941430844_7338">OUTPUT:--------------------------------------------------<br></span></div><div id="yui_3_16_0_1_1415941430844_12070" dir="ltr"><span id="yui_3_16_0_1_1415941430844_7338">bash-3.2$ ncl mdlrf.ncl<br style="" class="">&nbsp;Copyright (C) 1995-2007 - All Rights Reserved<br style="" class="">&nbsp;University Corporation for Atmospheric Research<br style="" class="">&nbsp;NCAR Command Language Version 5.0.0<br style="" class="">&nbsp;The use of this software is governed by a License Agreement.<br style="" class="">&nbsp;See http://www.ncl.ucar.edu/ for more details.<br style="" class="">&nbsp;<br style="" class="">&nbsp;<br style="" class="">Variable: data<br style="" class="">Type: float<br style="" class="">Total Size: 106276 bytes<br style="" class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 26569 values<br style="" class="">Number of Dimensions: 2<br style="" class="">Dimensions and sizes:&nbsp;&nbsp; [lat | 163] x [lon | 163]<br style="" class="">Coordinates:<br style="" class="">Number Of Attributes: 12<br style="" class="">&nbsp; name :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; APCP<br style="" class="">&nbsp; long_name :&nbsp;&nbsp; Total precipitation<br style="" class="">&nbsp; level :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A24<br style="" class="">&nbsp; units :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kg/m^2<br style="" class="">&nbsp; grib_code :&nbsp;&nbsp; 61<br style="" class="">&nbsp; _FillValue :&nbsp; -9999<br style="" class="">&nbsp; init_time :&nbsp;&nbsp; 20110601_000000<br style="" class="">&nbsp; init_time_ut :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1306886400<br style="" class="">&nbsp; valid_time :&nbsp; 20110602_030000<br style="" class="">&nbsp; valid_time_ut :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1306983600<br style="" class="">&nbsp; accum_time :&nbsp; 240000<br style="" class="">&nbsp; accum_time_sec :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 86400<br style="" class="">&nbsp;<br style="" class="">&nbsp;<br style="" class="">Variable: rf_averg<br style="" class="">Type: float<br style="" class="">Total Size: 4 bytes<br style="" class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 values<br style="" class="">Number of Dimensions: 1<br style="" class="">Dimensions and sizes:&nbsp;&nbsp; [1]<br style="" class="">Coordinates:<br style="" class="">Number Of Attributes: 1<br style="" class="">&nbsp; _FillValue :&nbsp; -9999<br style="" class="">(0)&nbsp;&nbsp;&nbsp;&nbsp; 6.400823<br style="" class="">bash-3.2$<br style="" class=""></span></div><div id="yui_3_16_0_1_1415941430844_12073" dir="ltr"><br><span id="yui_3_16_0_1_1415941430844_7338"></span></div><div id="yui_3_16_0_1_1415941430844_12074" dir="ltr"><br><span id="yui_3_16_0_1_1415941430844_7338"></span></div><div id="yui_3_16_0_1_1415941430844_12075" dir="ltr"><span id="yui_3_16_0_1_1415941430844_7338">I have two questions pertaining to this. <br></span></div><div id="yui_3_16_0_1_1415941430844_12076" dir="ltr"><span style="" class="" id="yui_3_16_0_1_1415941430844_7338">1. is the usage of the function&nbsp; </span><span style="" class="" id="yui_3_16_0_1_1415941430844_7338">wgt_areaave Correct. <br></span></div><div id="yui_3_16_0_1_1415941430844_12094" dir="ltr"><span style="" class="" id="yui_3_16_0_1_1415941430844_7338">2. when I calculate the areal average using the function aave of grads <br></span></div><div id="yui_3_16_0_1_1415941430844_12120" dir="ltr"><span style="" class="" id="yui_3_16_0_1_1415941430844_7338">ga-&gt; define x1= APCPsfc.1-APCPsfc.2<br style="" class="">Define memory allocation size = 106928 bytes<br style="" class="">ga-&gt; d aave(x1,lon=74,lon=87,lat=9,lat=22)<br style="" class="">Result value = 6.68369<br style="" class=""></span></div><div id="yui_3_16_0_1_1415941430844_12104" dir="ltr"><span style="" class="" id="yui_3_16_0_1_1415941430844_7338">There is discrepancy in the results. <br></span></div><div id="yui_3_16_0_1_1415941430844_12103" dir="ltr"><br><span style="" class="" id="yui_3_16_0_1_1415941430844_7338"></span></div><div id="yui_3_16_0_1_1415941430844_12102" dir="ltr"><span style="" class="" id="yui_3_16_0_1_1415941430844_7338">kindly guide me towards right direction.&nbsp;</span></div><div dir="ltr"><span style="" class="" id="yui_3_16_0_1_1415941430844_7338">Geeta<br></span></div><div id="yui_3_16_0_1_1415941430844_7247">&nbsp;</div></div></body></html>