Read Me File for CE-QUAL-W2

Read me file for CE-QUAL-W2

All files associated with CE-QUAL-W2 are archived in the compressed file "W2 V3.1.zip”. Unzipping the file will create the following directory structure:

W2 -----|-- source

|

|-- examples -----|-- DeGray

| |

|-- executables |-- Spokane River

| |

|-- waterbalance |-- river-reservoir-estuary

There are four files in the SOURCE directory. The following versions of the source code are included:

w2.f90 - generic version that has been tested on PC’s using Compaq Visual FORTRAN (CVF) and Salford’s FTN95 FORTRAN compilers. The code will not compile with the Lahey F95 compiler. The code has not been compiled and tested on a Unix/Linux platform.

w2_cvf.f90 - Compaq Visual FORTRAN specific code

The following versions of the preprocessor are included:

pre.for - generic version

pre_cvf.for - CVF specific code

The generic version of the code runs as a console (or DOS) application and contains only rudimentary information on the progress of the run. The CVF version of the code contains compiler specific code that allows the model to run as a Window’s application with additional screen output for tracking the progress of the run. This version also uses the CVF array visualizer that allows contour plotting of results during runtime. This is explained in greater detail in the User’s Manual.

Since V3.1 has been rewritten in F90/F95, the user is no longer required to compile the program for their specific application. The “executables” subdirectory contains the following executables that can be run on any number of systems without requiring modifications and recompiles. However, they will need to be copied to each project directory before executing the code.

w2.exe - W2 V3.1 generic executable

w2_cvf.exe - W2 V3.1 CVF executable requiring array visualizer V1.6

pre.exe - generic preprocessor

pre_cvf.exe - CVF preprocessor

v2tov3.exe - version 2 to version 3 converter

-  water balance utility

The waterbalance subdirectory contains a program that estimates the flows required to complete a reservoir water balance based on inflows/outflows and observed water surface elevations. Further instructions for using the utility are included in the subdirectory.

The EXAMPLES subdirectory contains the following applications:

Degray

This application involves a single reservoir composed of one branch and a complete water quality application. This was the original test application for V1.0 and is documented in the following report and journal article:

Martin, J.L. 1987. "Application of a Two-Dimensional Model of Hydrodynamics and Water Quality (CE-QUAL-W2) to DeGray Lake, Arkansas", Technical report E-87-1, US Army Engineer Waterways Experiment Station, Vicksburg, MS.

Martin, J.L. 1988. "Application of Two-Dimensional Water Quality Model". J. Envir. Engrg., 114(2), 317-336.

The V2.0 revisit for temperature predictions is documented in:

Chapman, R.C. and T.M. Cole. 1992. "Improved Thermal Predictions in CE-QUAL-W2", in Proc. of the Hydraulic Engineering Sessions at Water Forum '92, Saving a Threatened Resource - In Search of Solutions, Baltimore, MD.

Cole, T.M. 1994. "CE-QUAL-W2, Version 2.0", Water Operations Technical Report, Vol E-94-1, USACE Waterways Experiment Station, Vicksburg, MS.

Spokane River/Long Lake

The Spokane River/Long Lake application modeled the Spokane River from the Washington/Idaho border all the way down to and including Long Lake for a TMDL study for the Washington Department of Ecology and is one of the early V3/V3.1 applications. Some of the results are documented in the User’s Manual. This is a very complex system involving sloping river sections, two run-of-the-river pools, and Long Lake. Additionally, two wastewater treatment plants and several industrial point source effluents were modeled as well as significant river/groundwater interactions. This is a very complex application of the model.

River/reservoir/estuary application

This example illustrates how to set up a river/reservoir/estuarine application. This is a fictional example used in the workshop, but illustrates the use of dam flow to a downstream waterbody and external head boundary conditions used for estuarine applications.

A more complete but still only a partial bibliography is included in the User’s Manual.

The following input files come with each application:

w2_con.npt - control file for each application

shd.npt - shading file

wsc.npt - wind sheltering file

bth_wb1.npt - bathymetry file

met_wb1.npt - meteorological file

graph.npt - array visualization control file

A subset of the following input files comes with each application:

qin_br1.npt - inflows

tin_br1.npt - inflow temperatures

cin_br1.npt - inflow constituent concentrations

qtr_tr1.npt - tributary inflows

ttr_tr1.npt - tributary inflow temperatures

ctr_tr1.npt - tributary inflow constituent concentrations

euh_br1.npt - upstream head elevations

tuh_br1.npt - upstream head boundary temperatures

cuh_br1.npt - upstream head boundary constituent concentrations

edh_br1.npt - downstream head elevations

tdh_br1.npt - downstream head boundary temperatures

cdh_br1.npt - downstream head boundary constituent concentrations

qot_br1.npt - outflows

ext_wb1.npt – light extinction file

vpr_wb1.npt - vertical profile at downstream segment for specifying initial conditions

lpr_wb1.npt - longitudinal and vertical profiles specifying initial conditions

for each cell in the computational grid

qwd.npt – withdrawals

qgt.npt - gate outflow file

If more than one branch, tributary, and/or waterbody is modeled, then corresponding files using "br2", "br3", etc. (or “tr2”, “tr3”, “wb2”, “wb3”, etc.) in the filename will also be included.

The following output files come with each application:

snp.sav - snapshot output file

pre.sav - preprocessor output file

The output files are from a short run of an application and have been renamed with the ".sav" extension to ensure that the files are not overwritten. The files produced from a test run will have the ".opt" extension. Use these files when comparing the ".sav" files to ensure you obtain the same answers. They are set up to be printed on a LaserJet IV or compatible LaserJet printer. The variable [LJPC] in the control file can be changed to either a laserjet II, III, IV, or V - whichever is suitable for your printer. They can be printed out using the following DOS prompt command:

copy snp.sav lpt1:

Printing them from inside an ASCII text editor will remove the FORTRAN carriage control formatting, although they will still print.

As you will notice, input files follow a strict naming convention. We strongly urge you to follow this convention. It has been arrived at through over 20 years of model experience. We will not attempt to track down problems in the model if the naming conventions are not followed or the source code has been customized other than the way described below.

A few words about source code changes. Although we have attempted to make the model general, we recognize many applications have peculiar needs that are not presently coded in the model. If you do make changes to the model, try to keep them in subroutines outside the main code. We plan on continuously updating and improving the code. As we do, you will find it easier to upgrade to the latest code if you keep changes inside the main code to a minimum. In addition, if you make changes you consider important, we would appreciate your sending me the changes so they can be incorporated them into the latest version. Again, this will make it easier to upgrade. Finally, we urge you to comment your changes as follows:

********* Average eddy diffusivity

DO K=KT,KB(IDT)-1

DZ(K,IDT) = DZ(K,IDT-1)

END DO

DO I=IUT,IDT-1 !TC 6/23/93

DO K=KT,KB(I)-1 !TC 6/23/93

IF (K.GE.KBMIN(I)) THEN !TC 6/23/93

IF (KB(I-1).GE.KB(I).AND.I.NE.IUT) THEN !TC 6/23/93

DZ(K,I) = DZ(K,I-1) !TC 6/23/93

ELSE !TC 6/23/93

DZ(K,I) = DZMIN !TC 6/23/93

END IF !TC 6/23/93

ELSE !TC 6/23/93

DZ(K,I) = (DZ(K,I)+DZ(K+1,I))*0.5 !TC 6/23/93

END IF !TC 6/23/93

END DO !TC 6/23/93

END DO !TC 6/23/93

The !TC makes it easy to track down where changes are in the code. Again, if this convention is not followed and you have made changes to the code, no attempt will be made to track down problems with the code.

Preview of Coming Attractions - Version 3.5

CE-QUAL-W2 is continually being developed and there are a number of planned enhancements for the future. The most important of these are:

1. A sediment diagenesis model that will allow for more realistic, long-term simulations of system response to decreased nutrient loadings

2. An implicit solution of water surface elevations between branches (the current algorithm implicitly solves for the water surface elevation for only one branch at a time). This has been implemented and is currently being tested

3. A k-ε turbulence closure scheme

4. A parallelized version for users with access to massively parallel machines

5. A complete rewrite of the code to decrease size, complexity, and computational time

The model is constantly being updated, so periodically checking the web site will ensure that you have the latest version. Additionally, we are always welcome to suggestions for further improvements.

Tom Cole Scott Wells

CEWES-EP-W Department of Civil Engineering

Water Quality and Contaminant Modeling Branch Portland State University

US Army Engineer and Research Development Center PO Box 751

Waterways Experiment Station Portland, Oregon 97207-0751

3909 Halls Ferry Road (503) 725-4276 office

Vicksburg, MS 39180-6199 (503) 725-5950 fax

(601) 634-3283 office e-mail

(601) 634-3129 FAX

e-mail