Hi all,
I am trying to find different percentiles of occurrence (90th, 75th, 25th, etc) of a certain RCM output variable in a time, lat, lon netcdf file. I realize that the options qsort and dim_pqsort_n do not support ignoring missing values.
For a 1D array I am able to use the inz=ind(.not.ismissing(AOD)) command and then the sort_AOD_nz=AOD_nz(inz) to remove all values which are of fill_value, but I am getting tripped up with the added time and 2D grid. Below is the command I am using to mask any AOD events that are under 0.1 and replacing with fill_value:
ncl> AOD_ALL_nz=where(AOD_all_sum .gt. 0.1, AOD_all_sum, AOD_all_sum@_FillValue) ;AOD_ALL_nz(time, lat, lon)
ncl> AOD_sorted_values=dim_pqsort_n(AOD_ALL_nz_sorted,2,0) ; yields the sorted array increasing in time but with missing_values at the beginning of file for each grid-cell---id like to remove these so they dont count to "skewing" the percentiles to be lower than they actually should be
>From here I am unable to figure out how to remove those values which are fill_value when sorting to then find the corresponding percentiles. Essentially I would like to follow a similar approach of the 1D or find the grid-cell specific percentiles some other way.
I tried searching the list serve but to no avail. Does anyone have an idea of how to figure out these percentiles (i.e. neglecting events below a certain value) using the sort function or another work-around?
Thanks for any help!
Marc
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Mar 20 19:43:24 2013
This archive was generated by hypermail 2.1.8 : Fri Mar 22 2013 - 16:45:18 MDT