Dear Ferreters, I have daily precipitation data equally space in time and in
lat-lon (two files with 20*360=7200 days, same dimensions but different values:
precip20, precip21). I count number of days that have higher precipitation than
the upper quartile of the data (precip31 counts the days that have higher
precipitations in precip21 than the upper quartile in precip20). I succeed
in the whole 20 years (for a year average and writing it out for the region to
a new netcdf file), but i could not do it for a specific month (ex. January). Can anybody help me in doing this in a month? (like
r75january, r75february...) Here is the script that worked: ---------------------------- repeat/j=1:1:1 (repeat/i=1:1:1 (let tsorted_indices_20 =
sortl(precip20[i=`i`,j=`j`,l=1:7200]); let tsorted_precip20 =
samplel(precip20[i=`i`,j=`j`,l=1:7200], tsorted_indices_20);\ let r75_20=tsorted_precip20[l=5400];\ let precip31= if precip21 GE r75_20 then 1;\ let x21=precip31[t=1:7200@sum]/20;\ save/file="d:\ferret\ki\r75.nc"/ILIMTS=1:65/JLIMITS=1:75/i=`i`/j=`j`
x21)) repeat/j=18:31:1 (repeat/i=35:58:1 (let tsorted_indices_20 =
sortl(precip20[i=`i`,j=`j`,l=1:7200]); let tsorted_precip20 =
samplel(precip20[i=`i`,j=`j`,l=1:7200], tsorted_indices_20);\ let r75_20=tsorted_precip20[l=5400];\ let precip31= if precip21 GE r75_20 then 1;\ let x21=precip31[t=1:7200@sum]/20;\ save/file="d:\ferret\ki\r75.nc"/i=`i`/j=`j`/append/clobber
x21)) --------------- I hope i have explained what i would like to do. Thanks in advance, Peter Szabo |