Fortran is a programming language that is used heavily in groundwater flow and contaminant transport numerical modeling.

To get started with Fortran, you will need a compiler, a text editor, and a shell; for visualization you will need a graphing utility.

  • Open-source Compiler: gfortran
  • Open-source Text Editor: notepad++
  • Shell : Command Prompt (Windows operating system)
  • Open-source Graphing Utility: gnuplot

A typical order for running Fortran is as follows:

1) write code in notepad++ (gobucks)

2) compile code using gfortran via the command prompt {gfortran gobucks.f95 -o gobucks}, 3) execute code via the command prompt {gobucks}, and 4) write results to a text file via the command prompt {gobucks>C:\Users\wendy\fortran\gobucks.txt}

5) view results in a text file

In an effort to teach Fortran for groundwater modeling, updated pre-Fortran 90/95 code from Wang and Anderson (1982) to Fortran 90/95  code is provided in the .txt files below; many of the pre-Fortran 90/95 statements in Wang and Anderson are obsolescent or deleted, but the fundamentals of the code remain highly relevant today.   To run the .txt files below, you must first save them as .f95 files, then compile them using gfortran to .exe files, and then run them as programs; each program will generate an output file of the simulation as a .txt file, this output file can then be read as in input file for visualization, e.g., iso-head contour maps, using gnuplot. A draft document with much more detail for computation and visualization of groundwater flow is here: Computation and Visualization of Groundwater Flow

Updated Fortan code from Wang and Anderson (1982) & Gnuplot code for visualization of groundwater flow

Visualizations of Groundwater Flow