Rate This Document
Findability
Accuracy
Completeness
Readability

Compiling and Installing SWAN

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Run the following commands to go to the installation directory and decompress the software package:
    cd /path/to/SWAN
    tar -zxvf swan4131.tar.gz
    cd swan4131
  3. Run the following commands to modify the platform.pl file:
    1. Open platform.pl.
      vim platform.pl
    2. Press i to go to the insert mode.
      Modify line 406:
      print OUTFILE "F90_MPI = mpifort\n";
      Modify line 414:
      print OUTFILE "NETCDFROOT =/path/to/NETCDF\n";
      Modify line 788 to $compiler = "gfortran";.
      782 sub getcmpl {
      783
      784    my $compiler = $ENV{'FC'};
      785
      786    unless ( $compiler ) {
      787       foreach ('ifort','gfortran','f90','ifc','efc','pgf90','xlf90', 'lf95','g95') {
      788          $compiler = "gfortran";
      789          my $path  = `which $compiler`;
      790          last if $path;
      791       }
      792    }
      793
      794    return $compiler;
      795 }
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  4. Run the following command to generate the configuration file:
    make config
  5. Run the following command to generate the swan.exe file:
    make mpi