[ncl-talk] Filtering dates of a netcdf file (include number of gridpoints as additional criteria)
Rashed Mahmood
rashidcomsis at gmail.com
Mon Sep 9 09:02:13 MDT 2019
Yes, there can be several ways of counting grid points with rainfall above
0:
e.g. say your variable name is "precp"
oneD = ndtooned(precip)
nVal = dimsizes(ind(oneD.gt.0))
nVal is the number of time precip is greater than 0. Does this makes sense,
let me know if does not.
On Mon, Sep 9, 2019 at 11:36 AM Lyndz via ncl-talk <ncl-talk at ucar.edu>
wrote:
> 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
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190909/a208df2a/attachment.html>
More information about the ncl-talk
mailing list