ESMValGroup / ESMValTool

ESMValTool: A community diagnostic and performance metrics tool for routine evaluation of Earth system models in CMIP
https://www.esmvaltool.org
Apache License 2.0
217 stars 126 forks source link

Extreme events attribution #2919

Open malininae opened 1 year ago

malininae commented 1 year ago

Hi folks,

As we discussed during the November meeting (see https://github.com/ESMValGroup/Community/discussions/60), I'm in the process of developing a recipe/diagnostic combo to provide rapid attribution of extreme events.

The idea is to calculate risk ratios as well as provide plots right after the event happens, similar to https://www.sciencedirect.com/science/article/pii/S2212094722000287 (in particular, fig. 6). The diagnostic used there was minimally modified to produce 2021 BC heat wave analysis (tasmax) as well as some results I've got for 2022 hurricane Fiona (sfcWind), both unpublished.

Short description of the diagnostic

1) Using data from each variable group in the preprocessed files, fit for each model as well as for Multi-Model mean GEV parameters and their uncertainties using bootstrap method. 2) Plot the empirical and fitted distributions and return periods. 3) Fit GEVs, calculate return periods and plot results for OBS (usually, ERA5).

Branch and pull request The code so far is in horrible condition, so I won't share it yet, but going forward, I was wondering what's the best way to consolidate things. For tasmax I used old good anomalies, for sfcWind absolute values to fit GEVs to, but for pr I used "normalised values" so the usual pr values simply divided by a mean over a reference period. The problem is that so far, I've done it in the diagnostic, but then I wasn't able to use the same diagnostic for tasmax and sfcWind, although aside from that division, analysis is identical. I was wondering, what's the best thing there, keep two diagnostics? Create a flag in the diagnostic and an if statement? Create a new preprocessor function for division to a reference period? Any advice would be appreciated,

valeriupredoi commented 1 year ago

cheers @malininae :beer: (I'll come back in a short while here with more than a :beer: )

valeriupredoi commented 1 year ago

@malininae I promised I'd be back - although "in a short while" was a bit of a stretch :grin: I'd be very happy to help out with the code (technical aspects/cleanup etc - no science for me, sadly), so if you could open a (draft) PR then we can take it from there; that way we can also see what the outstanding issue with making the operation a preprocessor step (or not) really is too. This sounds like good fun actually, and something that we may use as a calling card to advertize the Tool even more. One question though - I have some experience with bootstrapping, and I know it's not exactly a fast neither reliable parameter estimation method, do we not want to use something like MCMC instead? Anyhoo that can be discussed in the PR :beer: