Deep Learning Architecture for Climate science, in short as DLACs, is a python library designed to implement deep learning algorisms to climate data for weather and climate prediction. Deep learning techniques to deal with spatial-temporal sequences, namely the Convolutional Long Short Term Memory neural netwroks (ConvLSTM), are implemented in this package. A probabilistic version of the structure is also employed, with an easy shift from ConvLSTM to Bayesian ConvLSTM (BayesConvLSTM) through Bayes by Backprop or Bernoulli approximation.
Two types BayesConvLSTM are addressed here, which are BayesConvLSTM with variational inference (Blundell et. al. 2015; Shridhar et. al. 2019) and BayesConvLSTM by Bernoulli approximation with dropout (Gal and Ghahramani 2016).
The module is designed to perform convolutional and recurrent operatiaons on structured climate data. It is built on pytorch.
Two kinds of deep neural networks structures are included by the package:
- Convolutional Long Short Term Memory neural netwroks
- Bayesian Convolutional Long Short Term Memory neural netwroks
Two types of BayesConvLSTM are implemented here: BayesConvLSTM with variational inference and BayesConvLSTM approximated by Bernoulli distribution. The major differences are their functionality and the ways of training. BayesConvLSTM with variational inference is train by Bayes by Backprop (Blundell et. al. 2015; Shridhar et. al. 2019). BayesConvLSTM approximated by Bernoulli distribution is trained directly by back-propagation.
Folder structure of the repositary:
dlacsMain components of DLACsexamplesIncluding python scripts showing the whole workflow of training and forecasting with BayesConvLSTM in DLACsinitSample ConvLSTM neural network used to initialize BayesConvLSTMmodelsExamples of trained BayesConvLSTM neural networkstestsUnit testing, functional testing and integration testing shown in jupyter notebooksdataForecast data with BayesLSTM and Variational Auto-Regressive Model
Directory structure:
ConvLSTMContains ConvLSTM layer and the forward module.BayesConvLSTMContains BayesConvLSTM layer and the forward module of BayesConvLSTM with variational inference.BayesConvLSTMBinaryContains BayesConvLSTM layer and the forward module of BayesConvLSTM approximated by Bernoulli distribution.functionIncludes loss functions and distributions used by BayesConvLSTM.metricScoring systems (RMSE, CRPS, etc.) to evaluate the performance of training.preprocessFunctions to preprocess the input fields, like filtering, normalization, etc.regridModuels for geoscience / climate data regridding.saveNetCDFModules to save the output in netCDF format.visualVisualization components for postprocessing and plotting.
DLACs is tested on python 3.6 and has the following dependencies:
- numpy
- matplotlib
- netCDF4
- scipy
- iris
- cartopy
- torch
Clone the repositary and add the repositary folder to your python system path, or just go to the repositary folder and run the following command after downloading:
python setup.py install
For testing, please run:
python setup.py develop
Note that this repository is still under construction. In case you find any bug or want to contact the author, please raise an issue and leave your comments.
Liu, Y. (2021). Arctic weather and climate: from mechanisms to forecasts. Wageningen University. https://doi.org/10.18174/545045