--- Welcome to the official ADCIRCWiki site! The site is currently under construction, with limited information. ---
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

From ADCIRCWiki
Revision as of 15:18, 11 February 2019 by Bblanton (talk | contribs) (Getting Started in Linux/Unix)
Jump to: navigation, search

Getting Started in Linux/Unix

As with most useful and complex models, just getting started is the main initial barrier. 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 Windoze computer or cluster is the same as for Linux/Unix, this section does not cover compiling ADCIRC on a Windoze computer. See "Compiling and Running ADCIRC on Windoze" instead.

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 files (using an editor such as vi/vim, emacs (really?), or a GUI editor)
  • is familiar with working on computers via the "command line" (i.e., not clicking around with the mouse as in Windoze)
  • has the source code (which is not freely available)
  • has a compiler available (see notes below)

Compiling ADCIRC

The ADCIRC model is written in Fortran (the best language eva') 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.

Do you have a Fortran compiler?

If the answer to this question is "Huh?", then read this: Fortran-Wikipedia and this: Compilers-Wikipedia.

Which Compiler Do I Use?

If you are working on a desktop machine, you probably know if a compiler is available. If one 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: https://gcc.gnu.org/wiki/GFortranBinaries

If you are working on a High-Performance Computing (HPC) cluster maintained as a research and applications resource, then the chances are high (i.e., 100%) 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.

Regardless, let's assume that you have a compiler identified. The mechanics of compiling ADCIRC are independent of the specific compiler.

OK, actual compile time

The ADCIRC source code is packaged in directories ("folders" in Windoze parlance). 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. Assuming that you have the gfortran compiler available somewhere on your environment's PATH, 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 "make adcirc" to compile the serial ADCIRC model.

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: [1]. 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 tilmestep and a 2 day rampup of the boundary forcing.

Quarter Annular Harbor Test Case Grid
  • Get the test case here: [2] Unzip/untar the downloaded file. It will expand into a directory called "serial_quarter_annular_v51_52_20/". Go there and uncompress 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 (./adcirc), or by using the relative or absolute path to the executable (e.g., /home/MyUserName/ADCIRC/work/adcirc).
  • This serial case is very fast. It will produce this output:
    • 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. Go here for various approaches to visualization and analysis.