<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>I've noticed some strange results using the ind() and ind_resolve() functions, that I can't explain. I'm using the functions to find all indices on the POP ocean grid within a certain domain, viz:</div>
<div><br>
</div>
<div>&gt; f = addfile(filename,&quot;r&quot;) ;file could be any CCSM4 or CESM ocean data</div>
<div><br>
</div>
<div>;read lat/lon coords</div>
<div>&gt;lat = f-&gt;lat &nbsp;&nbsp;</div>
<div>&gt;lon = f-&gt;lon</div>
<div><br>
</div>
<div>;convert to 1d arrays</div>
<div>&gt;lat1d = ndtooned(lat) &nbsp;</div>
<div>&gt;lon1d = ndtooned(lon)</div>
<div><br>
</div>
<div>;find all coords in a band across the mid-lat N. Atlantic</div>
<div>&gt;ii = ind(lon1d.ge.270..and.lon1d.le.360..and.lat1d.gt.39.5.and.lat1d.lt.40.5)</div>
<div><br>
</div>
<div>&gt;jj = ind_resolve(ii, dimsizes(lat)) ; find array elements on the 2-d grid</div>
<div><br>
</div>
<div>&gt;printMinMax(lon(jj(:,0),jj(:,1)), True) &nbsp;;returns range of 270.296 to 359.746 ; so far so good</div>
<div><br>
</div>
<div>&gt;printMinMax(lat(jj(:,0),jj(:,1)), True) &nbsp;</div>
<div>;returns range of 38.0728 to 41.8587, which is outside the initial query of 39.5 to 40.5&nbsp;</div>
<div><br>
</div>
<div>Any thoughts?</div>
<div><br>
</div>
<div>Will</div>
</body>
</html>