NCAR / GPEP

GNU General Public License v3.0
9 stars 6 forks source link

Addition of Empirical CDF transform #13

Closed DaveCasson closed 6 months ago

DaveCasson commented 6 months ago

Addition of Empirical CDF transforms from Clark and Slater (2006).

This includes transform and back transform functions for ECDFs.

Pooled monthly ecdf transform (all stations together) is available through grid regression, while the unpooled (monthly ecdfs per station) works only until station regression cross validation. If this is carried for further use, methods to extend the unpooled ecdfs to grid cells will be needed.

Options for back transformation are linear interpolation and gamma fit. These currently show comparable results

Further testing through to ensemble generation, and of options is needed. However wanted to have this current working version added to the develop branch.

DaveCasson commented 6 months ago

Ensemble generation testing and fixes now completed for pooled ecdf

guoqiang-tang commented 6 months ago

Hi Dave, thank you very much for adding the empirical cdf transformation and its description in the documents. It will be interesting to see its performance compared to the Box-Cox transformation in the future. Although not included in this conversation, Dave has done many tests and shown the ECDF transformation and back transformation are successful. The image shows the ensemble estimation from one member provided by Dave.

image'

I left one comment about using config as an input argument to a function. It does not affect the usage, so I will just merge this PR. In the future, I think we will need to find a more organized and unified way to define functions.

Besides, I noticed that you also corrected some typos in the codes, and thank you for that too.

For completeness, below is the full reference of Clark and Slater (2006): Clark, M. P., & Slater, A. G. (2006). Probabilistic quantitative precipitation estimation in complex terrain. Journal of Hydrometeorology, 7(1), 3-22.