Getting Started
===============
.. toctree::
:maxdepth: 2
In this tutorial, we will deploy a CROCO hybrid modeling experiment.
.. warning :: WORK IN PROGRESS
Prerequisites to the turorial:
- ...
Introduction
------------
1. Morays environment
---------------------
Every Morays experiments with CROCO require a couple of shared libraries. We quickly summarize the steps to install them.
Compile OASIS3-MCT_v5.0
~~~~~~~~~~~~~~~~~~~~~~~
OASIS3-MCT is the coupling library on which both NEMO and Eophis rely to perform field exchanges. OASIS3-MCT_v5.0 is the minimal required version and must be dynamically compiled. See `OASIS3-MCT documentation `_ for more details.
.. code-block:: bash
# Clone OASIS3-MCT_v5.0
cd ~/
git clone https://gitlab.com/cerfacs/oasis3-mct.git
cd ~/oasis3-mct
git checkout OASIS-MCT_5.0
cd util/make_dir
Edit your own ``make.`` file. Be sure to have the following flags defined for dynamic compilation:
.. code-block:: bash
DYNOPT = -fPIC
LDDYNOPT = -shared -lnetcdff -lnetcdf
.. code-block:: bash
# Link your architecture file for compilation
echo "include ~/oasis3-mct/util/make_dir/make." > make.inc
# Compile dynamic libraries
make -f TopMakefileOasis3 pyoasis
.. note :: In the following, we will compile NEMO with OASIS3-MCT. Just keep in mind where OASIS3-MCT_v5.0 dynamic libraries are stored. Let's assume for the tutorial that they are at this location:
.. code-block :: bash
ls ~/oasis3-mct/BLD/lib/
libmct.so libmpeu.so liboasis.cbind.so libpsmile.MPI1.so libscrip.so
Compile XIOS
~~~~~~~~~~~~
XIOS is used by NEMO to write results. It must be compiled with the abovementioned OASIS3-MCT libraries. See `XIOS documentation `_ for more details about compilation of XIOS with OASIS3-MCT.
.. code-block:: bash
# Clone XIOS
cd ~/
git clone -b XIOS2 https://gitlab.in2p3.fr/ipsl/projets/xios-projects/xios.git XIOS_OASIS
cd ~/XIOS_OASIS/
Edit your ``arch-.path`` file to include the OASIS3-MCT libraries directories and bindings:
.. code-block:: bash
# edit arch files
vi archs/arch-.path
# ...
OASIS_INCDIR="-I~/oasis3-mct/BLD/include/ -I~/oasis3-mct/BLD/build-shared/lib/cbindings/"
OASIS_LIBDIR="-L~/oasis3-mct/BLD/lib"
OASIS_LIB="-loasis.cbind -lpsmile.MPI1 -lscrip -lmct -lmpeu"
.. code-block:: bash
# Compile
./make_xios --full --prod --arch --use_oasis oasis3_mct
# library should be here
ls lib/
libxios.a
2. Experiment environment
-------------------------
Now that we have set up the common environment for all Morays experiments, we need to install the dependencies related to the specific experiment of interest. Let's find it in the `Morays repositories `_. Those are named with a simple convention: ``-``. The corresponding repository for the tutorial is then ``CROCO-...``. We clone the tutorial branch:
3. CONFIG - CROCO case
----------------------
Morays patch
~~~~~~~~~~~~
Experiment patch
~~~~~~~~~~~~~~~~
4. RUN - CROCO settings
-----------------------
5. INFERENCES - Python material
-------------------------------
6. Running the experiment
-------------------------
7. POST-PROCESS and RES
-----------------------
Going further
-------------
From now on, you have an useable deployed Morays experiment for CROCO. Do not hesitate to check out and deploy other test cases to get inspired.
Here are the locations where you can play with:
Next chapters of this documentation provide more details on how to configure the CROCO external communication module, and to create a Morays experiment for CROCO from scratch.