.. toctree:: :maxdepth: 2
OASIS with its Python API must be installed first. More informations may be found on CERFACS website.
- Prerequisites:
- Fortran / C compilers
- Python environment
netcdf
library
Get OASIS sources by cloning git repository:
git clone https://gitlab.com/cerfacs/oasis3-mct.git cd oasis3-mct
Check commit and go in compilation directory:
git checkout OASIS-MCT_5.0 cd util/make_dir
OASIS libraries must be dynamically compiled. Edit your own
make.<YOUR_ARCH>
file.Be sure to have the following flags defined for dynamic compilation:
DYNOPT = -fPIC LDDYNOPT = -shared -lnetcdff -lnetcdf
NB: Arch files for common used HPC centers are provided in repository. Do not forget to edit
COUPLE = /PATH/TO/oasis-mct3
.Edit
make.inc
by adding:include $(YOUR_OASIS_HOME)/oasis3-mct/util/make_dir/make.<YOUR_ARCH>
Run Makefile:
make -f TopMakefileOasis3 pyoasis
If everything goes right, you should find the following libraries in
oasis3-mct/BLD/lib/
:- libmct.so
- libmpeu.so
- liboasis.cbind.so
- libpsmile.MPI1.so
- libscrip.so
Source the following files to initialize PyOASIS modules. The best is to put those commands in your
.bash_profile
:source /PATH/TO/oasis3-mct/BLD/python/init.sh source /PATH/TO/oasis3-mct/BLD/python/init.csh
Some python packages are required to use PyOASIS:
- mpi4py
- numpy
- netcdf4
Those are not compulsory but useful to run the tests:
- matplotlib
- scipy
- shapely
- cartopy
- pytest
NB: A conda environment file
pyoasis.yml
is provided in repository for the tests.
- Go in directory
../oasis3-mct/pyoasis/tests
and typepytest
command to run unit tests. - If successful, go in
../oasis3-mct/pyoasis/
and typemake test
to execute Fortran, C and Python operating tests.
Check or use the conda environment file
eophis.yml
provided in repository to install the required python packages.Clone a copy of the Eophis repository to your local machine.
git clone https://github.com/meom-group/eophis.git
Install Eophis with pip:
cd eophis pip install .
- Run unit tests:
cd tests
pytest
- Checkout Tests section of this documentation to run operating tests.