Working on ocean

This section describes the steps to set up and test NEMO v3.4 on ocean .

Create a Workspace

NEMO v3.4 requires

  • bash installed
  • perl installed
  • svn installed
  • FORTRAN90 compiler installed
  • netcdf installed

FORTRAN compiler on ocean cluster is G95.

The directory of netCDF library in ocean is:

cd /usr/lib

Create a space for NEMO v3.4 code and file I/O

mkdir -p /ocean/$NAME/GEOTRACES/

Access to NEMO v3.4 code

Change the permission of code directory

cd /ocean/$NAME
chmod -R a+x GEOTRACES

Compile the code

The arch file for NEMO

cd /ocean/$NAME/GEOTRACES/$CODEDIR/NEMOGCM/ARCH
vim arch-ocean.fcm

arch-ocean.fcm:

# 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>
# ============================================================================
%NCDF_INC            -I/usr/include
%NCDF_LIB            -L/usr/lib -lnetcdff
%FC                  gfortran
%FCFLAGS             -fdefault-real-8 -O3 -funroll-all-loops -fcray-pointer
%FFLAGS              %FCFLAGS
%LD                  gfortran
%LDFLAGS
%FPPFLAGS            -P -C -traditional
%AR                  ar
%ARFLAGS             -rs
%MK                  make
%USER_INC            %NCDF_INC
%USER_LIB            %NCDF_LIB

Configuring a testing case

cd /ocean/$NAME/GEOTRACES/$CODEDIR/NEMOGCM/CONFIG
./makenemo -m ocean -r ORCA2_OFF_PISCES -n case_name add_key "key_nosignedzero key_netcdf4"

Run your case

Download forcing files from NEMO Homepage and place all the files in:

cd /ocean/$NAME/GEOTRACES/$CODEDIR/NEMOGCM/CONFIG/$case_name/EXP00
mv $forcing_file .

After changing NEMO’s output in ocean and other options in different namelists. We can run the model

./opa &

The export information is saved in ocean.output.