<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>Dear NCL experts,</div><div><br></div><div>I'm extracting the dates of gridpoints that satisfy two conditions: vorticity > 3e-5 and winds >= 5. Below is my script</div><div><br></div><div>------------------------------------------------------------------------------------</div><div>;************************************************<br>; variable and file handling<br>;************************************************<br>  fvr  = addfile("../vort/<a href="http://vort_2012.nc">vort_2012.nc</a>","r")       ; open netcdf file<br>  fwspd  = addfile("../mag/<a href="http://mag_2012.850hPa.nc">mag_2012.850hPa.nc</a>","r")<br><br>;**************************************************<br>;Extract over a region<br>;**************************************************<br>  latS = 5.0<br>  latN = 25.0<br>  lonL = 115.0<br>  lonR = 135.0<br><br>  vr_region=fvr->vr(:,{latS:latN},{lonL:lonR})     ;select subregion<br>  wspd_region=fwspd->wspd(:,{latS:latN},{lonL:lonR})<br><br>  time = vr_region&time<br>  lat  = vr_region&lat<br>  lon  = vr_region&lon<br><br>  if (num(vr_region .gt. 3e-5 .and. wspd_region .ge. 5) .gt. 0) then<br>      x1D = ndtooned(vr_region)<br>      y1D = ndtooned(wspd_region)<br>      i1D = ind(x1D.gt.3e-5 .and. y1D.ge.5)<br>      i   = ind_resolve(i1D, dimsizes(vr_region) )<br>      TT = time(i(:,0))<br>      test = time(i(:,0)) +"  "+ lat(i(:,1)) +"  "+lon(i(:,2))<br>      delete(x1D)<br>      delete(i1D)<br>  end if<br>  print(test)<br>  asciiwrite("test.txt",test)<br></div><div>-------------------------------------------------------------------------------------------------</div><div><br></div><div>I would like to get the average vorticity and winds of "four" (north south east west) gridpoints surrounding the gridpoints that I got from the script.</div><div><br></div><div>Then only get the dates of the gridpoints with vorticity > 3e-5 and winds >= 5 and whose surrounding four gridpoints have average vorticity >3e-5 and winds >=5.</div><div><br></div><div>I would like to ask for help on how to do this in NCL.</div><div><br></div><div>I'll appreciate any help on this matter.</div><div><br></div><div>-Lyndz</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></div></div></div></div></div></div></div></div></div>