Dear Ferreters,
G'day
I am following an example to compute the top and bottom decile of a seasonally averaged time series. The top decile means the 90th percentile and the bottom decile means 10th percentile. I want to select those years that are the top and bottom deciles of this time series to do a composite analysis. In my time series, I have 56 points as shown below.
yes? use
test.ncyes? sh da
currently SET data sets:
1> ./
test.nc (default)
name title I J K L
TS1 SSSI[D=1]/SSSI[D=1,L=@STD] ... ... ... 1:56
(T=16-SEP-1961 00:00:16-NOV-2016 00:00)
yes? sh gr ts1
GRID GMH1
name axis # pts start end subset
normal X
normal Y
normal Z
TMONTHLY1 TIME 56 i 16-OCT-1961 00:00 16-OCT-2016 00:00 full
I am following the sortl function to arrange my data increasing order in the time axis. Here is the script that I am writing to get top and bottom decile i.e. 90th and 10th percentile.
let npt1=`ts1,return=lend`
let srtl=sortl(ts1[l=1:`npt1`])
let arrn=samplel(ts1,srtl)
let dumy=l[g=ts1]
let mask10=if dumy eq srtl[l=`int(56*0.10)`] then 1 else 0
After this, I am not sure that the mask10 is actually representing the 10th percentile or not.
I am having a thought experiment that the bottom decile i.e. 10th percentile is the first 6 values from the srtl (arrn) variable. Because 100 percentile is represented by 56 values obtain from sortl function so represents 10th percentile is represented by 5.6 (~6 values).
So am I doing it correctly?
Let me know if I am not clear with my problem. Any help is highly appreciated.
Cheers, Saurabh
--
REGARDS
Saurabh Rathore
Research Scholar (PhD.)
Centre For Oceans, Rivers, Atmosphere & Land Science Technology
Indian Institute Of Technology, Kharagpur
contact :- 91- 8345984434