SIN’XS library installation

Retrieving sources

You can retrieve sources from the GitLab repository:

$ git clone https://sinxs-gitlab.noveltis.fr/polar_sea_ice/library.git

Note

Please note that your SIN’XS Gitlab account will be automatically created when you register on the SIN’XS assessment website. An email containing your IDs will be sent at the email address you use to create your SIN’XS account.

Dependencies

The SIN’XS library requires python>3 and depends on the following packages:

matplotlib

Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python.

scipy

Scipy provides many user-friendly and efficient numerical routines, such as routines for numerical integration, interpolation, optimization, linear algebra, and statistics.

xarray

xarray is an open source project and Python package that makes working with labelled multi-dimensional arrays simple, efficient, and fun!

dask

Dask is a flexible library for parallel computing in Python.

xoa

xoa is intended to help reading and manipulating observed and simulated ocean data.

billiard

Billiard is a flexible library for parallel computing in Python.

cartopy

Cartopy is a Python package designed for geospatial data processing in order to produce maps and other geospatial data analyses.

pyresample

Pyresample is a python package for resampling geospatial image data.

sympy

SymPy is a Python library for symbolic mathematics.

How to install dependencies

To setup the environment, please follow the instructions below:

$ conda env create -f library/environment.yml
$ conda activate sinxs_env

Note

You can speed up this step by utilizing mamba.

This library is not provided as a pip package mainly because it relies on GDAL, which is known for its challenging installation process. Installing with pip relies on the GDAL installed on the user’s operating system, making it hard to diagnose compatibility issues. We believe that using the conda environment is the most user-friendly approach as of now.

How to install sin’xs

To install sinxs, please follow the instructions below:

$ cd library
$ python -m build
$ pip install -q ./dist/sinxs-0.0.2-py3-none-any.whl

or:

$ cd library
$ python setup.py install

Installing sin’xs in another environment

If you want to use the sin’xs library in one of your projet that already has a dedicated environment, you can do so by updating the environment using the following commands:

$ conda install --name name_of_your_env --file library/environment.yml

You can then proceed with the installation of the library.

Build documentation

To build sphinx documentation as html files, please follow the instructions below:

$ cd library/doc
$ make html

Then open library/docs/build/html/index.html file.