Table of Contents

CDAT 8.0 installation notes

[ Back to all versions ]

UV-CDAT is now the “Community Data Analysis Tools” (CDAT)

Follow the instructions about the conda-based versions of UV-CDAT initialization for actually using an installed version of 8.0

What's New?

Installation with Miniconda3

Installing Miniconda3

The steps below are adapted from the older (but with lots of extra and possibly useful details) installing miniconda instructions

Post-Miniconda3 installation

The idea is to remove the miniconda3 initialization lines that were automatically added at the end of .bashrc and put them (and other useful commands) in a special initialization file, that can be sourced only when we actually want to use conda and CDAT (in order to avoid potentiel side effects)

New style initialization

Note: this is the new conda activate some_version style

See the ~jypeter/.conda3_jyp.sh file below, and how to use it, in a bash shell. In a tcsh shell, see the ~jypeter/.conda3_jyp.csh further down. In both shell cases, if you are installing your own version of python, you need to use your own location of the initialization files in the source lines, and you can use another file name than conda3_jyp

$ which python
/usr/bin/python

$ cat ~jypeter/.conda3_jyp.sh
# Conda initialization by JYP, NEW style
#
# Use this for working with conda and CDAT centrally managed by JYP
#
# Execute this file in a BASH shell with
#     source path/this_file
# Then get the list of available python distributions with
#     conda env list
# Then activate a specific distribution with
#     conda activate version_name
#
# More details in:
#   https://wiki.lsce.ipsl.fr/pmip3/doku.php/other:python:starting#conda-based_versions_of_uv-cdat
#   https://wiki.lsce.ipsl.fr/pmip3/doku.php/other:uvcdat:conda_notes
#
# Jean-Yves Peterschmitt - LSCE - 11/2018

source /home/share/unix_files/cdat/miniconda3/etc/profile.d/conda.sh

# Use the alias below to easily determine where your python
# interpreter is located
alias wp="which python"

# Where are ALL the python interpreters in the search path
alias wpa="which -a python"

# The end

$ source ~jypeter/.conda3_jyp.sh

$ conda activate
(base) $ which python
/home/share/unix_files/cdat/miniconda3/bin/python

tcsh shell usage example

 >which python
/usr/bin/python

 >cat ~jypeter/.conda3_jyp.csh
# Conda initialization by JYP, NEW style
#
# Use this for working with conda and CDAT centrally managed by JYP
#
# Execute this file in a TCSH shell with
#     source path/this_file
# Then get the list of available python distributions with
#     conda env list
# Then activate a specific distribution with
#     conda activate version_name
#
# More details in:
#   https://wiki.lsce.ipsl.fr/pmip3/doku.php/other:python:starting#conda-based_versions_of_uv-cdat
#   https://wiki.lsce.ipsl.fr/pmip3/doku.php/other:uvcdat:conda_notes
#
# Jean-Yves Peterschmitt - LSCE - 11/2018

source /home/share/unix_files/cdat/miniconda3/etc/profile.d/conda.csh

# Use the alias below to easily determine where your python
# interpreter is located
alias wp "which python"

# The end

 >source  ~jypeter/.conda3_jyp.csh

 >conda activate

(base) >which python
/home/share/unix_files/cdat/miniconda3/bin/python

You probably don't want to type the source line each time you need to use your conda based python, so you can add a source ~jypeter/.conda3_jyp.sh line in your ~/.bashrc file, and source ~jypeter/.conda3_jyp.csh line in your ~/.cshrc file. Then, when you need a specific python environment, just type conda activate name_of_the_specific_environment

Old style initialization

The old style notes below are just for reference sake and you can skip them

Note: this is the old source activate some_version style

See the ~jypeter/.conda3old_jyp.sh file below, and how to use it, in a bash shell

bash-4.2$ which python
/usr/bin/python

$ cat .conda3old_jyp.sh
# Conda initialization by JYP, OLD style
#
# Use this for working with conda and CDAT centrally managed by JYP
#
# Execute this file in a BASH shell with
#     source path/this_file
# Then get the list of available python distributions with
#     conda env list
# Then activate a specific distribution with
#     source activate version_name
#
# More details in:
#   https://wiki.lsce.ipsl.fr/pmip3/doku.php/other:python:starting#conda-based_versions_of_uv-cdat
#   https://wiki.lsce.ipsl.fr/pmip3/doku.php/other:uvcdat:conda_notes
#
# Jean-Yves Peterschmitt - LSCE - 11/2018

export PATH="/home/share/unix_files/cdat/miniconda3/bin:$PATH"

# Use the alias below to easily determine where your python
# interpreter is located
alias wp="which python"

# Where are ALL the python interpreters in the search path
alias wpa="which -a python"

# The end

$ source ~jypeter/.conda3old_jyp.sh

$ wp
/home/share/unix_files/cdat/miniconda3/bin/python

Installing CDAT 8.0

Python 2.7 version

$ conda create -n cdat-8.0_py2 -c cdat/label/v80 -c conda-forge -c cdat python=2.7 cdat
# Generate the list of installed packages
$ conda list -n cdat-8.0_py2 > /home/scratch01/jypeter/cdat-8.0_py2_list_181108.txt

List of installed packages: cdat-8.0_py2_list_181108.txt

Disk space after 8.0 installation

$ du -sh /home/share/unix_files/cdat/miniconda3
4.3G    /home/share/unix_files/cdat/miniconda3
$ du -sh /home/share/unix_files/cdat/miniconda3/*
15M     /home/share/unix_files/cdat/miniconda3/bin
2.4M    /home/share/unix_files/cdat/miniconda3/compiler_compat
4.0K    /home/share/unix_files/cdat/miniconda3/conda-bld
3.7M    /home/share/unix_files/cdat/miniconda3/conda-meta
2.8G    /home/share/unix_files/cdat/miniconda3/envs
28K     /home/share/unix_files/cdat/miniconda3/etc
4.9M    /home/share/unix_files/cdat/miniconda3/include
156M    /home/share/unix_files/cdat/miniconda3/lib
8.0K    /home/share/unix_files/cdat/miniconda3/LICENSE.txt
1.4G    /home/share/unix_files/cdat/miniconda3/pkgs
1.3M    /home/share/unix_files/cdat/miniconda3/share
24K     /home/share/unix_files/cdat/miniconda3/ssl
12K     /home/share/unix_files/cdat/miniconda3/x86_64-conda_cos6-linux-gnu
$ du -sh /home/share/unix_files/cdat/miniconda3/envs/*
2.8G    /home/share/unix_files/cdat/miniconda3/envs/cdat-8.0_py2

Python 3.6 version

$ conda create -n cdat-8.0_py3 -c cdat/label/v80 -c conda-forge -c cdat python=3.6 cdat

Installing CDAT nightly

Notes:

Python 2.7 version

$ conda create -n cdat-nightly_py2 -c cdat/label/nightly -c conda-forge -c cdat python=2.7 cdat

Not tested! Can this be updated with conda update -n cdat-nightly_py2 -c cdat/label/nightly -c conda-forge -c cdat –all ???

Python 3.6 version

$ conda create -n cdat-nightly_py3 -c cdat/label/nightly -c conda-forge -c cdat python=3.6 cdat

Cloning cdat to add specific packages for LSCE

This section is about the creation of the cdatm17 environment

Notes about actually using the cdatm17 conda-based python

Note: using hard links, cloning a full environment only adds an extra 582M of disk space

$ conda create -n cdatm17_py2 --clone cdat-8.0_py2
Source:      /home/share/unix_files/cdat/miniconda3/envs/cdat-8.0_py2
Destination: /home/share/unix_files/cdat/miniconda3/envs/cdatm17_py2
Packages: 226
Files: 3

[...]

$ du -sh /home/share/unix_files/cdat/miniconda3/envs/*
2.5G    /home/share/unix_files/cdat/miniconda3/envs/cdat-8.0_py2
392M    /home/share/unix_files/cdat/miniconda3/envs/cdatm17_py2
839M    /home/share/unix_files/cdat/miniconda3/envs/cdat-nightly_py2

cdat nightly case

conda create -n cdatm-nightly_py2 --clone cdat-nightly_py2

Getting ready for a moving default CDAT

This step should probably be listed at the end, especially in a multi-user environment! If there is already a cdatm link, make sure that the new version is stable and working correctly before updating the cdatm link

We create a cdatm symbolic link in the envs directory, that has a stable name but can be moved to point to the latest default CDAT. In that case, most users can just activate this cdatm version and always get the latest stable version

$ cd /home/share/unix_files/cdat/miniconda3/envs
$ conda env list
base                  *  /home/share/unix_files/cdat/miniconda3
cdat-8.0_py2             /home/share/unix_files/cdat/miniconda3/envs/cdat-8.0_py2
cdatm17_py2              /home/share/unix_files/cdat/miniconda3/envs/cdatm17_py2
$ ln -s cdatm17_py2 cdatm
$ conda env list
base                  *  /home/share/unix_files/cdat/miniconda3
cdat-8.0_py2             /home/share/unix_files/cdat/miniconda3/envs/cdat-8.0_py2
cdatm                    /home/share/unix_files/cdat/miniconda3/envs/cdatm
cdatm17_py2              /home/share/unix_files/cdat/miniconda3/envs/cdatm17_py2
$ source activate cdatm
(cdatm) bash-4.2$ conda env list
base                     /home/share/unix_files/cdat/miniconda3
cdat-8.0_py2             /home/share/unix_files/cdat/miniconda3/envs/cdat-8.0_py2
cdatm                 *  /home/share/unix_files/cdat/miniconda3/envs/cdatm
cdatm17_py2              /home/share/unix_files/cdat/miniconda3/envs/cdatm17_py2

Customizing UV-CDAT for LSCE

Downloading cdms2/vcs test data

You should download the test data (174M of data…) and use it in the example scripts that you want to distribute, and scripts you write for reporting the errors you find (if any…)

$ source activate cdatm17_py2

(cdatm17_py2) $ python -c 'import vcs; vcs.download_sample_data_files(); print "\nFinished downloading sample data to", vcs.sample_data'
[...]
Finished downloading sample data to /home/share/unix_files/cdat/miniconda3/envs/cdatm17_py2/share/uvcdat/sample_data

(cdatm17_py2) $ du -sh /home/share/unix_files/cdat/miniconda3/envs/cdatm17_py2/share/uvcdat/sample_data
174M    /home/share/unix_files/cdat/miniconda3/envs/cdatm17_py2/share/uvcdat/sample_data

Packages that have no dependency problems

After cloning, we are ready to install some extra packages that may be requested by LSCE users

# Keep a trace of what will be installed
$ conda install --dry-run -n cdatm17_py2 -c conda-forge pillow pandas statsmodels seaborn scikit-image seawater gsw netcdf4 pyferret basemap-data-hires xlsxwriter cmocean rpy2 gdal windspharm  > /home/scratch01/jypeter/lsce-extra_01_install_190304.txt

# Install...
$ conda install -n cdatm17_py2 -c conda-forge pillow pandas statsmodels seaborn scikit-image seawater gsw netcdf4 pyferret basemap-data-hires xlsxwriter cmocean rpy2 gdal windspharm
[...]

# Install extra packages in the nightly version (if you need 'nightly')
$ conda install -n cdatm-nightly_py2 -c conda-forge pillow pandas statsmodels seaborn scikit-image seawater gsw netcdf4 pyferret basemap-data-hires xlsxwriter cmocean rpy2 gdal windspharm

# Check the disk space after installation
$ du -sh /home/share/unix_files/cdat/miniconda3
7.5G    /home/share/unix_files/cdat/miniconda3

$ du -sh /home/share/unix_files/cdat/miniconda3/envs/*
2.5G    /home/share/unix_files/cdat/miniconda3/envs/cdat-8.0_py2
1.2G    /home/share/unix_files/cdat/miniconda3/envs/cdatm17_py2
938M    /home/share/unix_files/cdat/miniconda3/envs/cdatm-nightly_py2
450M    /home/share/unix_files/cdat/miniconda3/envs/cdat-nightly_py2

List of installed packages: lsce-extra_01_install_190304.txt

Packages installed with pip

The following packages have no dependency problems and were installed (or updated) later

TODO

Add here packages that would be useful and have not been installed yet, or have some problems that prevent their installation

Other packages

There is no warranty that the packages listed below will work correctly, because it was required to bypass the compatibility checks in order to install them…

Updating some packages

Some packages change more often than others, and can be easily updated the following way:

Installing CLIMAF

The CLIMAF installation is a special case, because we may want to use it with the Python installed for CDAT, but it is not installed using conda

We follow the steps for the installation of a non-standard server

Cleaning up things

Some packages may have files that can only be read by the person who installed CDAT and the LSCE extensions (eg pcmdi-metrics in 2.8.0 and cdp in 2.10)

We check if some of the installed files are missing read access for the group or other, and we manually change the permissions

 >find /home/share/unix_files/cdat/miniconda3/envs \! -perm /g+r,o+r -ls
# Everything OK!

Extra packages list

Removed packages

Environments summary

After following the steps above, we get the following environments. Use the conda info --envs or the conda env list command to get the up-to-date list of available environments

Environment
name
Server conda list
cdat-8.0_py2 LSCE
cdatm17_py2 LSCE
cdat-nightly_py2 LSCE
ciclad
cdatm-nightly_py2 LSCE
ciclad





[ PMIP3 Wiki Home ] - [ Help! ] - [ Wiki syntax ]