<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Shouldn’t the coordinate subscripting do the same thing? <div class="">Like say <font face="Menlo" class="">{lat13-2:lat13+2, lon80-2:lon80+2}</font></div><div class=""><div class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="Apple-interchange-newline">Guido Cioni</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://guidocioni.altervista.org" class="">http://guidocioni.altervista.org</a> </div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On 26 Jan 2016, at 15:04, Karin Meier-Fleischer <<a href="mailto:meier-fleischer@dkrz.de" class="">meier-fleischer@dkrz.de</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<meta content="text/html; charset=windows-1252" http-equiv="Content-Type" class="">
<div bgcolor="#FFFFFF" text="#000000" class="">
Hi Krishna,<br class="">
<br class="">
you can use the function <b class=""><tt class="">closest_val</tt></b> to retrieve an
index of an value.<br class="">
<br class="">
<tt class=""> lat13 = closest_val(13,lat)</tt><tt class=""><br class="">
</tt><tt class=""> lon80 = closest_val(80,lon)</tt><br class="">
<br class="">
<tt class=""> print("Index: "+lat13+" - "+lat(lat13))</tt><tt class=""><br class="">
</tt><tt class=""> print("Index: "+lon80+" - "+lon(lon80))</tt><br class="">
<br class="">
To plot 2 more grid boxes of lat/lon than you can use e.g.<br class="">
<br class="">
<tt class=""> plot = gsn_csm_contour_map(wks,
var(lat13-2:lat13+2,lon80-2:lon80+2),res)</tt><br class="">
<br class="">
<br class="">
Bye,<br class="">
Karin<br class="">
<br class="">
<div class="moz-cite-prefix">Am 26.01.16 um 14:13 schrieb Krishna C:<br class="">
</div>
<blockquote cite="mid:CAPtvbpvETbPM7KnKA0qcq9f1se6Z5nPfdtbe+LUwVZHVCX9F1w@mail.gmail.com" type="cite" class="">
<div dir="ltr" class="">
<div class="">Hi <br class="">
<br class="">
<br class="">
</div>
<div class="">Let us say i need a 2 by 2 box around 13 degree lat and 80
degree lon . How do i know the respective indices.<br class="">
</div>
<div class="">Please correct if i am wrong. <br class="">
</div>
</div>
<div class="gmail_extra"><br clear="all" class="">
<div class="">
<div class="gmail_signature">
<div dir="ltr" class="">
<div style="text-align:left" class=""><font size="2" class=""><span style="font-family:times new roman,serif" class=""><font size="2" class="">R</font>egards<br class="">
</span></font></div>
<div style="text-align:left" class=""><font face="verdana,sans-serif" class=""><font size="2" class=""><span style="font-family:times new roman,serif" class="">-Krishna-</span></font></font><br class="">
</div>
</div>
</div>
</div>
<br class="">
<div class="gmail_quote">On Tue, Jan 26, 2016 at 5:14 PM, Guido
Cioni <span dir="ltr" class=""><<a moz-do-not-send="true" href="mailto:guidocioni@gmail.com" target="_blank" class="">guidocioni@gmail.com</a>></span>
wrote:<br class="">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr" class="">Yes there is, but you should have a look at the
documentation on the page ;-)<br class="">
The function that you need is dim_avg_n, then you just
need to restrict the latitude and longitude with brackets
{43:45}. Again, just go on ncl documentation and you'll
definitely find a way </p>
<div class="gmail_quote">
<div class="">
<div class="h5">Il 26 gen 2016 11:52 AM, "Krishna C"
<<a moz-do-not-send="true" href="mailto:chandrakrishna.90@gmail.com" target="_blank" class="">chandrakrishna.90@gmail.com</a>>
ha scritto:<br type="attribution" 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 dir="ltr" class="">
<div class="">
<div class="">Hi,<br class="">
<br class="">
<br class="">
</div>
I am trying to extract precipitation values from
WRF output, over a small 2 by 2 lat lon box and
average it. Is there any explicit way of doing
it in ncl<br class="">
<br class="">
</div>
<div class="">With warm regards<br class="">
<br class="">
</div>
<div class="">
<div class="">
<div class="">
<div class="">
<div class="">
<div class="">
<div dir="ltr" class="">
<div style="text-align:left" class=""><font size="2" class=""><span style="font-family:times new
roman,serif" class=""><br class="">
</span></font></div>
<div style="text-align:left" class=""><font face="verdana,sans-serif" class=""><font size="2" class=""><span style="font-family:times new
roman,serif" class="">-Krishna-</span></font></font><br class="">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br class="">
</div>
</div>
_______________________________________________<br class="">
ncl-talk mailing list<br class="">
<a moz-do-not-send="true" href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a><br class="">
List instructions, subscriber options, unsubscribe:<br class="">
<a moz-do-not-send="true" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank" class="">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br class="">
<br class="">
</blockquote>
</div>
</blockquote>
</div>
<br class="">
</div>
<br class="">
<fieldset class="mimeAttachmentHeader"></fieldset>
<br class="">
<pre wrap="" class="">_______________________________________________
ncl-talk mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>
List instructions, subscriber options, unsubscribe:
<a class="moz-txt-link-freetext" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
</pre>
</blockquote>
<br class="">
</div>
_______________________________________________<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="">http://mailman.ucar.edu/mailman/listinfo/ncl-talk<br class=""></div></blockquote></div><br class=""></div></body></html>