<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Thanks, Alan. That is the right way to go about this!<div class=""><br class=""></div><div class="">Prashanth<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jan 30, 2018, at 2:40 PM, Alan Brammer <<a href="mailto:abrammer@albany.edu" class="">abrammer@albany.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_default" style="font-family:verdana,sans-serif">to follow up with an important detail here. <br class=""></div><div class="gmail_default" style="font-family:verdana,sans-serif"><div dir="ltr" style="font-family: arial, sans-serif; font-size: 12.800000190734863px;" class=""><br class=""></div><div dir="ltr" style="font-family: arial, sans-serif; font-size: 12.800000190734863px;" class="">Average: <br class="">(a) 0-6 and multiply by the area<br class="">(b) 0-4, and multiply by the area<br class="">(c) subtract: (a) -(b) then divide by ( area a - area b )</div><div style="font-family: arial, sans-serif; font-size: 12.800000190734863px;" class="">e.g. ignoring the fact that the earth is a sphere </div><div style="font-family: arial, sans-serif; font-size: 12.800000190734863px;" class=""><br class=""></div><div style="font-family: arial, sans-serif; font-size: 12.800000190734863px;" class="">outer = dim_avg_n( masked0_6_array, (/0,1/) ) * (pi*6^2) ; some array where we've already masked the data we want, or subset the area we want</div><div dir="ltr" style="font-family: arial, sans-serif; font-size: 12.800000190734863px;" class="">inner = dim_avg_n( masked0_4_array, (/0,1/) ) * (pi*4^2)<br class=""></div><div style="font-family: arial, sans-serif; font-size: 12.800000190734863px;" class="">annulus = ( outer - inner ) / ( (pi*6^2) - (pi*4^2) )</div><div style="font-family: arial, sans-serif; font-size: 12.800000190734863px;" class=""><br class=""></div><div style="font-family: arial, sans-serif; font-size: 12.800000190734863px;" class="">You can cancel all the pi's above for simplicity if desired. . </div><div style="font-family: arial, sans-serif; font-size: 12.800000190734863px;" class=""><br class=""></div><div style="font-family: arial, sans-serif; font-size: 12.800000190734863px;" class="">==============================</div><div style="font-family: arial, sans-serif; font-size: 12.800000190734863px;" class=""><br class=""></div><div style="font-family: arial, sans-serif; font-size: 12.800000190734863px;" class="">To do this with circles rather than squares however you could also use the layout from the Katrina circle script on the below page and add an extra gc_inout() to mask the inner 0 to x km circle. </div><div style="font-family: arial, sans-serif; font-size: 12.800000190734863px;" class="">Then you don't need to worry about areas so much. (Should probably still weight by the latitude though) </div><div style="font-family: arial, sans-serif; font-size: 12.800000190734863px;" class=""><a href="https://www.ncl.ucar.edu/Applications/latlon_subset.shtml" target="_blank" class="">https://www.ncl.ucar.edu/<wbr class="">Applications/latlon_subset.<wbr class="">shtml</a></div><div style="font-family: arial, sans-serif; font-size: 12.800000190734863px;" class=""><br class=""></div><div style="font-family: arial, sans-serif; font-size: 12.800000190734863px;" class=""><br class=""></div><div style="font-family: arial, sans-serif; font-size: 12.800000190734863px;" class=""><br class=""></div><div style="font-family: arial, sans-serif; font-size: 12.800000190734863px;" class=""><br class=""></div><div class=""><br class=""></div></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Jan 29, 2018 at 10:31 PM, Dennis Shea via ncl-talk <span dir="ltr" class=""><<a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">Average: <br class="">(a) 0-6 <br class="">(b) 0-4, <br class="">(c) subtract: (a)-(b)<br class=""></div><div class="gmail_extra"><br class=""><div class="gmail_quote"><div class=""><div class="h5">On Mon, Jan 29, 2018 at 11:23 AM, Prashanth Bhalachandran via ncl-talk <span dir="ltr" class=""><<a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a>></span> wrote:<br class=""></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><div class="h5"><div link="blue" vlink="#954F72" lang="EN-US" class=""><div class="m_8131482382059315766m_2937415845448223556WordSection1"><p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Bell MT",serif" class="">Dear NCL’ers,<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Bell MT",serif" class="">I have a question regarding the computation of winds in an annulus. <u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Bell MT",serif" class=""><u class=""></u> <u class=""></u></span></p><p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Bell MT",serif" class="">That is, say I have a center lat and lon : cenlat, cenlon <u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Bell MT",serif" class="">limit = 2 ; In degrees <u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Bell MT",serif" class=""> b1 = cenlat-limit<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Bell MT",serif" class=""> b2 = cenlat+limit<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Bell MT",serif" class=""> b3 = cenlon-limit<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Bell MT",serif" class=""> b4 = cenlon+limit<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><u class=""></u> <u class=""></u></p><p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Bell MT",serif" class="">This is what I use if want to average the winds in a box that <b class="">is 2 degrees on either side of the center</b> (4 degree x 4degree n total). <u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria Math",serif" class="">uav = dim_avg_n(dim_avg_n(uu(tcount,<wbr class="">:,{b1:b2},{b3:b4}),2),1)<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria Math",serif" class=""><u class=""></u> <u class=""></u></span></p><p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria Math",serif" class="">However, what I am now interested in is averaging around an <b class="">annulus</b> (say between 4 degrees to 6 degrees from the center of the hurricane). What is the best way to do that? <u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria Math",serif" class=""><u class=""></u> <u class=""></u></span></p><p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria Math",serif" class="">Thank you, <u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria Math",serif" class="">Prashanth <u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria Math",serif" class=""><u class=""></u> <u class=""></u></span></p></div></div><br class=""></div></div>______________________________<wbr class="">_________________<br class="">
ncl-talk mailing list<br class="">
<a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a><br class="">
List instructions, subscriber options, unsubscribe:<br class="">
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank" class="">http://mailman.ucar.edu/mailma<wbr class="">n/listinfo/ncl-talk</a><br class="">
<br class=""></blockquote></div><br class=""></div>
<br class="">______________________________<wbr class="">_________________<br class="">
ncl-talk mailing list<br class="">
<a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a><br class="">
List instructions, subscriber options, unsubscribe:<br class="">
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank" class="">http://mailman.ucar.edu/<wbr class="">mailman/listinfo/ncl-talk</a><br class="">
<br class=""></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>