<div dir="ltr">Hi Geeta,<div><br></div><div>Only *you* can tell us if you're using the weighted averaging function correctly. If it works, then you are using the correct technique to use the function. However, if you want to weight the average by area, I believe you are not using it correctly and need to consider a weighting by latitude to account for the shrinking area as your y (lat) coordinate increases.</div><div><br></div><div>I have no idea what the function 'aave' is supposed to do in grads - you need to provide more details if you want to duplicate those results - but I assume it might be an areal-average calculation with similar weighting considerations to what I mentioned above.</div><div><br></div><div>Reply back to the list with any further questions...</div><div><br></div><div><br></div><div>Kyle</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr">----------------------------------------<div>Kyle S. Griffin</div><div>Department of Atmospheric and Oceanic Sciences</div><div>University of Wisconsin - Madison</div><div>Room 1421</div><div>1225 W Dayton St, Madison, WI 53706</div><div>Email: <a href="mailto:ksgriffin2@wisc.edu" target="_blank">ksgriffin2@wisc.edu</a></div></div></div></div>
<br><div class="gmail_quote">On Fri, Nov 14, 2014 at 4:39 AM, Geeta Geeta <span dir="ltr"><<a href="mailto:geetag54@yahoo.com" target="_blank">geetag54@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,Sans-Serif;font-size:12px"><div dir="ltr"><span>Hi. <br></span></div><div dir="ltr"><span>i want to clarify a doubt regarding the computation of average rainfall for a domain say, 9-22N/74-87E. <br></span></div><div dir="ltr"><span><br></span></div><div dir="ltr"><span>for this I am using following script. <br></span></div><div dir="ltr"><span>begin<br>fili = "<a href="http://model24_2011060100.nc" target="_blank">model24_2011060100.nc</a>" ; file<br>;***************************************************************<br> <br>f = addfile (fili, "r")<br> <br>data=f->APCP_24(:,:)<br>printVarSummary(data)<br> <br>rf_averg=wgt_areaave(data,1.0,1.0,0)<br>print(rf_averg)<br><br>So NCL gives me the areaaverf of 6.40mm. <br></span></div><div dir="ltr"><span>OUTPUT:--------------------------------------------------<br></span></div><div dir="ltr"><span>bash-3.2$ ncl mdlrf.ncl<br> Copyright (C) 1995-2007 - All Rights Reserved<br> University Corporation for Atmospheric Research<br> NCAR Command Language Version 5.0.0<br> The use of this software is governed by a License Agreement.<br> See <a href="http://www.ncl.ucar.edu/" target="_blank">http://www.ncl.ucar.edu/</a> for more details.<br> <br> <br>Variable: data<br>Type: float<br>Total Size: 106276 bytes<br> 26569 values<br>Number of Dimensions: 2<br>Dimensions and sizes: [lat | 163] x [lon | 163]<br>Coordinates:<br>Number Of Attributes: 12<br> name : APCP<br> long_name : Total precipitation<br> level : A24<br> units : kg/m^2<br> grib_code : 61<br> _FillValue : -9999<br> init_time : 20110601_000000<br> init_time_ut : 1306886400<br> valid_time : 20110602_030000<br> valid_time_ut : 1306983600<br> accum_time : 240000<br> accum_time_sec : 86400<br> <br> <br>Variable: rf_averg<br>Type: float<br>Total Size: 4 bytes<br> 1 values<br>Number of Dimensions: 1<br>Dimensions and sizes: [1]<br>Coordinates:<br>Number Of Attributes: 1<br> _FillValue : -9999<br>(0) 6.400823<br>bash-3.2$<br></span></div><div dir="ltr"><br><span></span></div><div dir="ltr"><br><span></span></div><div dir="ltr"><span>I have two questions pertaining to this. <br></span></div><div dir="ltr"><span>1. is the usage of the function </span><span>wgt_areaave Correct. <br></span></div><div dir="ltr"><span>2. when I calculate the areal average using the function aave of grads <br></span></div><div dir="ltr"><span>ga-> define x1= APCPsfc.1-APCPsfc.2<br>Define memory allocation size = 106928 bytes<br>ga-> d aave(x1,lon=74,lon=87,lat=9,lat=22)<br>Result value = 6.68369<br></span></div><div dir="ltr"><span>There is discrepancy in the results. <br></span></div><div dir="ltr"><br><span></span></div><div dir="ltr"><span>kindly guide me towards right direction. </span></div><span class="HOEnZb"><font color="#888888"><div dir="ltr"><span>Geeta<br></span></div><div> </div></font></span></div></div><br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>