How to reproduce and extend this work

This project is designed to be easy to reproduce and extend. Everything involved is kept under version control in a git repository. The repository is hosted on GitHub (and the documentation made with GitHub Pages). The repository is https://github.com/philip-brohan/AI_daily_precip. This repository contains everything you need to reproduce or extend this work.

If you are familiar with GitHub, you already know what to do (fork or clone the repository): If you’d prefer not to bother with that, you can download the whole thing as a zip file.

As well as downloading the software, some setup is necessary to run it successfully:

These scripts need to know where to put their output files. They rely on an environment variable SCRATCH - set this variable to a directory with plenty of free disc space.

These scripts will only work in a python environment with the appropriate python version and libraries available. I use conda to manage the required python environment - which is specified in a yaml file:

name: gemini
channels:
  - conda-forge
dependencies:
# Basics
  - python=3.13
  - black  # Code formatter
  - sphinx  # Documentation
# convert pdf to jpgs
  - imagemagick=7.1
# graphics
  - matplotlib=3.10
  - pillow=11
# old-style computer vision
  - opencv=4.10
# Gemini API
  - google-generativeai=0.8
  - grpcio # Don't use this, but it's required by google-generativeai

# Tell python to look for modules in the root directory of the project
# (A hack, needs to be edited for every installation, but makes code
#  management much easier.)
# Replace with the path to your project directory root.

variables:
  PYTHONPATH: /home/users/philip.brohan/Projects/AI_daily_precip

Install anaconda or miniconda, create and activate the environment in that yaml file, and all the scripts in this repository should run successfully. In principle this should work on any operating system and machine architecture (if all the required dependencies are available for your system - you may need to specify appropriate conda channels as well) - but I have only tested it on Linux/Intel/Nvidia.

The project documentation (these web pages) are included in the repository (in the docs directory). The documentation is in reStructuredText format, and uses the Sphinx documentation generator.