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 command to switch to the directory where WAVEWATCH III is installed:
    cd /path/to/WAVEWATCH
  3. Run the following command to decompress the WAVEWATCH III source code package:
    tar -xvf WW3-6.07.1.tar.gz
  4. Run the following command to switch to the directory containing the decompressed files:
    cd  WW3-6.07.1
  5. Run the following command to create the environment variable file:
    1. Create an environment variable file.
      vi env_ww3.sh
    2. Press i to enter the insert mode and add the following content:
      ############# gnu + openmpi #################
      export PATH=/path/to/GNU/bin:$PATH
      export LD_LIBRARY_PATH=/path/to/GNU/lib64:$LD_LIBRARY_PATH
      export PATH=/path/to/OpenMPI/bin:$PATH
      export LD_LIBRARY_PATH=/path/to/OpenMPI/lib:$LD_LIBRARY_PATH
      
      ############# netcdf #################
      export NETCDF_DIR=/path/to/NETCDF
      export NETCDF_LIBDIR=$NETCDF_DIR/lib
      export NETCDF_INCDIR=$NETCDF_DIR/include
      export PATH=$NETCDF_DIR/bin:$PATH
      export LD_LIBRARY_PATH=$NETCDF_LIBDIR:$LD_LIBRARY_PATH
      export WWATCH3_NETCDF=NC4
      export NETCDF_CONFIG=$NETCDF_DIR/bin/nc-config
      
      ############# metis #################
      export METIS_PATH=/path/to/METIS
      export PATH=$METIS_PATH/bin:$PATH
      export LD_LIBRARY_PATH=$METIS_PATH/lib:$LD_LIBRARY_PATH

      /path/to/GNU indicates the GNU 9.1 installation path, /path/to/OPENMPI indicates the Open MPI installation path, /path/to/NETCDF indicates the NetCDF and NetCDF-Fortran installation path, and /path/to/METIS indicates the ParMETIS installation path.

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  6. Run the following command to load environment variables:
    source env_ww3.sh
  7. Run the following command to configure the WAVEWATCH III parameters (pay attention to the information in bold):
    ./model/bin/w3_setup  model/
    *****************************
    ***   WAVEWATCH III setup     ***
    *****************************
    
    
    [INFO] local env file wwatch3.env created in /home/WW3-6.07.1/model/bin/wwatch3.env
    Setup file /home/WW3-6.07.1/model/bin/wwatch3.env not found
    
    Default set up :
    Printer (listings)       : printer
    Auxiliary FORTRAN comp.  : gfortran
    Auxiliary C compiler     : gcc
    Scratch directory        : /path/to/WAVEWATCH/WW3-6.07.1/model/tmp
    Save sources             : yes
    Save listings            : yes
    Update settings ? [y/n] y
    
    Creating new set-up :
    
    Printer for listings [printer] :
    Auxiliary FORTRAN compiler [gfortran] :
    Auxiliary C compiler [gcc] :
    Scratch space [/home/wdy/WW3-6.07.1/model/tmp] :
    Save source code files (*.f)  [yes] :
    Save listing files  [yes] :
    
    Modified set up :
    Printer (listings)       : printer
    Auxiliary FORTRAN comp.  : gfortran
    Auxiliary C compiler     : gcc
    Scratch directory        : /path/to/WAVEWATCH III/WW3-6.07.1/model/tmp
    Save sources             : yes
    Save listings            : yes
    New settings OK ? [y/n] y
    
    Setup makefile for auxiliary programs
    ......
    Create required model subdirectories
    Finished setting up WAVEWATCH III