m2lines / MLwithQG

Jupyter book tutorial on Ross 2022 machine learning subgrid parametrizations
https://m2lines.github.io/MLwithQG/
0 stars 0 forks source link

Ross 2022 Machine Learning Parameterizations

An online hosted collection of tutorial notebooks on Ross 2022 machine learning subgrid parametrizations.

Structure and Organization of the Repo

This project uses Jupyter Book to organize a collection of Jupyter Notebooks into a website.

Setting up the Environment

Installing pyqg

The quickest and easiest way to install pyqg is with conda. Alternative installation instructions can be found here. To install pyqg with conda, run

$ conda install -c conda-forge pyqg

Installing Python Dependencies

The python packages required to run and build the notebooks are listed in the requirements.txt file. To install all dependencies, run

$ python -m pip install -r requirements.txt

There is an additional dependency that must be installed. We must import the following repository as a Python package. This repository contains code that abstracts parameterizations using fully convolutional neural networks (FCNN). We can do this by following these steps.

Building the Book

To build the book locally, you should first create and set up your environment, as described above. Then run

$ jupyter-book build .

When you run this command, the notebooks will be executed. The built html will be placed in \_build/html. To preview the book, run

$ cd _build/html
$ python -m http.server

References

Ross, A., Li, Z., Perezhogin, P., Fernandez-Granda, C., & Zanna, L. (2023). Benchmarking of Machine Learning Ocean Subgrid Parameterizations in an Idealized Model. Journal of Advances in Modeling Earth Systems, 15(1), e2022MS003258. https://doi.org/10.1029/2022MS003258