[ncl-talk] Manual way to calculate percentile

ali mughal mughalali655 at gmail.com
Tue Feb 22 01:40:16 MST 2022


b=addfile("../../wrfout_d05_2016-03-31_00:00:00","r")
a=addfile("../../../wrfout_d05_2016-03-31_00:00:00","r")
t_Ind=a->TA_MEAN
ta=t_Ind(32:728,0,48:52,73:78)

t_No_Ind=b->TA_MEAN
tb=t_No_Ind(32:728,0,48:52,73:78)
ta_diff=ta-tb
copy_VarCoords(ta,ta_diff)

This gives out

Variable: ta_diff
Type: float
Total Size: 83640 bytes
            20910 values
Number of Dimensions: 3
Dimensions and sizes:   [Time | 697] x [south_north | 5] x [west_east | 6]
I want to first average over time so that I have (24x29) values.

Then I want to calculate percentiles P25, P50, P75, P90 and max values of
ta_diff.

Can someone help please
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20220222/1f5d2b08/attachment.html>


More information about the ncl-talk mailing list