|
|
|
|
|
|
|
The scripts in this repository coded in Python,
|
|
|
|
but use several dependencies which can be installed by the following
|
|
|
|
instructions.
|
|
|
|
|
|
|
|
All the required packages should work on any platform and on linux based systems.
|
|
|
|
The code has been tested in Python v.3.8
|
|
|
|
|
|
|
|
Install dependencies with conda (all platforms)
|
|
|
|
-----------------------------------------------
|
|
|
|
|
|
|
|
This is the recommended way to install all the dependencies.
|
|
|
|
|
|
|
|
**Prerequisites**
|
|
|
|
|
|
|
|
You should have a recent version of the [conda](https://docs.conda.io/en/latest/)
|
|
|
|
package manager. You can get [conda](https://docs.conda.io/en/latest/) by installing
|
|
|
|
[miniconda](https://docs.conda.io/en/latest/miniconda.html), if you want a light version of the package manager.
|
|
|
|
|
|
|
|
**Conda environment**
|
|
|
|
|
|
|
|
Once conda is installed on your system you can easily create a fixed python environment
|
|
|
|
to use in every run by:
|
|
|
|
|
|
|
|
~~~
|
|
|
|
conda create --name sst_env python=3.8
|
|
|
|
~~~
|
|
|
|
|
|
|
|
Then activate it:
|
|
|
|
~~~
|
|
|
|
conda activate sst_env
|
|
|
|
~~~
|
|
|
|
|
|
|
|
To install the code dependencies you must have activated your environment. You
|
|
|
|
will know is activated once you see the name of the environment (e.g sst_env)
|
|
|
|
in () at the beginning of your bash alias:
|
|
|
|
|
|
|
|
~~~
|
|
|
|
(sst_env) [brecinos@jasmin-sci2 ~]$
|
|
|
|
~~~
|
|
|
|
|
|
|
|
Make sure conda-forge channel is your default channel to install dependencies:
|
|
|
|
|
|
|
|
~~~
|
|
|
|
conda config --add channels conda-forge
|
|
|
|
~~~
|
|
|
|
|
|
|
|
To install dependencies simply do:
|
|
|
|
|
|
|
|
~~~
|
|
|
|
conda install -c conda-forge numpy pyreadr pandas xarray scipy cartopy pyproj configobj seaborn
|
|
|
|
~~~
|
|
|
|
|
|
|
|
We then need to install [netCDF4](https://github.com/Unidata/netcdf4-python) and the library [salem](https://salem.readthedocs.io/en/stable/), to use such libraries we need to install some dependencies with pip:
|
|
|
|
|
|
|
|
~~~
|
|
|
|
pip install shapely rasterio Pillow geopandas netcdf4 scikit-image joblib motionless dask descartes
|
|
|
|
~~~
|
|
|
|
|
|
|
|
Now we can install netCDF4 and joblib:
|
|
|
|
|
|
|
|
~~~
|
|
|
|
conda install -c conda-forge netCDF4 joblib
|
|
|
|
~~~
|
|
|
|
|
|
|
|
Finally, we can install salem:
|
|
|
|
|
|
|
|
~~~
|
|
|
|
pip install git+https://github.com/fmaussion/salem.git
|
|
|
|
~~~
|
|
|
|
|
|
|
|
If you want to run the jupyter-notebooks in the repository make sure you also install those tools in your environment:
|
|
|
|
|
|
|
|
~~~
|
|
|
|
conda install -c conda-forge ipykernel
|
|
|
|
~~~
|
|
|
|
|
|
|
|
You can add to your jupyter notebook installation a kernel to select this environment every time you activate the notebook.
|
|
|
|
|
|
|
|
~~~
|
|
|
|
python -m ipykernel install --user --name sst_env --display-name "sst_env"
|
|
|
|
~~~
|
|
|
|
|
|
|
|
|
|
|
|
**Install the repository itself**
|
|
|
|
----------------------------------
|
|
|
|
|
|
|
|
For this to work you'll need to have the [git](https://git-scm.com/) software installed on your system. Then, clone the latest repository version:
|
|
|
|
|
|
|
|
~~~
|
|
|
|
git clone git@git.noc.ac.uk:brecinosrivas/orchestra-sst.git
|
|
|
|
~~~
|
|
|
|
|
|
|
|
If you are inside [JASMIN](https://help.jasmin.ac.uk/article/185-generate-ssh-key-pair),
|
|
|
|
you might have to configure your **Gitlab** ssh keys (under **Gitlab Profile >> Settings > Ssh keys**).
|
|
|
|
And add a JASMIN pub key to your profile (generated from within a JASMIN's sci-server).
|
|
|
|
This in order to enable access from JASMIN sci servers to your NOC gitlab platform and
|
|
|
|
to clone the repository within one of JASMIN's sci servers.
|
|
|
|
|
|
|
|
For more information on gitlab ssh keys [click here](https://git.noc.ac.uk/help/ssh/README.md). |