Closed zackarno closed 1 year ago
turns out order of operations doesn't matter if using mean()
s .... so
zonal mean reduction --> rolling sum on zonal point values is equivalent to rolling sum on pixels -> zonal mean reduction
will revise post with a reprex soon
Ah yes, really good point Zack. Indeed for mean order doesn't matter, but if we do ever use e.g. median or max then I agree we would need to be intentional about the order
I realized that for HRES and ERA5 data I ran the zonal stats (mean/median) on daily values (for each lead time in the case of HRES) and then ran rolling sum calculations on the extracted zonal stats (mean). @turnerm and I chatted about the correct order of operations and whether it makes more sense to calculate rollings stats at the pixel level first before running zonal stats.
Our conclusion (if i remember correctly) was that either approach could work (as one could conceptualize the process both ways)- however, generally it makes more sense to run the rolling calcs at the pixel level first! This is what I did on the CHIRPS data and I think it could make sense that running the zonal stat first could potentially bias the data in one way or another.
All this to say I will create new targets where I run the pixel level calcs first and then zonal stats for both HRES and ERA5