[ncl-talk] Filtering dates of a netcdf file (include number of gridpoints as additional criteria)

Lyndz olagueralyndonmark429 at gmail.com
Mon Sep 9 03:36:11 MDT 2019


Dear NCL experts,

I would like to filter the dates in a NetCDF file when the following
conditions are met:
(a) Area averaged rainfall is greater than 0.

Area:
  latS = 12.5
  latN = 20.0
  lonL = 120.0
  lonR = 122.5

(b) At least 80% of the grid points within the specified area satisfies (a).

Attached in this email is the script that I am currently working on.
The sample data can be accessed here:
https://www.dropbox.com/s/spfnwb4rhwjo90o/aphro_1979_AMJ.nc?dl=0


*[Problem]*
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?

The time filter is like this:

  rain_threshold = 0
  rain_aave=wgt_areaave_Wrap(rain_region,1.0,1.0,0)
  printVarSummary(rain_aave)
  n_thres  = ind(rain_aave .gt. rain_threshold) ;time indices
  print(n_thres)
  print("=====")

I'll appreciate any guidance about this.

Sincerely,
Lyndz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190909/698adbf4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: date_filter.ncl
Type: application/octet-stream
Size: 2152 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190909/698adbf4/attachment.obj>


More information about the ncl-talk mailing list