Select to view content in your preferred language

How to calculate the percentile for each cell from timeseries raster

7126
12
Jump to solution
01-16-2018 01:26 AM
BennyIstanto
New Contributor II

Branched from: https://community.esri.com/thread/95403 

Hi Xander Bakker thank you for above script. I have tested and it works using my data.

But I have question. Let say I have timeseries raster data from 1981 to 2016, its the max of daily rainfall in a year, so its just 1 raster data for 1 year. For each cell in x,y location from 1981 to 2016, I would like to calculate the percentile of i.e 90%. 

How to calculate the percentile for each cell from timeseries raster using your script?

0 Kudos
12 Replies
DanPatterson_Retired
MVP Emeritus

Define Projection.... as per usual in the Data Management tools, Projections and Transformations

0 Kudos
BennyIstanto
New Contributor II

Thank you Dan, finally I managed to add the spatial ref.

I added info on line 23-27 to line 30

out = arcpy.NumPyArrayToRaster(n_90, arcpy.Point(114.4317366,-8.8492618), x_cell_size=0.049242234706753, y_cell_size=0.049242234706753, value_to_nodata=0)

0 Kudos
DanPatterson_Retired
MVP Emeritus

Ahhh that is what I was referring to in a previous post.  That was the missing information when I originally ran it.

0 Kudos