Installation

We recommend the use of Anaconda or Miniconda, with Pyleoclim setup in its own environment.

Installing Anaconda or Miniconda

To install Anaconda or Miniconda on your platform, follow the instructions from this page or this page.

Creating a new Anaconda environment

To create a new environment using Python 3.7 via command line:

conda create -n pyleoenv python=3.7

To view a list of available environment:

conda env list

To activate your new environment:

conda activate pyleoenv

To view the list of packages in your environment:

conda list

To remove the environment:

conda remove --name pyleoenv --all

More information about managing conda environments can be found here.

Installing Pyleoclim

Make sure that the pyleoenv environment is activated.

First install numpy and Cartopy:

conda install numpy
conda install -c conda-forge cartopy

Make sure that the package proj4 is version 5.2+

conda list

Install Pyleoclim

pip install pyleoclim

Building from source for the f2py feature of WWZ

The default version of WWZ is relying on Numba. To achieve accelartion of the alogrithm, one may build the f2py vesion from the source code:

  • download the source code, either via git clone or just download the .zip file from the Github repo

  • go to the directory Pyleoclim_util/pyleoclim/f2py, and then type make to compile the .f90 source code with gfortran

  • one may also edit the Makefile to use ifort as the compiler to achieve further acceleration; just comment out the line for gfortran and use the line for ifort below

Installing R

Some functionalities require an installation of R.

To install R, download a mirror here. Note that Rstudio is not needed when calling R from Python.

Pyleoclim requires the Bchron package. Pyleoclim will check for an installation of Bchron. It it doesn’t exist, it will be installed.