Implement shape parameter calibration for ClimWIP #1905
Hey @lukasbrunner I'm on it now. I totally see why you made the utilities file, but it's quite hard to compare the changes now. Do you think you could split up the commits a bit more logically (maybe move everything first without changes, then the actual changes)? That would make it much easier to go commit by commit and evaluate the relevant changes only.
Ah sorry yes! I always get ahead of myself and then there are no atomic commits any more... but really the changes to climwip.py are limited to moving functions to utilities.py and utilities.py contains only functions from the original climwip.py. So the only real changes are isolated in calibrate_sigmas.py (except for the call in climwip.py and a very small piece cross-checking if sigmas are already set)
Do you still want me to redo this? Might be a good learning process for me anyway so that would be okay :)
- calculate_model_distances: update docstring - calculate_model_distances: add argument to name new dimension name - compute_overall_mean: simplify median calculation - combine_ensemble_members: update docstring - combine_ensemble_members: allow passing of dimension names to be combined - calculate_weights: move actualy calculation to a new function to get more flexible. This function becomes a wrapper doing xarray stuff
Hey @Peter9192 !
Example figure sigma calibration
I also show a measure of "sharpness", i.e., the ratio between weighted and unweighted spread for each perfect model. The smaller the value the stronger the constraint of the weighting, with sharpness -> 1 for sigma -> infinity.
The cost function needs to basic properties: If no confident sigma can be found it needs to pick the largest possible value (weakest weighting) and for all confident values it needs to pick the smallest possible value.