Recompiling your own sources

You may develop and modify the original (MASTER) version of the SURFEX code.
Here we explain how to compile your own sources only.

Suppose you want to create a "MYSRC" version.

1. Prepare your source directory
Put your own sources in a subdirectory of "$SRC_SURFEX/src" named $SRC_SURFEX/src/MYSRC

2. Recompiling
Logout of the current session to be sure to unset all the environnement variables loaded with the your ’master ’profile_surfex’. Login again and go in your src/ directory
- set the variable "VER_USER" with the name of your "USER VERSION",
- set also the optional ARCH, VER_MPI... you want to use.
and run again the "./configure" command

export VER_USER=MYSRC
./configure

This will regenerate the "profile-surfex" file and a copy of this with the extent "profile_surfex...$VER_USER..."
As for the compilation of the MASTER version, load it & and compile with the command "make user"

. ../conf/profile_surfex-LXgfortran-SFX-V9-0-0-MYSRC-MPIAUTO-OMP-O2-X0
make user

This will compile only your sources and the files depending on your sources and generate the new executables in your own directory dir_obj-**/MYSRC/

3. Install the new binaries in the $SRC_SURFEX/exe/

make installuser