<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Krishna,<br>
<br>
you can use the function <b><tt>closest_val</tt></b> to retrieve an
index of an value.<br>
<br>
<tt> lat13 = closest_val(13,lat)</tt><tt><br>
</tt><tt> lon80 = closest_val(80,lon)</tt><br>
<br>
<tt> print("Index: "+lat13+" - "+lat(lat13))</tt><tt><br>
</tt><tt> print("Index: "+lon80+" - "+lon(lon80))</tt><br>
<br>
To plot 2 more grid boxes of lat/lon than you can use e.g.<br>
<br>
<tt> plot = gsn_csm_contour_map(wks,
var(lat13-2:lat13+2,lon80-2:lon80+2),res)</tt><br>
<br>
<br>
Bye,<br>
Karin<br>
<br>
<div class="moz-cite-prefix">Am 26.01.16 um 14:13 schrieb Krishna C:<br>
</div>
<blockquote
cite="mid:CAPtvbpvETbPM7KnKA0qcq9f1se6Z5nPfdtbe+LUwVZHVCX9F1w@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>Hi <br>
<br>
<br>
</div>
<div>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>
</div>
<div>Please correct if i am wrong. <br>
</div>
</div>
<div class="gmail_extra"><br clear="all">
<div>
<div class="gmail_signature">
<div dir="ltr">
<div style="text-align:left"><font size="2"><span
style="font-family:times new roman,serif"><font
size="2">R</font>egards<br>
</span></font></div>
<div style="text-align:left"><font
face="verdana,sans-serif"><font size="2"><span
style="font-family:times new roman,serif">-Krishna-</span></font></font><br>
</div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">On Tue, Jan 26, 2016 at 5:14 PM, Guido
Cioni <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:guidocioni@gmail.com" target="_blank">guidocioni@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<p dir="ltr">Yes there is, but you should have a look at the
documentation on the page ;-)<br>
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>
<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">chandrakrishna.90@gmail.com</a>>
ha scritto:<br type="attribution">
</div>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div class="h5">
<div dir="ltr">
<div>
<div>Hi,<br>
<br>
<br>
</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>
<br>
</div>
<div>With warm regards<br>
<br>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div dir="ltr">
<div style="text-align:left"><font
size="2"><span
style="font-family:times new
roman,serif"><br>
</span></font></div>
<div style="text-align:left"><font
face="verdana,sans-serif"><font
size="2"><span
style="font-family:times new
roman,serif">-Krishna-</span></font></font><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
</div>
</div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a moz-do-not-send="true"
href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a moz-do-not-send="true"
href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk"
rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br>
</blockquote>
</div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
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>
</body>
</html>