<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>Dear NCL experts, </div><div><br></div><div>I would like to filter the dates in a NetCDF file when the following conditions are met:</div><div>(a) Area averaged rainfall is greater than 0.</div><div><br></div><div>Area:</div><div>  latS = 12.5</div>  latN = 20.0<br>  lonL = 120.0<br>  lonR = 122.5</div><div dir="ltr"><br><div>(b) At least 80% of the grid points within the specified area satisfies (a).</div><div><br></div><div>Attached in this email is the script that I am currently working on.</div><div>The sample data can be accessed here:</div><div><a href="https://www.dropbox.com/s/spfnwb4rhwjo90o/aphro_1979_AMJ.nc?dl=0">https://www.dropbox.com/s/spfnwb4rhwjo90o/aphro_1979_AMJ.nc?dl=0</a><br></div><div><br></div><div><br></div><div><b>[Problem]</b></div><div>I was able to do the condition (a) but is there a way to count the number of grid points with rainfall above 0 over the specified region? How can I add this as another condition for the date filter?</div><div><br></div><div>The time filter is like this:</div><div><br></div><div>  rain_threshold = 0<br>  rain_aave=wgt_areaave_Wrap(rain_region,1.0,1.0,0)<br>  printVarSummary(rain_aave)<br>  n_thres  = ind(rain_aave .gt. rain_threshold) ;time indices<br>  print(n_thres)<br>  print("=====")<br></div><div><br></div><div>I'll appreciate any guidance about this. </div><div><br></div><div>Sincerely,</div><div>Lyndz</div><div><br></div><div><br></div><div><br></div></div></div></div></div></div></div></div></div></div>