<div dir="ltr"><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Dear NCL experts,</div><div><br></div><div>I would like to ask for help in applying the <b>ind_resolve()</b> in my ncl script:</div><div><br></div><div>My sample data can be found here:</div><div><a href="https://www.dropbox.com/sh/t88oab9txej73u1/AAAkDCcsTC3_eHg8uBc0vhtda?dl=0">https://www.dropbox.com/sh/t88oab9txej73u1/AAAkDCcsTC3_eHg8uBc0vhtda?dl=0</a><br></div><div>-----------------------------------------------------------------------------------------------------</div><div>Here's my script so far:</div><div><br></div><div><font color="#0000ff">;************************************************</font><br><font color="#0000ff">; variable and file handling</font><br><font color="#0000ff">;************************************************</font><br><font color="#0000ff">  fvr  = addfile("<a href="http://vort_ndjf_2008.nc">vort_ndjf_2008.nc</a>","r")       ; open netcdf file</font><br><font color="#0000ff">  fwspd  = addfile("<a href="http://wspd_ndjf_2008.nc">wspd_ndjf_2008.nc</a>","r")</font><br><br><font color="#0000ff">;**************************************************</font><br><font color="#0000ff">;Extract over a region</font><br><font color="#0000ff">;**************************************************</font><br><font color="#0000ff">  latS = 12.5</font><br><font color="#0000ff">  latN = 20.0</font><br><font color="#0000ff">  lonL = 120.0</font><br><font color="#0000ff">  lonR = 135.0</font><br><br><font color="#0000ff">  vr_region=fvr->vr(:,{latS:latN},{lonL:lonR})     ;select subregion</font><br><font color="#0000ff">  wspd_region=fwspd->wspd(:,{latS:latN},{lonL:lonR})</font><br><br><font color="#0000ff">  if (num((vr_region .gt. 3e-5) .and. (wspd_region .ge. 5))) then</font><br><font color="#0000ff">      x1D = ndtooned(vr_region)</font><br><font color="#0000ff">      y1D = ndtooned(wspd_region)</font><br><font color="#0000ff">   </font><b style=""><font color="#ff0000">   i1D = ind(x1D.gt.3e-5 .and. y1D.ge.5)</font></b><br><font color="#ff0000"><b>      i   = ind_resolve(i1D, dimsizes(vr_region) )</b></font><br><font color="#0000ff">      print(time(i(:,0)) +"  "+ lat(i(:,1)) +"  "+lon(i(:,2)) )</font><br><font color="#0000ff">      delete(x1D)</font><br><font color="#0000ff">      delete(i1D)</font><br><font color="#0000ff">  end if</font></div><div>-------------------------------------------------------------------------------------</div><div>I would like to:</div><div><br></div><div>1. Get the lat lon (location) of the grids with vorticity >3e-5 AND wind speed >= 5 5. I am getting an error <font color="#ff0000">fatal:Conditional statements (if and do while) require SCALAR logical values, see all and any function, </font><font color="#000000">at the ind_resolve() line. Any suggestions on how to fix this in NCL?</font></div><div><font color="#000000"><br></font></div><div><font color="#000000">2. The output of the above script should be a list of coordinates. How can I get the average of the gridpoints around (4 gridpoints) these coordinates per time step, while <b>excluding</b> these coordinates in the averaging?</font></div><div><font color="#000000"><br></font></div><div><font color="#000000">I'll appreciate any help on this matter..</font></div><div><font color="#000000"><br></font></div><div><font color="#000000">-Lyndz</font></div><div><br></div><div><br></div><div><br></div><div><br></div><div><font color="#0000ff"><br></font></div></div></div></div></div></div></div></div></div></div></div></div></div>