New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
user/techene/TP_NEMO – NEMO
wiki:user/techene/TP_NEMO

Version 6 (modified by techene, 3 years ago) (diff)

--

Make sure proper libs are at proper places

File tree

Note that in the provided environment XIOS and softwares from INSTALL should be already compiled.

HOME
  |-- XIOS
  |-- INSTALL
  |-- NEMO
        |-- arch
             |-- arch-MY_ENV.fcm
             |-- arch-linux_gfortran.fcm
             |-- ...
        |-- tests
             |-- CANAL
             |-- ...
        |-- cfgs
             |-- ORCA2_ICE_PISCES
             |-- ...

arch-MY_ENV.fcm

In arch-MY_ENV.fcm you must specify where is what, you must also specify compilers and compilers option :

%NCDF_HOME           $HOME/INSTALL
%HDF5_HOME           $HOME/INSTALL
%XIOS_HOME           $HOME/XIOS
...
%CPP	             cpp -Dkey_nosignedzero
%FC	             /usr/bin/mpif90 -c -cpp
%FCFLAGS             -fdefault-real-8 -O3 -funroll-all-loops -fcray-pointer -ffree-line-length-none
%FFLAGS              %FCFLAGS
%LD                  /usr/bin/mpif90 -Wl,-rpath=$HOME/INSTALL/lib:/usr/lib
...

Get NEMO code for users

# root
cd HOME
# my login
me=techene
# get last trunk revision 
svn co forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/release/r4.0/r4.0.5 NEMO
# let's go !
cd NEMO

Get NEMO code for developers

# root
cd HOME
# my login
me=techene
# get last trunk revision 
svn co svn+ssh://${ME}@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/trunk NEMO
# let's go !
cd NEMO

Compile NEMO

generic example : ./makenemo -n MY_CONFIG -j 6 -m MY_ENV

  • Replace -n MY_CONFIG by names you find in NEMO/tests prefixed with -a or NEMO/cfgs prefixed with -r.
  • Replace MY_ENV by linux_gfortran or by any name you chose when you created your arch file.
# check you are in HOME you want to go to HOME/NEMO
pwd
# Let's go !
cd NEMO
# generic example : ./makenemo -n MY_CONFIG -j 6 -m MY_ENV 
./makenemo -h
# compile ORCA2 configuration in the pre-set environment
./makenemo -r ORCA2_ICE_PISCES -j 6 -m linux_gfortran
# compile CANAL configuration in the pre-set environment
./makenemo -a CANAL -j 6 -m linux_gfortran

Resulting executable is created in a repository associated with the MY_CONFIG configuration. In the generic example case it is ./*/MY_CONFIG/EXP00/. * stands either for tests or cfgs depending on where your configuration was originally located.

Run NEMO's ORCA2 configuration

# check you are in HOME/NEMO you want to go to HOME/NEMO/cfgs/ORCA2_ICE_PISCES/EXP00
pwd
# Let's go !
cd ./cfgs/ORCA2_ICE_PISCES/EXP00
# Check executable presence
ls -lrt
# Run NEMO on 4 nodes (default)
mpirun -np 4 ./nemo
# Run NEMO with customize parameters
vi namelist_cfg
mpirun -np 4 ./nemo
# Check NEMO runtime
time mpirun -np 8 nemo

What happens ? namelist_cfg is the parameter file that is where you change values and input files in order to customize your run.

  • change the model time step
  • change the file frequency

Run NEMO's CANAL configuration

# check you are in HOME/NEMO you want to go to HOME/NEMO/tests/CANAL/EXP00
pwd
# Let's go !
cd ./tests/CANAL/EXP00
# Check executable presence
ls -lrt
# Run NEMO on 4 nodes (default parameters)
mpirun -np 4 ./nemo
# Run NEMO with customize parameters
vi namelist_cfg
mpirun -np 4 ./nemo
# Check NEMO runtime
time mpirun -np 8 nemo

What happens ? NEMO's sources (files.F90) are in src and in ./tests/CANAL/MY_SRC here we may want to change them in order to implement new features such as boundary condition shape. In that case we have to compile NEMO each time we change a source file.

  • change the model time step
  • change the file frequency

Attachments (2)

Download all attachments as: .zip