<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>> f = addfile(filename,"r") ;file could be any CCSM4 or CESM ocean data</div>
<div><br>
</div>
<div>;read lat/lon coords</div>
<div>>lat = f->lat </div>
<div>>lon = f->lon</div>
<div><br>
</div>
<div>;convert to 1d arrays</div>
<div>>lat1d = ndtooned(lat) </div>
<div>>lon1d = ndtooned(lon)</div>
<div><br>
</div>
<div>;find all coords in a band across the mid-lat N. Atlantic</div>
<div>>ii = ind(lon1d.ge.270..and.lon1d.le.360..and.lat1d.gt.39.5.and.lat1d.lt.40.5)</div>
<div><br>
</div>
<div>>jj = ind_resolve(ii, dimsizes(lat)) ; find array elements on the 2-d grid</div>
<div><br>
</div>
<div>>printMinMax(lon(jj(:,0),jj(:,1)), True) ;returns range of 270.296 to 359.746 ; so far so good</div>
<div><br>
</div>
<div>>printMinMax(lat(jj(:,0),jj(:,1)), True) </div>
<div>;returns range of 38.0728 to 41.8587, which is outside the initial query of 39.5 to 40.5 </div>
<div><br>
</div>
<div>Any thoughts?</div>
<div><br>
</div>
<div>Will</div>
</body>
</html>