MESMER-group / mesmer

spatially-resolved ESM-specific multi-scenario initial-condition ensemble emulator
https://mesmer-emulator.readthedocs.io/en/latest/
GNU General Public License v3.0
23 stars 17 forks source link

Refactoring of MESMER-X almost complete #432

Closed yquilcaille closed 4 months ago

yquilcaille commented 5 months ago

Here is a first version for the refactoring of MESMER-X. It adds a folder mesmer_x, with scripts to train conditional distributions, define flexible distributions, execute probability integral transform, calculate scores. There is also an example of how to run MESMER-X.

The second part of the training is the auto-regressive process with spatially correlated innovations. This part comes from MESMER and is not changed.

For information, the scripts were writing assuming that the input format would be a list of tuples (xr.Dataset, scenario). I'm not sure whether you converged on this format, but my hope is that it would be not too far, or easily changed.

Finally, this code would run with all the inputs data loaded, ie not only temperatures. I had scripts for that that were generalizing Lea's code. I wasn't sure whether to integrate them or not. If yes, let me know.