This repository contains code for exploring tropical cyclone data using machine learning techniques. The machine learning frameworks in this repo are prinicpally based in python, in particular pytorch. Training data comes from a variety of Met Office high resolution models based on the Unified Model (UM).
Key file and folders
Directory | Description |
---|---|
01-basic-GAN | Basic GAN with 64x64 and 256x256 architectures. |
Information on how to contribute can be found in the Contributing guide.
Start by cloning this github repo:
git clone https://github.com/MetOffice/ML-TC.git
cd ML-TC
Then, set-up a conda environment for this repository. Your conda environment will depend on if you have access to GPUs and CUDA.
For a CPU only conda environment, use the requirements.yml
file:
conda env create --file requirements.yml
For a GPU optimised environment, check that you have access to GPUs and CUDA:
nvcc --version
lspci | grep -i nvidia
If these return scucesfully, then use the requirements-gpu.yml
file:
conda env create --file requirements-gpu.yml
These environment requires ~10GB of disk space. Then activate the conda environment:
conda activate ml-tc
conda activate ml-tc-gpu
To check if your GPU driver and CUDA is enabled and accessible by PyTorch, in python
run:
>>> import torch
>>> torch.cuda.is_available()
True
Specific instructions for running on Isambard are detailed here
Current sources of data used by this repo include:
- Bangladesh Topical Cyclone Data via Zenodo. This data is distributed under CC-BY 4.0, please cite https://doi.org/10.1038/s41597-021-00847-5 if used.
To download the data use Curl: curl -# -o [cyclone].tar https://zenodo.org/api/files/476d7685-0a99-4f35-a32d-f6951e89dfec/tsens.[cyclone].tar.gz
where [cyclone] should be replaced with the capitalised name of the cyclone you want to download.
The file getbengaldata.sh will download the cyclone data, unzip it, and run the data preparation script on it for the requested format and variables. The raw data will be temporarily stored in a folder called RawData while this runs, and the produced data will be stored in a folder called Data.
Example:
./getbengaldata.sh A "fg hur"
This will produce data in format A for the variables fg and hur.