Machine Learning Examples

Machine Learning Examples#

Welcome to ECMWF’s Machine Learning Examples book.

This book is a living collection of examples of machine learning applied to weather, climate and Earth-systems modelling in general. The aim is to provide worked code examples, with explanations, which can be used to understand how ML models can be built and applied.

Running the notebooks#

Each example in this book is constructed as a Jupyter Notebook, which is a combination of text, Python code and the outputs of the code. This means that the entire example can be run using the commands provided in the notebook.

By far the easiest way to run these examples is to open them in one of the free cloud-based environments (see two options below). These require no installation. To do this, click on one of the Colab/Kaggle buttons at the top of the each notebook. On doing this, you will be prompted to create a free account (if you don’t already have one), after which you will see the same page you see here. Follow the instructions below to connect to a GPU. After that you can run each block of code by selecting shift+control repeatedly, or by selecting the “play” icon.

Note that in Colab, you can use the Gemini assistant to explain code chunks and to discuss the notebook in depth.

Advanced users may wish to run this exercise on their own computers by first installing Python and Jupyter, in addition to any package dependencies such as xarray, keras, torch and others. Please see each notebook for details on required dependencies. The notebooks can be downloaded using the download button in the top right of the toolbar within each example.

Contributions and suggestions#

While we aim to keep these examples working, if you find any examples that no longer work, please open an issue. (add link when on GH)

Do you have examples that you would like to contribute? Open a pull request. (add link when on GH)