我要评分
获取效率
正确性
完整性
易理解

Compilation and Installation

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Go to the NEMO installation directory.
    cd /path/to/NEMO
  3. Set 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. Decompress the installation package.
    unzip NEMO_releases_release-3.6-15515.zip
  5. Go to the NEMO source code directory.
    cd NEMO/releases/release-3.6/NEMOGCM
  6. Create an arch-aarch64_gnu.fcm file.
    1. Create an arch-aarch64_gnu.fcm file.
      vi ARCH/arch-aarch64_gnu.fcm
    2. Press i to enter the edit 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
      %FC                  mpifort
      %FCFLAGS             -cpp -r8 -O3 -mcpu=native
      %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                  clang
      %CFLAGS              -O0
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  7. 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"