Rate This Document
Findability
Accuracy
Completeness
Readability

Compilation and Installation

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Run the following commands to create and go to the NEMO installation directory:
    mkdir -p /path/to/NEMO
    cd /path/to/NEMO
  3. Run the following commands to configure the NEMO environment variables:
    echo "export NETCDF_DIR=/path/to/NETCDF" >> nemo-env.sh
    echo "export HDF_DIR=/path/to/HDF5" >> nemo-env.sh
    echo "export XIOS_DIR=/path/to/XIOS/xios-1.0" >> nemo-env.sh
    source nemo-env.sh
  4. Run the following command to decompress the installation package:
    unzip NEMO_releases_release-3.6-10083.zip
  5. Run the following command to go to the NEMO source code directory:
    cd NEMO/releases/release-3.6/NEMOGCM
  6. Run the following command to create an arch-aarch64_gnu.fcm file:
    1. Create arch-aarch64_gnu.fcm.
      vi ARCH/arch-aarch64_gnu.fcm
    2. Press i to enter the insert mode and add the following content:
      #generic gfortran compiler options for linux 
      #NCDF_INC    netcdf include file 
      #NCDF_LIB    netcdf library 
      #FC          Fortran compiler command 
      #FCFLAGS     Fortran compiler flags 
      #FFLAGS      Fortran 77 compiler flags 
      #LD          linker 
      #LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a 
      #FPPFLAGS    pre-processing flags 
      #AR          assembler 
      #ARFLAGS     assembler flags 
      #MK          make 
      #USER_INC    additional include files for the compiler,  e.g. -I<include dir> 
      #USER_LIB    additional libraries to pass to the linker, e.g. -l<library> 
      #CC          C compiler used to compile conv for AGRIF 
      #CFLAGS      compiler flags used with CC 
      # 
      #Note that: 
      # - unix variables "$..." are accpeted and will be evaluated before calling fcm. 
      # - fcm variables are starting with a % (and not a $) 
      %NCDF_HOME           $NETCDF_DIR
      %HDF5_HOME           $HDF_DIR
      %XIOS_HOME           $XIOS_DIR
      
      %NCDF_INC            -I%NCDF_HOME/include -I%HDF5_HOME/include
      %NCDF_LIB            -L%HDF5_HOME/lib -L/%NCDF_HOME/lib -lnetcdf -lnetcdff
      %XIOS_INC            -I%XIOS_HOME/inc
      %XIOS_LIB            -L%XIOS_HOME/lib -lxios
      
      %CPP                 cpp -Dkey_nosignedzero
      %FC                  mpif90 -c -cpp
      %FCFLAGS             -mcpu=native -fdefault-real-8 -fdefault-double-8 -O3 -funroll-all-loops -fcray-pointer -ffree-line-length-none -g
      %FFLAGS              %FCFLAGS
      %LD                  mpif90
      %LDFLAGS             -lstdc++
      %FPPFLAGS            -P -C -traditional
      %AR                  ar
      %ARFLAGS             rs
      %MK                  gmake
      %USER_INC            %XIOS_INC %NCDF_INC
      %USER_LIB            %XIOS_LIB %NCDF_LIB
      
      %CC                  cc
      %CFLAGS              -O0

      Ensure that no space exists at the end of a line or empty line.

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  7. Run the following commands to compile and install the software:
    chmod 777 ./ -R
    cd ./CONFIG/
    ./makenemo -m aarch64_gnu -j 32 -r AMM12 -n 'MY_AMM12' add_key "key_nosignedzero"