CE-QUAL-W2 has
been under continuous development since 1975. The original model was known as
LARM (Laterally Averaged Reservoir Model) developed by
Edinger and Buchak (1975). 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 US Army Engineer Waterways Experiment Station (WES) resulted in CE-QUAL-W2
Version 1.0 (Environmental and Hydraulic Laboratories, 1986).
Version 2.0
was a result of major modifications to the code to improve the mathematical
description of the prototype and increase computational accuracy and
efficiency. These changes were summarized in the Cole and Buchak (1995) User
Manual. Numerous new capabilities were included in Version 2.0, including:
Version 3.0 is
a result of 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 waterbasins in
two-dimensions. The new capabilities included in Version 3 include:
Version 3.1 is
a result of additional improvements to the water quality algorithms including:
Version 3.2 is
a result of additional improvements to the model. These new capabilities
include:
Version 3.5 is
a result of significant enhancements to the model. These new capabilities
include:
Version 3.6
This version is file compatible with version 3.5. Hence no changes need to be made to any input files. Even though there are some new features in the input files, these are not required for users of V3.5 and can be kept blank. The primary change is allowing the code to run on multiple processors. The following changes have been made in the code from V3.5 to V3.6:
1.
The
code has been rewritten into smaller subroutines to allow better code
compilation and optimization.
2.
The
code has been revised with the goal of improving the computational speed. This
new compiled code using Intel Visual Fortran 10 should be faster on a single
processor than the V3.5 code compiled on a PC with CVF 6.6.
3.
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.
4.
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 at Portland State University. A new user option is the
TKE1 algorithm, in addition to the legacy algorithm TKE.
5.
The
roughness height of the water for correction of the vertical velocity wind
profile is now a user-defined input, z0. Prior to this the model had hardwired
the value of z0=0.003 m for wind speed correction at 2m (for evaporation where
wind height at 2 m is typical) and z0=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 z0 (for example if he/she leaves the spaces blank for z0
using a V3.5 control file), the code uses 0.001 m.
6.
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.
7.
Fixed
error with Algae/chlorophyll a ratio in user manual and fixed pre-processor.
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 User Manual and in preprocessor.
8.
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.
9.
Preprocessor
improvements. Added variable checks for new parameters, fixed bugs, new check
for wsc.npt file (not checked in earlier versions).
10. For the generic
constituent, added temperature dependence on 0th order decay and fixed errors
in User Manual for units of zero order decay coefficient.
11. Added the kinetic flux
rates to the TSR file output for easier analysis using a spreadsheet of the
flux terms for specific locations in the modeled system.
12. 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.
13. The light extinction
coefficient (in m-1) 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.
14. A new option for output
is 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.
15. A new variable for
determining the fraction of NO3-N that is diffused into the sediments that
becomes organic matter, or SED-N was introduced. 16. 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
16. DYNSEDK which is either
ON/OFF to allow or not allow dynamic computation of the sediment decay rate.
17. 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.
18. 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.
Version
3.7
This version is not file compatible with
version 3.6 because of the addition of several more state variables even though
these are relatively minor. The release notes show where the control file
differs from Version 3.6. Many of the new features to Version 3.7 are accessed
through additional control files separate from the main control file,
w2_con.npt. The following changes have been made in the code from V3.6 to V3.7:
1.
The
model has been improved to handle river flow regimes. These model enhancements
for river systems include the following:
1.
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.
2.
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.
3.
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.
4.
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.
2.
There
is a 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.
3.
Temperature
and dissolved oxygen habitat volumes are now computed within the model for
user-specified fish species.
4.
There
is a 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.
5.
Since
each BOD group can have a different BOD-P, BOD-C and BOD-N stoichiometric
equivalent, it was necessary to add to the model 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.
6.
Environmental
performance criteria were 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.
7.
The
model now has a module for adding dissolved oxygen, such as hypolimnetic
aeration, to specific locations based on a dynamic dissolved oxygen probe
monitoring the dissolved oxygen levels.
8.
The
model has a dynamic pipe algorithm allowing a pipe to be turned ON or OFF over
time, as if a gate was closed.
9.
The
model also has a 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.
10. 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.
11. The computation of the
temperature at which ice freezes has been adjusted to account for salt water
impacts. [Courtesy of Dr. Ray Walton]
12. 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
This version is file compatible with
version 3.7 but does add one new variable to the control file w2_con.npt.
1. New
model input formats (free format) for many input files that were in fixed
format. The new files allow for much easier model file development in Excel.
These new files include the following files:
i.
All concentration input files for inflows,
tributaries, distributed tributaries and precipitation:
1.
Cin files
2.
Ctrib files
3.
Cdtrib files
4.
Cpre files
ii. Wind
sheltering file
1.
Wsc file
iii. Meteorological
input file
1.
Met file
iv. Vertical
profile file for initial condition
1.
Vpr file
v. Longitudinal-vertical
profile initial condition
1.
Lpr file
vi. Withdrawal
flow file
1.
Qwd file
vii. Structure
outflow file
1.
Qot file
2. New
option for dynamic outlet structure elevation for each model structure. Hence,
the center-line elevation of the structure can be variable over time. In the
control file, there is an ON/OFF option after declaring the # of structures for
each branch.
3. 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
This version is file compatible with
version 3.71 unless one uses the new USGS automatic port selection algorithm
where the w2_selective.npt format is changed. This new version allows for using
the algorithm of Rounds and Buccola (2015) with the automatic port selection
for trying to meet downstream temperature targets from reservoirs.
Version
4.0
This version is file compatible with
Version 3.72. All the new model options are contained in new control files
other than the existing model files. The new model includes the following
features:
1.
Sediment
diagenesis model of Prakash et al. (2011) and Berger and Wells (2014). This
model includes bubble formation and rise in the water column, sediment
consolidation, and sediment diagenesis. It includes the following new state
variables:
a. Sediment and water column CH4
b. Sediment
and water column H2S
c. Sediment
and water column SO4
d. Sediment
and water column Sulfide
e. Sediment
and water column FeOOH(s)
f. Sediment
and water column Fe+2
g. Sediment
and water column MnO2(s)
h. Sediment
and water column Mn+2
i. Sediment
organic P, sediment PO4
j. Sediment
organic N, sediment NO3, sediment NH4
k. Sediment
Temperature
l. Sediment
pH
m. Sediment
alkalinity
n. Sediment
Total inorganic C
o. Sediment
organic C
p. 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
q. Turbidity
based on correlation with TSS
2.
Non-conservative
alkalinity from work of Sullivan et al. (2013)
3.
Wind
induced and boundary induced shear causing scour of organic matter from
sediments and resulting oxygen demand
4.
The
new sediment model largely deprecates the older state variable Fe(total) since
we now have different state variables for Fe and Mn
5.
Ice
formation and ice melting now affect the water body through loss or gain of
water mass.
6.
Periphyton
and macrophyte variable areal density/concentration can be set for each model
cell as well as setting a global initial concentration.
7.
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.
8.
TSR
file output now includes the limiting nutrient term for N, P, and light which
is between 0 and 1
9.
Photodegradation
and gas transfer (volatilization) are now options for generic constituents
10. N2 gas is now an option for a generic
constituent. If this is used, the model automatically computes %TDG using both
N2 and O2 state variables
11. A floating skimmer weir can be used and
is set up in the main control file section on internal weirs
12. A new output file format for
longitudinal profiles of water level, temperature, flow rate and water quality
are set up in the profile output section of the main control file
13. A new output file which gives 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
14. A new file format for head boundary
conditions for head, temperature and concentration
Version 4.1
This version is file compatible with Version
4.0. All the new model options are contained in a new control file. The new
model includes the following features:
1.
Particle
Tracking Algorithm based on revision and update to the Goodwin et al. (2001)
algorithm. There is a new input file for activating the particle tracking
algorithm, ‘particle.csv’, and documentation outlining how to use this
algorithm is in the User’s Manual.
2.
Branch
active and inactive algorithm. In prior versions of the CE-QUAL-W2 model, if a
branch lost water, the model would end. Now the model can activate or
deactivate branches based on wetting and drying. Also, upstream inflows or
tributaries are automatically added to the most downstream active segment of
the in-active branch. This allows then filling and emptying a large reservoir
with complex side branches with no further input of the model user.
3.
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.
4.
The
value of Ax and Dx can now scale with the mean longitudinal velocity rather
than being constants.
5.
Canopy
shade can be used in conjunction with the dynamic shade algorithm to estimate
solar reduction when the channel has a vegetative canopy.
6.
Assorted
minor bug fixes and updates. [Thanks to Stewart Rounds, USGS, for suggesting
several of these!]
7.
Waterbalance
console application for batch processing
8.
Withdrawal
output frequency now in days, hours, or sec for better precision and other I/O
enhancements (volume weighted averages for the longitudinal profile file and
SPR file).
9.
The
model now handles constrictions between segments, such as bridges and other
obstructions.
10. Other changes still to be added to
Version 4.1 include adding TDG and pH as input variables for
in-flows/tributaries, vertical migration of algae, and further sediment
diagenesis improvements.
Version
4.2
This version
is file compatible with Version 3.72. All the new model options are contained
in new control files other than in the main control file. The new model
includes the following features:
1. 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.
2. The User Manual was updated to a new format
and organization with hundreds and hundreds of additions, updates, corrections.
3. The Corps of Engineers, SYSTDG, program for
evaluating Total Dissolved Gas at spillways, was added to the release version
of the model.
4. The restart feature with sediment diagenesis
and Tecplot CPL output is now working. Prior to this version Restart did not
work with sediment diagenesis and CPL output for Tecplot.
5. Updates
were made to the sediment diagenesis code including input file name change,
changes to output file names and formatting, and several bug fixes.
Version
4.2.1
This version is
file compatible with Version 3.72 except for the new Excel version of the
control file. The new model includes the following features:
1. 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 in-formation rather
than a model restart allowing for more precise calculations.
2. 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. This is described in the Model Utilities part of the User Manual.
3. The model examples and User Manual was updated
with a new example problem from Long Lake, WA. This new example uses the new
Excel form of the control file. Also, all example problems were developed with
the Excel version of the control file.
4. 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.
5. Output file format has been improved for the
w2.wrn and the W2errordump.opt files using suggestions from Stewart Rounds
(tireless!).
6. The pump algorithm has a new enhancement
allowing water to be pumped from the upstream to downstream based on downstream
water level.
7. 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
This version
is not file compatible with Version 3.72 since two new new variables were added
to the control file. These are described in the User Manual Part 5 showing
changes in the control file between versions. This code update adds a
regression equation for CO2 global average concentration in ppm and allows the
user to define an average CO2 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, the new addition for a time variable global CO2 atmospheric
concentration.
Version
4.5
This version
includes many new features and upgrades and is not file compatible with earlier
versions because of many new variables in the control file. Differences between
versions are shown in Part 5 of the User Manual. The new model includes the
following features (the support of ERDC
Environmental Laboratory and Portland District of U.S. Army Corps of Engineers
provided many of these enhancements):
1. Atmospheric deposition of any state variable – 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.
2. Ability to specify directly output of flow balance file, N
and P mass balance file, water level file
3. New generic constituent source: sediment release
4. New state variables: water age, N2, dissolved total gas
pressure, bacteria, CH4, Fe(II), FeOOH, Mn(II), MnO2, H2S. Many of these before
were only operative using sediment diagenesis as generic constituents or were
recommended generic constituents.
5. 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).
6. Ammonia volatilization is computed based on unionized
ammonia volatilization rate and is a derived variable. pH must also be active
as a derived variable.
7. 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.
8. Zooplankton settling is a new zooplankton parameter.
9. Implementation of algal toxin production based on Garstecki
(2021)
10. Ability to generate lake contours easily (elevation vs time
for temperature and dissolved oxygen)
11. Ability to generate river contours easily (model segment or
distance along river vs time) for temperature and dissolved oxygen)
12. 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.
13. 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. This work was performed by Dr. Zhang at PSU.
14. Removed internal minimum reaeration coefficient value and
allowed 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.
15. Updates to auto-port selection
16. SYSTDG input files updated to csv input format.
17. 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.
18. All external control files are included in an Excel master
sheet for ease of writing out as csv files.
19. % Dissolved oxygen less than 1 mg/l is part of habitat
output.
20. Gates have enhanced functionality.
21. Meteorological data can be read in by segment groups or by waterbodies.
Version 5.0
This version
includes many new features and upgrades and is not file compatible with earlier
versions because of many new variables in the control file. Differences between
versions are shown in Part 5 of the User Manual. The new model includes the
following features (the support of ERDC
Environmental Laboratory and Portland District of U.S. Army Corps of Engineers
provided many of these enhancements as well as work from Idaho Power):
1. A
Hg model for the water column and for the sediment
2. A
more advanced withdrawal algorithm for outflows from a dam
3. Ability
to output data in HD5F format for external postprocessing
Planned
Enhancements
The following
model enhancements are planned for CE-QUAL-W2 along with their status:
# |
Item |
Description |
Status |
1 |
Fish |
Fish Bioenergetics model |
Tested and working in research code |
2 |
Sediment transport |
|
Simple model in research code |
3 |
Smart particle tracking – Fish model |
|
Tested and working in research code |
4 |
Simultaneous water level solution |
Currently, water surface is solved branch-by-branch. The new technique will involve solving all water surfaces for the system or waterbody simultaneously. |
Tested and working in research code |
5 |
W3 |
3D version of W2 |
Tested and working in research code |
6 |
Hyporheic flow algorithm |
Groundwater-surface water interaction |
Tested and working in research code. |
7 |
Sediment channel bottom heating algorithm |
Dynamic heat transfer between channel bottom and stream |
Tested and working in research code. |