Software to train/evaluate models to classify labeled climate data based on a convolutional neural network (CNN).
- pytorch>=1.11.0
- tqdm>=4.64.0
- torchvision>=0.12.0
- torchmetrics>=0.11.2
- numpy>=1.21.6
- matplotlib>=3.5.1
- tensorboardX>=2.5
- tensorboard>=2.9.0
- xarray>=2022.3.0
- dask>=2022.7.0
- netcdf4>=1.5.8
- setuptools==59.5.0
- xesmf>=0.6.2
- cartopy>=0.20.2
- numba>=0.55.1
An Anaconda environment with all the required dependencies can be created using environment.yml
:
conda env create -f environment.yml
To activate the environment, use:
conda activate climclass
environment-cuda.yml
should be used when working with GPUs using CUDA.
climclass
can be installed using pip
in the current directory:
pip install .
The software can be used to:
- train a model (training)
- make predictions using a trained model (evaluation)
The input data samples must be given in the following naming convention, containing a single sample per file: <category_name><sample_name><data_type><class_label>.nc
Once installed, the package can be used as:
- a command line interface (CLI):
- training:
climclass-train
- evaluation:
climclass-evaluate
- a Python library:
- training:
from climatestateclassifier import train train()
- evaluation:
from climatestateclassifier import evaluate evaluate()
An example application can be found in the directory demo
.
The instructions to run the example are given in the demo/README.md file.
Climate State Classifier
is licensed under the terms of the BSD 3-Clause license.
Climate State Classifier
is maintained by the Data Analysis Department at DKRZ (Deutsches Klimarechenzentrum).
- Current contributing authors: Johannes Meuer, Claudia Timmreck, Shih-Wei Fang, Christopher Kadow.