-2

so I have gridded precipitation data with dimenstion (324,72,144) being time, lon, lat respectively. I want to count count the frequeny of this data that is above the 95th percentile but I am really confused since this data is gridded. I would be glad for suggestions

1 Answers1

1

Where are you getting the 95th percentile from? It doesn't make that much sense to ask "what percent of this data is above the 95th percentile, within the same data", because the answer to that will always be 5% by definition.

If you want to find the fraction of an array X that is above a certain value c, you can just write

(X>c).mean()
macroeconomist
  • 671
  • 3
  • 8