For general information, see the ADCIRC site, ADCIRC FAQ, or the ADCIRC Wikipedia page. For model documentation not yet available on the wiki, see the ADCIRC site. New content is being continuously added to the ADCIRCWiki, and material from the main ADCIRC site will be gradually transitioned over to the wiki.
Getting Started in Linux/Unix
Getting Started in Linux/Unix
This section of the wiki describes the most basic scenario of running ADCIRC on a Linux/Unix computer, using a simple test case as an example. If the user is running ADCIRC through the SMS application, please see the SMS documentation on running ADCIRC within SMS. This wiki does not cover that usage. And although the general process of running ADCIRC on a Windows computer or cluster is the same as for Linux/Unix, this section does not cover compiling ADCIRC on a Windows computer. See Getting Started in Windows.
Initially, we will describe getting ADCIRC running on a simple test case in "serial" mode, meaning that only one cpu is used. Running ADCIRC in parallel mode is moderately more complex and will be described separately.
This section provides details on the following topics, with the serial, quarter annular harbor test case as a working example. Compiling the code for serial execution, the basic input/output files for ADCIRC, and what to do with the output. Overviews of the main input and output files are also described. This section assumes several things. The user ...
- knows ADCIRC is a finite element model, with linear triangular elements
- has access to a computer on which to run ADCIRC, and that the OS is Unix/Linux
- knows how to edit text files
- is familiar with working on computers via the "command line"
- has the source code
- has a compiler available (see notes below)
The ADCIRC model is written in Fortran and needs to be compiled into executable code for the specific computer. Thus, the user needs a Fortran compiler available to translate the text source code into something the computer can execute. The mechanics of compiling ADCIRC are independent of the specific compiler. The ADCIRC Developers Guide also has useful documentation on compiling, and readers may wish to look to it for further assistance.
Do you have a Fortran compiler?
Which compiler do I use?
If a compiler is not available and you have administrative access to the computer, install the GNU Fortran compiler. Otherwise, have an administrative user install it. The compiler is available here. If you are working on a High-Performance Computing (HPC) cluster maintained as a research and applications resource, then the chances are very high that a Fortran compiler exists on the cluster. In fact, there are probably several, typically including the GNU Fortran computer gfortran, and commercial compilers from Intel (ifort) and Portland Group (pgf). Which compiler you actually use depends on how your specific user environment is configured. Large clusters frequently use the "module" approach to add applications to the user's environment, or else just publish a list of compilers and how to add paths to them. Consult your system's documentation or an administrator if you cannot determine what compiler is available.
OK, actual compile time
The ADCIRC source code is packaged in directories ("folders"). The actual compiling is done in the "work" directory. In a terminal (i.e., on the command-line), go there. In this directory, there is a file called "makefile", which is a system for compiling software into executable code. There is also a file called cmplrflags.mk that contains sections for different compilers. You can either edit this file to specify the compiler or you can specify the compiler at the command line. For instance, assuming that you have the gfortran compiler available somewhere on your environment's PATH, do one of the following:
- Edit the cmplrflags.mk file by uncommenting the line that says
compiler=gnu. This will tell the make process to use compiler information as defined in the "gnu" section for a Linux OS. At the command prompt, type
- Skip editing the cmplrflags.mk file and just type
make adcirc compiler=gnu.
This will compile the serial ADCIRC model. If compilation is successful, there should be an executable file named "adcirc" in the work directory. If you receive errors when compiling and are unsure how to deal with them, a quick search for the error on the internet may help you identify issues, such as compiler flag(s) or software libraries needed for your system. If you are not successful, you may need to reach out to an administrator for your system or to the ADCIRC listserv.
Running the Serial Quarter Annular Harbor Test Case
The test case is the so-called serial quarter annular problem. It is described in some detail here. The ADCIRC grid is only 63 nodes (triangle vertices) and 96 elements. A plot of the grid is shown to the right. The red arc indicates open boundary nodes, and the green lines represent land (i.e., no flow) boundaries. The forcing for this test is a 0.3048 meter M2 tide on the open boundary, run for 5 days with a 180 sec timestep and a 2 day ramp up of the boundary forcing.
- Get the test case here.
- Extract the downloaded file. It will expand into a directory called "serial_quarter_annular_v51_52_20/". Go there and extract the contents.
- There are several files in this directory. The fort.14 and fort.15 files are input files. The rest are output by ADCIRC and contain various parts of the solution.
- Run the previously compiled ADCIRC serial executable by either copying it to this test case directory and executing it by typing
./adcirc, or by using the relative or absolute path to the executable (e.g.,
This serial case is very fast. It will produce these output files:
- adcirc.log - runtime diagnostic log file
- fort.16 - another runtime diagnostic log file
- fort.33 - iterative solver diagnostic file
- fort.61 - station output file
- fort.67 - alternating hotstart file
- fort.68 - alternating hotstart file
- maxele.63 - maximum water level over duration of simulation
- maxvel.63 - maximum depth-averaged water speed over duration of simulation
If you get this far, then the case ran. Now it's time to visualize the results.