Skip to content

Introduction to CE-QUAL-W2

Overview

CE-QUAL-W2 is the U.S. Army Corps of Engineers' (USACE) two-dimensional, longitudinal/vertical, hydrodynamic and water quality model. The model assumes lateral homogeneity, making it best suited for relatively long and narrow waterbodies that exhibit longitudinal and vertical water quality gradients. CE-QUAL-W2 has been applied to rivers, lakes, reservoirs, estuaries, and combinations thereof, including entire river basins with multiple reservoirs and river segments.

What does CE-QUAL-W2 stand for?

The name CE-QUAL-W2 stands for Corps of Engineers - Quality - Width-Averaged 2D.

CE-QUAL-W2 was originally developed at the U.S. Army Engineer Research and Development Center (ERDC). Since Version 3.0, Portland State University (PSU) has been a major CE-QUAL-W2 developer, as well as maintaining an active user community. ERDC resumed active development and maintenance of CE-QUAL-W2 in 2020, with research and development funding from the Ecosystem Management and Restoration Research Program (EMRRP) and Aquatic Nuisance Species Research Program (ANSRP). The ERDC V2026 release builds on the foundation of PSU's V4.5 codebase.

USACE Software Engineering Tools (SET) Program

The USACE Hydrologic, Hydraulic, and Coastal (HH&C) Community of Practice (CoP) utilizes a specialized set of software engineering tools, primarily developed by the USACE Hydrologic Engineering Center (HEC) and the Engineer Research and Development Center (ERDC). The Software Engineering Technology (SET) program provides support for maintenance of these models. ERDC's responsibilities under SET include user support, bug fixes, documentation, QA/QC, development of a new Graphical User Interface (GUI), annual training workshops, and new feature development.

How to Use This Manual

This manual is organized into four parts:

  • Part 1: Introduction: Model overview, capabilities and limitations, data preparation, model download package, how to run the model, and version history.
  • Part 2: Theory: Theoretical basis for CE-QUAL-W2 including hydrodynamics, water quality kinetics, particle transport, and numerical solution schemes.
  • Part 3: Input/Output Files: Detailed descriptions of all model input and output files with format specifications and examples.
  • Part 4: Model Examples: Example applications distributed with the model release, along with calibration guidance for different waterbody types.

Typical Applications

CE-QUAL-W2 is commonly applied to two broad categories of waterbodies:

  • Stratified reservoirs where longitudinal and vertical gradients in temperature, dissolved oxygen, and nutrients are important. An example is Brownlee Reservoir on the Snake River at the Idaho-Oregon border, USA.
  • River basins that may or may not include reservoir or lake-like pools. An example is the Tualatin River basin in Oregon, USA, where the model represents the mainstem river and its tributaries as a connected system of branches and waterbodies.

Stratified Reservoir Example

The figure below illustrates CE-QUAL-W2 predictions for Brownlee Reservoir. The model captures the plunging inflow of the Snake River as it enters the reservoir and moves downstream as an interflow at an intermediate depth.

Brownlee Reservoir predicted velocities showing plunging inflow
Figure 1. Brownlee Reservoir, USA, predicted velocities (m/s) showing the plunging inflow of the Snake River moving as an interflow through the reservoir.

River Basin Example

The figure below shows the layout of the Upper Tualatin River CE-QUAL-W2 model. This model was composed of 2 waterbodies: Waterbody 1 (branches BR1--BR3) and Waterbody 2 (branches BR4--BR5). The mainstem consisted of 2 branches (BR1 and BR4) spanning from River Mile (RM) 62.4 to RM 38.4. Three side branches represented Scoggins Creek (BR2), Gales Creek (BR3), and Dairy Creek (BR5).

Layout of the Upper Tualatin River CE-QUAL-W2 model
Figure 2. Layout of the Upper Tualatin River CE-QUAL-W2 model showing model segment layout, branch layout, tributaries (blue markers), and withdrawals (red markers). This model was composed of 2 waterbodies (BR1--BR3 and BR4--BR5). The mainstem was composed of 2 branches (BR1 and BR4) from RM 62.4 to RM 38.4. There were 3 side branches including Scoggins Creek BR2, Gales Creek BR3, and Dairy Creek BR5.

Terminology

The CE-QUAL-W2 model discretizes a waterbody into a structured grid. The following terms define the components of that grid, from largest to smallest.

Waterbodies

A waterbody is a collection of model branches that share the same turbulence closure scheme, water quality parameter values, and meteorological forcing. For example, a model of a river-reservoir system would typically define the reservoir and the river as separate waterbodies, each with its own meteorological input and turbulence closure settings. A single reservoir can also be split into multiple waterbodies where different portions require distinct meteorological forcing.

Branches

A branch is a collection of model segments that share a common slope. In a river, separate branches represent reaches with different channel gradients. In a reservoir, sidearms are typically represented as separate branches connected to the mainstem branch.

Segments

A segment is a single longitudinal element of length Δx. Segment lengths can vary from segment to segment. Each segment is further divided vertically into layers.

Layers

A layer is a single vertical element of height Δz. Layer heights can vary between waterbodies. Within a segment, layers between the bottom elevation and the water surface are active (wet); layers above the water surface are inactive (dry). As the water surface rises or falls during a simulation, layers are added or removed at the top of the water column.

Summary of Grid Hierarchy

Term Definition Typical Use
Waterbody Collection of branches sharing turbulence closure, water quality parameters, and meteorological forcing Reservoir and river as separate waterbodies; zones requiring different met stations
Branch Collection of segments sharing a common slope Mainstem channel, reservoir sidearms, tributaries
Segment Longitudinal element of length Δx (variable) Horizontal discretization; lengths typically 100--10,000 m
Layer Vertical element of height Δz; active (wet) or inactive (dry) depending on water surface elevation Vertical discretization; heights typically 0.1--5 m

Grid Layout Example

The figure below illustrates the grid layout for Eucha Reservoir in Oklahoma, USA. The main branch (BR1) follows the course of the reservoir, while side branches (BR2 through BR15) represent sidearms that connect to the mainstem. Each branch is composed of a series of segments, and each segment can be oriented at a different angle to follow the natural curvature of the channel.

Grid layout for Eucha Reservoir showing segments and branches
Figure 3. Grid layout for Eucha Reservoir, OK. Model segments and branches (BR) are numbered for this one-waterbody model. The main branch is BR1, followed by side branches 2 through 15.

The branching structure enables CE-QUAL-W2 to simulate longitudinal and vertical water quality variation within each branch independently. Each segment within a branch can be oriented at an angle that best represents the mean flow direction of the area it models, allowing the grid to follow the natural curves of river and reservoir channels rather than being constrained to two orthogonal map directions.

Branches also make it possible to simulate water quality in sidearms that may receive distinct inflows or exhibit different conditions than the mainstem. However, branches do not resolve lateral variation within a single branch. The model does not represent gradients between the central (pelagic) region of a branch and its shoreline (littoral) zone. Where lateral gradients are important, a fully three-dimensional model may be necessary.

The figures below illustrate two versions of a vertical grid for Long Lake on the Spokane River in northeastern Washington State. The first uses uniform layer heights and segment lengths, while the second uses a refined grid with thinner layers near the surface and variable segment lengths.

Vertical grid layout for Long Lake - simple grid Vertical grid layout for Long Lake - variable grid
Figure 4. Vertical grid layout for Long Lake, on the Spokane River in northeastern Washington State. The top panel illustrates a simple grid with uniform vertical layer thicknesses (LAYERH) and segment lengths (DLX). The bottom panel shows a refined version with a few thin layers near the surface and variable segment lengths. This grid represents approximately the same vertical and longitudinal volumetric profiles as the simple grid above.

Historical Background

The development of CE-QUAL-W2 is the result of the collective effort of many researchers over several decades. The model's development has its origin with the U.S. Army Corps of Engineers, and the name reflects that origin: CE (Corps of Engineers), QUAL (Quality), W2 (Width-averaged 2D).

Contributors

Many people have contributed to the model development. A partial list is shown in Appendix A: Contributors.

Version 1.0

The original model that served as the foundation for CE-QUAL-W2 was known as LARM (Laterally Averaged Reservoir Model), developed by Edinger and Buchak (1975, 1978, 1980, 1983). The first LARM application was on a reservoir with no branches. Subsequent modifications to allow for multiple branches and estuarine boundary conditions resulted in the code known as GLVHT (Generalized Longitudinal-Vertical Hydrodynamics and Transport Model). Addition of the water quality algorithms by the Water Quality Modeling Group at the Corps of Engineers Waterways Experiment Station (WES) resulted in CE-QUAL-W2 Version 1.0 (Environmental and Hydraulic Laboratories, 1986).

Version 2.0

Version 2.0 introduced major modifications that improved the mathematical formulation, computational accuracy, and efficiency. These changes were summarized in the Cole and Buchak (1995) User Manual. New capabilities included:

  • An algorithm that calculated the maximum allowable timestep and adjusted the timestep to ensure hydrodynamic stability requirements were not violated (autostepping)
  • A selective withdrawal algorithm that calculated a withdrawal zone based on outflow, outlet geometry, and upstream density gradients
  • A higher-order transport scheme (QUICKEST) that reduced numerical diffusion (Leonard, 1979)
  • Time-weighted vertical advection and fully implicit vertical diffusion
  • Step function or linear interpolation of inputs
  • Improved ice-cover algorithm
  • Internal calculation of equilibrium temperatures and coefficients of surface heat exchange or a term-by-term accounting of surface heat exchange
  • Variable layer heights and segment lengths
  • Surface layer extending through multiple layers
  • Generalized time-varying data input subroutine with input data accepted at any frequency
  • Volume and mass balances to machine accuracy
  • Sediment/water heat exchange

Version 3.0

Version 3.0 introduced improvements to the numerical solution scheme and water quality algorithms and extended the model to support entire basin modeling in two dimensions. New capabilities included:

  • An implicit solution for the effects of vertical eddy viscosity in the horizontal momentum equation
  • Addition of Leonard's ULTIMATE algorithm that eliminates over/undershoots in the numerical solution scheme
  • Inclusion of momentum transfer between branches
  • The ability to model multiple waterbodies in the same computational grid including multiple reservoirs, steeply sloping riverine sections between reservoirs, and estuaries
  • Additional vertical turbulence algorithms more appropriate for rivers
  • Additional reaeration algorithms more appropriate for rivers
  • Variable vertical grid spacing between waterbodies
  • Numerical algorithms for pipe, weir, and pump flow
  • Internal weir algorithm for submerged or skimmer weirs
  • Three algal groups
  • Arbitrary constituents defined by a decay rate, settling rate, and temperature rate multiplier
  • Nine inorganic suspended solids groups
  • Dissolved and particulate biogenic silica
  • Age of water
  • Derived constituents such as total dissolved organic carbon (DOC), organic nitrogen, organic phosphorus, etc. that are not state variables
  • A graphical pre/postprocessor
  • Converted to FORTRAN 90/95 with dynamic array allocation, eliminating the need to recompile the code for each application
  • User-defined evaporation models including the Ryan-Harleman model

Version 3.1

Version 3.1 introduced additional improvements to the numerical solution scheme and water quality algorithms, as well as extending the utility of the model to provide state-of-the-art capabilities for modeling entire river basins in two dimensions. New capabilities included:

  • Any number of user-defined arbitrary constituents defined by a decay rate, settling rate, and temperature rate multiplier that can include any number of:
    • Conservative tracers
    • Coliform bacteria
    • Water age
    • Contaminants
  • Any number of user-defined phytoplankton groups
  • Any number of user-defined epiphyton/periphyton groups
  • Any number of user-defined carbonaceous biochemical oxygen demand (CBOD) groups
  • Any number of user-defined inorganic suspended solids groups
  • Dissolved and particulate biogenic silica
  • Derived constituents such as total DOC, organic nitrogen, organic phosphorus, etc. that are not state variables
  • Kinetic fluxes
  • Graphical preprocessor

Version 3.2

Version 3.2 introduced improvements to code architecture and runtime capabilities. New capabilities included:

  • Internal code rewrite to reduce code size, simplify code maintenance, and improve model execution speed
  • New screen display during model run-time allowing controlling processor usage, examining output variables, and stopping, starting and restarting a model run on the fly. This allows the model user to stop the code, make changes in the control file or any input file, and then restart the model at the point where it was stopped.
  • Addition of a new algorithm to estimate suspended solids resuspension as a result of wind-wave action
  • Reorganization of the graph.npt file to allow more output control formatting possibilities
  • New turbulent kinetic energy-turbulent dissipation (TKE) turbulence closure model

Version Numbering

Versions 3.3 and 3.4 were not released. Development continued directly from Version 3.2 to Version 3.5.

Version 3.5

Version 3.5 introduced significant enhancements to the model. New capabilities included:

  • Addition of the macrophyte model of Berger and Wells (2008) with a user-defined number of species
  • Addition of a zooplankton model with a user-defined number of species based on an updated version of the CE-QUAL-R1 model (Environmental Laboratory, 1995)
  • Addition of a new focusing or settling velocity for sediments that accumulate in the first-order sediment model. In earlier versions, sediment focusing occurred at the velocity given for particulate organic matter (POM). In this version, the user can specify the focusing velocity, allowing sediments to migrate toward the bottom of the channel over time even after they have reached the sidewalls.
  • User-defined time-variable input of P and N associated with organic matter inputs. In earlier versions, the P or N associated with organic matter was based on a static stoichiometric coefficient specified in the control file. The user now provides the dynamic P and N associated with organic matter inputs from tributaries or inflows in the input files, allowing for variable stoichiometry in the input boundary conditions.
  • Based on the above refinement, the organic matter fractions within the model now have variable stoichiometry for P and N. This preserves P and N mass balances. The stoichiometry given in the input files is merely the initial value of the C-N-P stoichiometry of POM and dissolved organic matter (DOM) compartments. Hence, organic P and organic N are tracked correctly in the code.
  • The first-order sediment model also tracks C-N-P correctly and has a dynamic stoichiometry as it accumulates organic matter in the sediment. Prior versions of W2 had a user-defined value of fixed stoichiometry for the first-order sediment model. Also, instead of a fixed decay rate for the sediments, the decay rate is dynamic based on the decay rates of the accumulated organic material. A mass-weighted average is used.
  • CBOD groups now have a user-defined settling velocity. The user can define organic matter groups as particulate and dissolved based on specification of the settling velocity. As in prior versions, CBOD has associated stoichiometry and if there is settling, it will accumulate in the first-order sediment compartment.
  • A Monod formulation was implemented for the initiation of anaerobic processes and reduction of aerobic processes. In earlier model versions there was a specified oxygen concentration that acted like a step function turning these processes on or off.

Version 3.6

Version 3.6 is file-compatible with Version 3.5. No changes to input files are required. Even though there are new features in the input files, these are not required for users of V3.5 and can be left blank. The primary change is allowing the code to run on multiple processors. Additional changes include:

  • The code has been rewritten into smaller subroutines to allow better code compilation and optimization
  • The code has been revised with the goal of improving computational speed. This new compiled code using Intel Visual Fortran 11 should be faster on a single processor than the V3.5 code compiled on a PC with CVF 6.6.
  • The code now has OpenMP commands embedded to allow for limited parallelization of some of the routines. Current tests show that going from 1 processor to 2 can result in up to 20--40% speed improvement. The user can specify the number of processors the code will use in NPROC. Note that this has been disabled in later versions in order to improve numerical precision between simulations.
  • The TKE algorithm has been updated with new algorithms that match experimental tank data for kinetic energy and dissipation. This is based on a Master's degree project by Sam Gould (2006) at Portland State University. A new user option is the TKE1 algorithm, in addition to the legacy algorithm TKE.
  • The roughness height of the water for correction of the vertical velocity wind profile is now a user-defined input, z₀. Prior to this, the model had hardwired the value of z₀=0.003 m for wind speed correction at 2 m (for evaporation where wind height at 2 m is typical) and z₀=0.01 m for wind at 10 m (for shear stress calculations where wind height of 10 m is typical). For consistency, both conversions now use the same value of roughness height. If the user does not specify the value of z₀ (for example by leaving the spaces blank for z₀ using a V3.5 control file), the code uses 0.001 m.
  • The Windows user interface no longer uses Array Viewer. The dialog box and PC executable no longer require installation of Array Viewer (which is now obsolete) nor do they need the Array Viewer DLL. The dialog box has some minor improvements: model run directory displayed and a progress bar.
  • Fixed error with algae/chlorophyll a ratio in the user manual and fixed the preprocessor. The earlier language in the user manual discussed an algae/chlorophyll a ratio but presented information that was the ratio of chlorophyll a/algae. This has been revised and fixed in the User Manual and in the preprocessor.
  • Spreadsheet output: in earlier versions put in an alphanumeric character as a space for the spreadsheet to preserve the formatting. This was changed to a default value of -99 to facilitate numeric data processing. Also, the "-Depth" output value was changed to just "Depth" since modern plotting programs can reverse an axis.
  • Preprocessor improvements. Added variable checks for new parameters, fixed bugs, new check for wsc.npt file (not checked in earlier versions).
  • For the generic constituent, added temperature dependence on 0th-order decay and fixed errors in the User Manual for units of zero-order decay coefficient.
  • Added the kinetic flux rates to the time series result (TSR) file output for easier analysis using a spreadsheet of the flux terms for specific locations in the modeled system.
  • Revised the computation of the drag coefficient for low wind speeds so that the model now agrees better with theory in this wind speed range.
  • The light extinction coefficient (in m⁻¹) is now included as an output variable in the TSR opt file. Because the model internally computes the light extinction coefficient based on water, SS, POM, algae, zooplankton, and macrophytes, this is an important parameter understanding the internal light transmission predicted by the model. This variable replaces the equilibrium temperature as an output variable.
  • A new option for output in the format required for Tecplot. For Tecplot animation there is only a flag in the CPL output line. This allows for easy model animation of the variables U, W, T, RHO, and all active constituents at the frequency specified by the CPL file as a function of distance and elevation.
  • A new variable for determining the fraction of NO₃-N that is diffused into the sediments that becomes organic matter, or SED-N
  • The sediment decay rate can be computed dynamically or held constant using the DYNSEDK variable. In V3.5, the model computed an average decay coefficient of the sediments based on what was deposited. The user now has the option to dynamically compute that decay rate or to have it fixed and controlled by the model user. A new variable was introduced called DYNSEDK which is either ON/OFF to allow or not allow dynamic computation of the sediment decay rate.
  • Added kinetic flux output that sums up fluxes for all cells of a waterbody at the output frequency specified in the kinetic flux output. The output filenames are called "kflux_jw#.opt" where # is the waterbody number. All active fluxes are summed for the waterbody. This is an important overall diagnostic tool to evaluate the important fluxes in the waterbody over time. Instantaneous fluxes are output in the TSR file for individual cells and a series of fluxes at given segments are shown in the Flux output file which is similar in format as the SNP file. This new file is easy to import into a spreadsheet for analysis.
  • The selective withdrawal algorithm computation was adjusted to more closely follow the Corps' model code SELECT (based on personal communication with Gary Hauser, 2008). The variable DLRHOMAX is used to compute the relative velocity profile. In V3.5 and earlier, this variable was the maximum for the entire profile above and below the outlet, i.e., DLRHOMAX=MAX(DLRHOT, DLRHOB). In V3.6 and later, DLRHOT is used above the outlet and DLRHOB is used below the outlet.
  • Command-line working directory specification is now active for the preprocessor, GUI, and W2 Windows versions. Also, the Windows box can now be closed after a run is finished by specifying CLOSEC=ON in the control file. This makes it easier to use the Windows executable in batch file processing.

Version 3.7

File Compatibility

Version 3.7 is not file-compatible with Version 3.6 because of the addition of several new state variables.

The release notes show where the control file differs from Version 3.6. Many of the new features in Version 3.7 are accessed through additional control files separate from the main control file, w2_con.npt. New capabilities include:

  • Improved handling of river flow regimes. These model enhancements for river systems include the following:
    • The initial water surface elevation of a river system based on the normal depth of the river is computed within the model. This allows the model to run more smoothly from the start and eliminates trying to guess an initial water surface elevation for a river system.
    • The model in earlier versions assumed that the initial velocity regime was "zero." By computing an initial velocity regime based on the initial conditions of the flows, the river model then starts with a non-zero velocity. This allows the model to run more smoothly from the very beginning of the model simulation.
    • The model user can choose "Trapezoidal" or "Rectangular" model segments. This will allow for a smoother transition as water levels move up and down in a river channel. This should also allow for a larger maximum time step for stability in the river system.
    • The model user can now specify 2 slopes for a model branch. One slope is the slope of the elevation grid for which all elevations are tied together. The other slope is the hydraulic equivalent slope of a channel. In other words, if a model branch includes riffles and pools, the actual grid slope may not be the equivalent hydraulic slope.
  • New bathymetry file input format in comma-delimited format (CSV) that is easily developed using Excel. This simplifies setting up the initial grid and debugging it.
  • Temperature and dissolved oxygen habitat volumes computed within the model for user-specified fish species
  • New automatic selection of a withdrawal port algorithm that will select the elevation of the withdrawal necessary to meet temperature targets including splitting flows between outlets to reach a target temperature
  • Since each BOD group can have a different BOD-P, BOD-C, and BOD-N stoichiometric equivalent, it was necessary to add new state variables BOD-P, BOD-N, and BOD-C that allowed for time-variable inputs of BOD-P, BOD-C, and BOD-N from a point or non-point source.
  • Environmental performance criteria developed to evaluate time and volume averages over the system of state variables chosen for analysis. This is an easy method for looking at water quality differences between model runs.
  • Module for adding dissolved oxygen, such as hypolimnetic aeration, to specific locations based on a dynamic dissolved oxygen probe monitoring the dissolved oxygen levels
  • Dynamic pipe algorithm allowing a pipe to be turned ON or OFF over time, as if a gate was closed
  • Dynamic pump algorithm that allows the model user to set dynamic parameters for the water level control over time. This is very useful in setting rule curves for operation of the reservoir water levels over time.
  • The maximum time step can now be set to interpolate its value over time rather than suddenly changing the maximum time step. This allows for a smoother change in the model time step.
  • The computation of the temperature at which ice freezes has been adjusted to account for salt water impacts [Courtesy of Dr. Ray Walton]
  • New model output includes volume-weighted averages of eutrophication water quality variables as a function of segment and for only surface conditions as specified by the model user. Other new output includes output of flows, concentrations, and temperatures from a segment for all individual withdrawals.

Version 3.71

Version 3.71 is file-compatible with Version 3.7 but adds one new variable to the control file w2_con.npt. New capabilities include:

  • New model input formats (free format) for many input files that were previously in fixed format. The new files allow for much easier model file development in Excel. These new files include the following:
    • All concentration input files for inflows, tributaries, distributed tributaries, and precipitation:
      • Cin files
      • Ctrib files
      • Cdtrib files
      • Cpre files
    • Wind sheltering file (Wsc file)
    • Meteorological input file (Met file)
    • Vertical profile file for initial condition (Vpr file)
    • Longitudinal-vertical profile initial condition (Lpr file)
    • Withdrawal flow file (Qwd file)
    • Structure outflow file (Qot file)
    • Flow and temperature input files:
      • Qin and Tin
      • Qtrib and Ttrib
      • Qdtrib and Tdtrib
  • New option for dynamic outlet structure elevation for each model structure. The centerline elevation of the structure can be variable over time. In the control file, there is an ON/OFF option after declaring the number of structures for each branch.
  • The release of a new post-processor from DSI, Inc. that uses the vector output in w2_con.npt to specify frequency of output for this post-processor.

Version 3.72

Version 3.72 is file-compatible with Version 3.71 unless the user employs the new USGS automatic port selection algorithm, where the w2_selective.npt format is changed. This version allows for using the algorithm of Rounds and Buccola (2015) for trying to meet downstream temperature targets from reservoirs with multiple outlets.

Version 4.0

Version 4.0 is file-compatible with Version 3.72. All new model options are contained in new control files separate from the existing model files. New features include:

  • Sediment diagenesis model of Prakash et al. (2015) and Berger and Wells (2014). This model is described in Part 2 of the User's Manual. It includes bubble formation and rise in the water column, sediment consolidation, and sediment diagenesis. It includes the following new state variables:
    • Sediment and water column CH₄
    • Sediment and water column H₂S
    • Sediment and water column SO₄
    • Sediment and water column sulfide
    • Sediment and water column FeOOH(s)
    • Sediment and water column Fe²⁺
    • Sediment and water column MnO₂(s)
    • Sediment and water column Mn²⁺
    • Sediment organic P, sediment PO₄
    • Sediment organic N, sediment NO₃, sediment NH₄
    • Sediment temperature
    • Sediment pH
    • Sediment alkalinity
    • Sediment total inorganic C
    • Sediment organic C
    • Mature fine tailings (about 70% water and 30% fine clay, can take centuries to consolidate; from oil sands mining operation, like another inorganic suspended solids group)
    • Turbidity based on correlation with TSS
  • Non-conservative alkalinity from the work of Sullivan et al. (2013)
  • Wind-induced and boundary-induced shear causing scour of organic matter from sediments and resulting oxygen demand
  • The new sediment model largely deprecates the older state variable Fe(total) since the model now has different state variables for Fe and Mn
  • Ice formation and ice melting now affect the waterbody through loss or gain of water mass. This feature can be turned ON/OFF.
  • Periphyton and macrophyte variable areal density/concentration can be set for each model cell as well as setting a global initial concentration
  • Output files TSR, QWO, TWO, CWO, structure, gate, pipe, pump, and spreadsheet files are now in comma-delimited format rather than the older fixed format
  • TSR file output now includes the limiting nutrient term for N, P, and light, which is between 0 and 1
  • Photodegradation and gas transfer (volatilization) are now options for generic constituents
  • N₂ gas is now an option for a generic constituent. If this option is used, the model automatically computes percent Total Dissolved Gas (%TDG) using both N₂ and O₂ state variables
  • A floating skimmer weir can be used and is set up in the main control file section on internal weirs
  • A new output file format for longitudinal profiles of water level, temperature, flow rate, and water quality that are set up in the profile output section of the main control file
  • A new output file that provides a P and N mass balance for each waterbody including existing P/N in water column, in plants, and in sediments and fluxes in and out of the system including sediment release and P/N flux to the sediments

Version 4.1

Version 4.1 is file-compatible with Version 3.72. All new model options are contained in new control files separate from the main control file. New features include:

  • Particle tracking algorithm based on a revised and updated algorithm from Goodwin et al. (2001). There is a new input file for activating the particle tracking algorithm, particle.csv, and a new documentation report outlining how to use this new algorithm.
  • Branch active and inactive algorithm allowing the model to activate or deactivate branches based on wetting and drying. In prior versions of CE-QUAL-W2, if a branch lost water, the model would end. Now upstream inflows or tributaries are automatically added to the most downstream active segment of the inactive branch. This allows filling and emptying a large reservoir with complex side branches with no further input of the model user.
  • Updates to the sediment diagenesis model. These updates are focused on (1) increasing the speed of execution of the code, (2) improved input/output including adding sediment diagenesis fluxes of P and N to the massbal.csv file for analyzing big-picture nutrient balance of a waterbody, and (3) improved preprocessor checks of sediment diagenesis input parameters.
  • The longitudinal eddy viscosity (Ax) and eddy diffusivity (Dx) can now scale with the mean longitudinal velocity rather than being constants
  • Canopy shade can be used in conjunction with the dynamic shade algorithm to estimate solar reduction when the channel has a vegetative canopy
  • Assorted minor bug fixes and updates
  • New water balance as a console application. It has a few more features than the earlier Windows version which is still available.
  • For withdrawal output files, precise output timing can now be used for seconds, minutes, or hours
  • The model user can now deal with a constriction between 2 model segments without having to have a very small segment between 2 larger segments

Version 4.2

Version 4.2 is file-compatible with Version 3.72. All new model options are contained in new control files separate from the main control file. New features include:

  • Multiple waterbody cascade modeling using multiple processors. If the model is set up for multiple independent waterbodies where flow moves from upstream to downstream, then the downstream models can run as they receive information from the upstream waterbody. This can save significant simulation time as multiple processors are used for each independent waterbody.
  • The User Manual was updated to a new format and organization with hundreds of additions, updates, and corrections
  • The Corps of Engineers SYSTDG program for evaluating Total Dissolved Gas at spillways was added to the release version of the model
  • The restart feature with sediment diagenesis and Tecplot CPL output is now working. Prior to this version, restart did not work with sediment diagenesis nor with Tecplot CPL output.

Version 4.2.1

Version 4.2.1 is file-compatible with Version 3.72 except for the new Excel version of the control file. New features include:

  • Multiple waterbody cascade modeling using multiple processors has been updated using code developed by Stewart Rounds (USGS). This allows for a pause while waiting for upstream information rather than a model restart allowing for more precise calculations.
  • A new control file, w2_con.csv, is now available for use in CE-QUAL-W2. This is derived from the Excel spreadsheet w2_con.xlsm which contains a macro to write the file into CSV output format. This new file has many advantages compared to the fixed-format file including no longer needing the graph.npt file. The User Manual, preprocessor, and model executable have all been updated to allow for this input file. Also, a converter utility has been developed to transform legacy control files to the new version.
  • The model examples and User Manual were updated with a new example problem from Long Lake, WA. This new example uses the Excel form of the control file. Also, all example problems were updated with the Excel version of the control file.
  • The preprocessor now spawns a window showing the pre.err file in case there are errors detected in the preprocessor. Also, several new preprocessor checks were added.
  • Output file format has been improved for the w2.wrn and W2errordump.opt files
  • The pump algorithm has a new enhancement allowing water to be pumped from the upstream to downstream based on downstream water level
  • Tecplot output through the CPL output can now specify which branches to write out. A new input file, Tecplotbr.csv, is used to specify which model branches are output to the Tecplot file.

Version 4.2.2

File Compatibility

Version 4.2.2 is not file-compatible with Version 3.72 since two new variables were added to the control file.

These changes are described in the User Manual Part 5 showing changes in the control file between versions. This code update adds a regression equation for CO₂ global average concentration in ppm and allows the user to define an average CO₂ gas concentration. This new calculation technique is described in the User Manual Part 2. The earlier code used a relationship that was from around 1960 (and had a minor coding error that had existed since Version 2). Hence, there was a need to update the global CO₂ atmospheric concentration for computation of CO₂ gas exchange affecting total inorganic C and pH.

Version 4.5

File Compatibility

Version 4.5 is not file-compatible with earlier versions because of many new variables in the control file.

Version 4.5 includes many new features and upgrades. Differences between versions are shown in Part 5 of the User Manual. Many of these features were supported by ERDC Environmental Laboratory and Portland District of the U.S. Army Corps of Engineers. New features include:

  • Atmospheric deposition of any state variable. The model user provides mass loading to waterbodies. There is now no need to specify a flow, temperature, and concentration file since only a time series of mass per area per time is used as an input.
  • Ability to specify directly output of flow balance file, N and P mass balance file, and water level file
  • New generic constituent source: sediment release
  • New state variables: water age, N₂, dissolved total gas pressure, bacteria, CH₄, Fe²⁺, FeOOH, Mn²⁺, MnO₂, H₂S. Many of these before were only operative using sediment diagenesis as generic constituents or were recommended generic constituents.
  • New derived variables: turbidity (correlated to TSS), Secchi disk (based on light extinction), un-ionized ammonia (based on temperature, pH, and total ammonia), and Total Dissolved Gas (TDG)
  • The model computes ammonia volatilization based on unionized ammonia volatilization rate and is a derived variable. pH must also be active as a derived variable.
  • Implementation of variable algal settling velocity including buoyancy effects from Overman (2019). This allows for predicting the variable velocity of cyanobacteria allowing for rise and fall of the cells during the day and night.
  • Zooplankton settling is a new zooplankton parameter
  • Implementation of algal toxin production based on Garstecki (2021, 2023)
  • Ability to generate lake contours easily (elevation vs. time for temperature and dissolved oxygen)
  • Ability to generate river contours easily (model segment or distance along river vs. time) for temperature and dissolved oxygen
  • The C groups dissolved organic C (DOC) and particulate organic C (POC) with both labile and refractory groups were added as an alternative to organic matter groups. The option is available to use either C or organic matter. This was done earlier by Zhong in an earlier version of W2.
  • Sediment diagenesis updates. Many updates were made allowing for multiple vertical layers, simplified calculation, and much faster computation than before. Now when sediment diagenesis is turned ON, both zero-order and first-order sediment models are turned OFF internally. Also, the sediment diagenesis input file format has been updated and integrated into the Excel master sheet. Much of this work was performed by Dr. Zhang at PSU.
  • Removed internal minimum reaeration coefficient value and allowed the model user to set a minimum value if required. For example, for waterbodies designated as "LAKE" with zero wind, the model will now predict zero reaeration unless a minimum value is set. The reaeration coefficient for the surface layer is now an output in the Time Series file.
  • Updates to auto-port selection
  • SYSTDG input files updated to CSV input format
  • Updates to particle settling and P adsorption onto inorganic SS. A bug was fixed where dissolved oxygen-controlled P adsorption to particles rather than just P adsorption to Fe.
  • All external control files are included in an Excel master sheet for ease of writing out as CSV files
  • Added derived variables to the W2_post post-processor for time series, profiles, animations, and contour plots

New Features

The table below (Table 1) provides a quick-reference summary of significant new model features since Version 3.7. For detailed descriptions, see the version-by-version entries in the Historical Background section above.

Table 1. New CE-QUAL-W2 model features since Version 3.7.

Feature Description Version First Included
Post-processor released for CE-QUAL-W2 DSI released a free tool for viewing output from the CE-QUAL-W2 model. 3.71
CSV file input/output Model input files can now be in comma delimited format rather than fixed space formatted text. Most output files can be in CSV file format for ease of processing in a spreadsheet. This continued through model version 4.1. 3.71--4.1
USGS automatic port selection algorithm A more complex automatic port algorithm than in Version 3.7. 3.72
Sediment diagenesis Predictive sediment diagenesis model with bubble formation and dynamic pH and temperature in the sediment layers. 4.0
Scour of both inorganic suspended solids and organic solids Scour based on bottom shear stress was added to mobilize not only inorganic suspended solids, but also organic solids back into the water. 4.0
New state variables such as CH₄, H₂S, Fe, and Mn Since the addition of sediment diagenesis, other water state variables were added that connected to the sediments. Now metals can oxidize and precipitate and be reduced in the sediments and released. 4.0
Non-conservative alkalinity Using algorithm from Sullivan et al. (2013) for non-conservative alkalinity. 4.0
Photodegradation for generic constituents Generic constituents can now photodegrade based on the available light at depth. 4.0
TDG with N₂ as a state variable Total Dissolved Gas using N₂ as a state variable with O₂. Gas generation at spillways and dams is still included in the model. 4.0
P and N balances P and N balances are now computed in the model and output as a diagnostic tool. 4.0
Branch active/inactive Branches can be dry and wetted without crashing the model. The model accounts for all inflows and moves them to an appropriate wetted model segment. 4.1
Particle tracking A 3D particle tracking algorithm allows for the movement of particles based on random turbulent motion and advection, including settling or rising of particles. There are many options to track particle releases. 4.1
Ax and Dx scale with U The longitudinal eddy viscosity and eddy diffusivity can now scale with the longitudinal velocity. 4.1
Multiple processor running of multiple waterbody models Each waterbody can be run in conjunction with an upstream waterbody to utilize different processors for significant speed improvements in large model systems. 4.2, 4.2.1
TDG algorithm SYSTDG algorithm from the Corps was added to the existing formulations for TDG at spillways and gates. 4.2
Excel input file A new input file, w2_con.csv, is available for model input and legacy converter utility. 4.2.1
Variable CO₂ atmosphere A regression equation is used to estimate global average CO₂ in the atmosphere. Also, the user can input a user-defined value. 4.2.2
Algal vertical movement in water column Vertical rise and sink of algae cells can be mechanistically modeled as a function of time. This is especially important for cyanobacteria blooms. 4.5
Algae toxin production and fate/transport Allows for specifying production and fate and transport of algal toxins. 4.5
New state variables Water age, N₂, dissolved total gas pressure, bacteria, CH₄, Fe²⁺, FeOOH, Mn²⁺, MnO₂, H₂S. 4.5
New derived variables Turbidity, Secchi disk, un-ionized ammonia, and total dissolved gas. 4.5
Use of C instead of organic matter The organic matter fractions can be represented in terms of C rather than organic matter if the user wishes. 4.5
Atmospheric deposition Allows for atmospheric deposition of any state variable to waterbody. 4.5
Ammonia volatilization Computes unionized ammonia volatilization. 4.5
Sediment diagenesis Computed for every vertical layer rather than just the bottom layer. 4.5

ERDC Version 2026

ERDC Feature

The features described in this section were developed by ERDC and are not present in the PSU Version 4.5.

ERDC Version 2026 is the first release under the new ERDC versioning system. It is based on Version 4.5, developed by Portland State University (PSU). ERDC Version 2026 includes new Harmful Algal Bloom (HAB) simulation capabilities and support for multiple operating systems.

Harmful Algal Bloom (HAB) Modules

Four new algorithms for simulating harmful algal bloom dynamics:

  • Nitrogen fixation: allows cyanobacteria groups to fix atmospheric nitrogen when dissolved inorganic nitrogen concentrations fall below a user-defined threshold.
  • Hypoxic algal mortality: applies enhanced mortality rates to algal groups when dissolved oxygen drops below a specified concentration.
  • Minimum algae concentration: prevents algal concentrations from falling below a user-specified minimum, representing persistent seed populations or benthic recruitment.
  • Mechanical removal: simulates physical removal of algal biomass from specified segments and layers, representing management interventions such as harvesting or skimming.

Multi-Platform Support

  • Compilation with gfortran, replacing the Intel Fortran dependency.
  • Pre-compiled binaries for Windows, macOS (Apple Silicon), and Linux.
  • Compilation and execution scripts for DoD HPC systems.

References

For a complete list of references cited in this chapter, see References. For a comprehensive bibliography of CE-QUAL-W2 publications, see Appendix B: Publications.