Building with netCDF support

SWAN 40.91A+ contains extensions that provide netCDF output of spectra and maps of several wave parameters. Carry out the following steps.

  1. Make sure that netCDF 4.5.x or greater is compiled and available on your system. For details, consult netCDF downloads. The Fortran interface must have been enabled when netCDF was built.
  2. Define the variable NETCDFROOT in file macros.inc to point to the netCDF root directory (e.g. NETCDFROOT=/usr/local/netcdf in case of Linux or
    NETCDFROOT=C:$\backslash$PROGRAM FILES$\backslash$netcdf in case of Windows). This enables to compile netCDF I/O into SWAN.
  3. Build SWAN as usual (e.g. make mpi); see Section 3.2.2.



The SWAN team 2024-03-19