GithubHelp home page GithubHelp logo

georgemilosh / climate-learning Goto Github PK

View Code? Open in Web Editor NEW
19.0 3.0 5.0 220.54 MB

How to predict extreme events in climate using rare event algorithms and modern tools of machine learning

Home Page: https://georgemilosh.github.io/Climate-Learning/

License: MIT License

Python 0.60% Shell 0.01% Jupyter Notebook 99.39%
climate heatwave machine-learning rare-event-algorithm extreme

climate-learning's Introduction

Extreme events in climate

This repository includes various routines used to analyze extreme events in climate models and reanalysis.

Below we show a composite conditioned on heatwaves in Scandinavia modelled by CESM (1000 years of data):

Heat waves in Scandinavia modelled by CESM

Predicting/estimating rare events:

We are interested in predicting rare events such as heatwaves or cold spells etc.

Machine Learning

We use neural networks to compute committor functions, conditional probability of occurrence of such events. Computations are performed on the cluster Centre Blaise Pascal at ENS de Lyon

User guide

  • To install the repo to your local space you need to execute:
    git clone --recursive [email protected]:georgemilosh/Climate-Learning.git

(recursive deals with the submodule contained in this repo)

  • To install the relevant packages run setup.sh that is included
  • To see how to work with our routines (such as working with data and training neural networks) consult Plasim/tutorial.ipynb
  • Another similar tutorial can be found in CESM/CESM_tuto.ipynb

Data

Generally the data we used in this project is quite large. However, we were able to make a portion of data available through Zenodo which contains 500 years for anomalies of

  • tas.nc: 2 meter temperature
  • zg500.nc: 500 hPa geopotential height
  • mrso.nc: soil moisture
  • lsmask.nc: land sea mask
  • gparea.nc: cell area

For understanding our data it helps to look at the tutorial we created for Critical Earth ESR Workshop 2 held in April 2022 in Nijmegen, The Netherlands.

Folder structure:

Where we store *.py, *.ipynb scripts related to the following models and methods:

  • PLASIM: Intermediate complexity climate model. That's where most of our scripts including Learn2_new.py (responsible for training CNN) are located. Also, this folder contains hyperparameter_optimization.py, a very useful Bayesian hyperparameter optimizer based on optuna library.
  • CESM: High fidelity climate model
  • ERA5: ECMWF reanalysis
  • SWG We store Stochastic Weather Generator SWG related routines in the folder called VAE which stands for Variational Autoencoder experiments. Importantly this folder also contains the SWG without the use of VAE.

Customization

One of the big advantages of this repository is that it easily supports customization.

The simplest way is to import Learn2_new as ln and then simply use the features that you need. But this is hardly customization.

The second option is to leverage the full potential of the code by changing only some of its functions. Examples of this are gaussian_approx, committor_projection_NN or hyperparameter_optimization. These modules inherit from Learn2_new.

A template for how to properly implement this inheritance is available here

Publications

Citation:

@article{PhysRevFluids.8.040501,
    title = {Probabilistic forecasts of extreme heatwaves using convolutional neural networks in a regime of lack of data},
    author = {Miloshevich, George and Cozian, Bastien and Abry, Patrice and Borgnat, Pierre and Bouchet, Freddy},
    journal = {Phys. Rev. Fluids},
    volume = {8},
    issue = {4},
    pages = {040501},
    numpages = {40},
    year = {2023},
    month = {Apr},
    publisher = {American Physical Society},
    doi = {10.1103/PhysRevFluids.8.040501},
    url = {https://link.aps.org/doi/10.1103/PhysRevFluids.8.040501}
}

Media coverage

CNRS press

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.