Run "sudo port install subversion autoconf automake libtool pkg-config netcdf netcdf-fortran"
Give your password if requested
You'll need subversion to download the XBeach source code, although you could download the source code as a ZIP file from the http://xbeach.org website. But that is not cool. Then you need autoconf, automake, libtool and pkg-config to prepare the compilation for your system. In theory you can do without it, but nobody knows how. Finally you'll need the netcdf and netcdf-fortran packages to be able to compile XBeach with the self-explanatory netCDF output format rather than the default Fortran binary output. This is optional, but advisable for most applications. You can search for even more packages using "port search <packagename>". If you wish. |
Run "sudo easy_install mako"
XBeach is written in Fortran. But a lot of code is repetitive in XBeach, for example the handling of all input parameters and output variables. Since this is hard to maintain and tedious to code we use a Python preprocessor that writes this repetitive code for us based on templates. These templates depend on the mako package, which you need to install. Python is shipped with all Mac OS X and UNIX distributions and even with the latest Windows versions, so it should be available to you. |
Run "make"
You baked a netCDF-compatible XBeach executable. You can skip the "--with-netcdf" option to get a ordinary XBeach executable. Make sure to run "make clean" first if you change your configuration options. In addition, you could add the option "--with-mpi" to obtain a parallel version of XBeach. This would require you to install the mpich libraries using "sudo port install mpich". |