United States
            Environmental Protection
            Agency
            bnvironmantal Research
            Laboratory
            Athens GA 30613
EPA-600 3-82-055
May 1982
            Research and Development
xvEPA
User's Manual for the
Instream Sediment-
Contaminant Transport
Model SERATRA

-------
                                            EPA  600/3-82-055
                                            May  1982
USER'S MANUAL FOR THE INSTREAM SEDIMENT-CONTAMINANT
             TRANSPORT MODEL SERATRA
                        by

             Y.  Onishi and S.E.  Wise
                     Battelle
           Pacific Northwest Laboratories
             Richland, Washington 99352
              Contract No.  68-03-2613
                   Project Officer

                 Robert B. Ambrose
   Technology Development and Applications Branch
        Environmental Research Laboratory
             Athens, Georgia 30613
        ENVIRONMENTAL RESEARCH LABORATORY
        OFFICE OF RESEARCH AND DEVELOPMENT
       U.S.  ENVIRONMENTAL PROTECTION AGENCY
             ATHENS, GEORGIA 30613

-------
                     NOTICE

Mention of trade names or commercial products does not
constitute endorsement or recommendation for use.
                        11

-------
                                  FOREWORD

      As environmental controls become more costly to implement and the
penalties of judgment errors become more severe, environmental  quality
management requires more efficient management tools based on greater know-
ledge of the environmental phenomena to be managed.  As part of this
Laborarory's research on the occurrence, movement, transformation, impact, •
and control of environmental contaminants, the Technology Development and
Applications Branch develops management and engineering tools to help pol-
lution control officials achieve water quality goals through watershed
management.

      Many toxic contaminants are persistent and undergo complex interactions
in the environment.  As an aid to environmental decision-makers, the Chemical
Migration and Risk Assessment methodology was developed to predict the
occurrence and duration of pesticide concentrations in surface  waters re-
ceiving runoff from agricultural lands and to assess potential  acute and
chronic damages to aquatic biota.

                                        David W. Duttweiler
                                        Director
                                        Environmental Research  Laboratory
                                        Athens, Georgia

-------
                                  ABSTRACT

      This manual  guides the user in applying the sediment-contaminant trans-
port model SERATRA.   SERATRA is an unsteady, two-dimensional  code that uses
the finite element computation method with the Galerkin weighted residual
technique.  The model  has general  convection-diffusion equations with decay
and sink/source terms  with appropriate boundary conditions.   A sediment
transport submodel,  a  dissolved contaminant transport submodel, and a partic-
ulate contaminant (contaminants adsorbed by sediment) transport submodel  are
coupled to include the effects of sediment-contaminant interaction.

      SERATRA is an  integral part of the Chemical Migration  and Risk Assess-
ment Methodology,  which predicts overland and instream pesticide migration
and fate to assess the potential short- and long-term impacts on aquatic
biota in receiving streams.  Companion reports to this document are Methodology
for Overland and Instream Migration and Risk Assessment of Pesticides, Mathe-
matical Model SERATRA  for Sediment-Contaminant Transport in  Rivers and Its
Application to Pesticide Transport in Four Mile and Wolf Creeks in Iowa,
User's Manual for EXPLORE-I:  A River Basin Water Quality Model (Hydraulic
Module Only), and Frequency Analysis of Pesticide Concentrations for Risk
Assessment (FRANCO Model).

      This report was  submitted in partial fulfillment of Contract No. 68-
03-2613 by Battelle  Pacific Northwest Laboratories under the sponsorship  of
the U.S. Environmental Protection Agency.  This report covers the period
April 1978 to January  1980, and work was completed as of January 1980.

-------
                                  CONTENTS





SECTION 1 - INTRODUCTION 	     1



SECTION 2 - PROGRAM DESCRIPTIONS 	     2



     COMPUTATION PROCEDURE   	     2



     PROGRAM MODULE DESCRIPTION  	     4



     DEFINITION OF VARIABLES 	    17



     FILE EXPLANATION	23



SECTION 3 - DESCRIPTION OF MODEL OPERATION   	    26



     SERATRA OPERATING INSTRUCTIONS  	    26



     CONSOLE SWITCHES    	    27



     INPUT REQUIREMENTS FOR SERATRA	27



     SERATRA ERROR MESSAGES  	    57



     SERATRA POST-PROCESSING ROUTINE (SPPR)  	    59



SECTION 4 -  REFERENCES	62



APPENDIX - SERATRA LISTING   	   A-l

-------
                                 SECTION 1

                                INTRODUCTION
     This manual is the guide to the sediment-contaminant transport model,
SERATRA (Onishi et al. 1976; Onishi, 1977, Onishi et al. 1979a).  SERATRA
is an unsteady, two-dimensional code which utilizes the finite element
computation method with the Galerkin weighted residual technique.  The
model has general convection-diffusion equations with decay  and sink/
source terms with appropriate boundary conditions.  It consists of three
submodels coupled to include the effects of sediment-contaminant  inter-
action.  The submodels are:

 1.  a sediment transport submodel
 2.  a dissolved contaminant transport submodel
 3.  a particulate contaminant (contaminants adsorbed by sediment)
     transport submodel.

     SERATRA was used as an integral part of the Chemical Migration and
Risk Assessment (CMRA) Methodology to predict overland and instream pesti-
cide migration and fate and to assess the potential short- and long-term
pesticide impacts on aquatic biota in receiving streams.  Separate reports
describe the mathematical model formulation and application  results of
SERATRA (Onishi and Wise, 1979) and the overall CMRA Methodology  (Onishi
et al. 1979b).

     The model consists of one main program and 41 subroutines.   This
manual provides detailed program structures, input instructions,  explana-
tions of required input data, samples of input data and instructions for
computer program operations.

-------
                                 SECTION 2

                            PROGRAM DESCRIPTIONS
     SERATRA is written in the FORTRAN preprocessor language, FL.ECS.
However, a standard Fortran IV version of SERATRA is also available.

     The SERATRA source package contains all of the program FLECS source
files, a labeled COMMON include file, a size parameter include file, and
an overlay descriptor file.  Also included are various indirect command
files that are used to create FORTRAN sources, compile programs, list the
program sources, and create the task image.  The purpose of this chapter
is to describe each file or subprogram and to explain the sequence of
events and data file actions that occur during a simulation.

COMPUTATION PROCEDURE

     The simulation procedure consists of the following five major steps:

 1.  Read the problem definitions.
 2.  Read and process input data for each river segment.
 3.  Prepare temporary data and the segment's result file.
 4.  Solve the sediment and contaminant transport equations.
 5.  Write the simulation results to result files.

Step 1 is only performed once.  Steps 2 through 5 are repeated for each
river segment being simulated and Steps 4 and 5 are repeated for each time
step in the simulation.  This procedure could be described as a "marching
solution" because each river segment is modeled for all time steps before
moving downstream to the next river segment.

     Each major step is made up of many sub-steps.  Detailed description
of each major step is as follows:

 1.  Read the problem definitions

     a.  Read the input file name and result file name from the console
         input device.
     b.  Read the simulation control variables, number of segments, simu-
         lation length, and other parameters that describe the general
         characteristics of the simulation from the input file.
     c.  Open the time series analysis data file.

 2.  Read and process the data for each river segment

-------
     a.  Read the river segment dimensions.
     b.  Read the sediment characteristics.
     c.  When processing the data for the first segment, read the
         photolysis data.
     d.  Read initial bed conditions of sediment and contaminants in the
         segment.
     e.  Read initial water column conditions of sediment and contaminant
         in the segment.
     f.  When processing Segment 1 (upstream-end segment) read sediment
         and contaminant concentrations from upstream of the segment.
     g.  Read concentrations of sediment and contaminants from tribu-
         taries, if any.
     h.  Read the hydrologic data.

3.  Prepare temporary data and the segment's result file.

     a.  Convert initial nodal concentrations to cell-centered concen-
         trations.
     b.  Build the  segment's result file name and open the file for output.

4.  Solve the sediment and contaminant transport equations.

     a.  Update the flow and concentration values for the new time step.
     b.  Redistribute the flows and concentrations if the water depth
         within the segment has changed between time steps.
     c.  Add any concentration contributions from a tributary source to
         the concentrations from upstream.
     d.  Calculate  the amount of deposition to the river bed or resus-
         pension from the bed for sand, silt, and clay.
     e.  Determine  the coefficients of convection, diffusion, decay, and
         source terms in the sediment and particulate contaminant trans-
         port convection-diffusion equations for each of three sediment
         size fractions and in the dissolved contaminant transport
         convection-diffusion equation.
     f.  Solve the  sediment transport equations to compute vertical dis-
         tribution  of sediment for each sediment size fraction.
     g.  Solve the  particulate contaminant transport equations to compute
         vertical distribution of contaminant attached to sediment of each
         size fraction.
     h.  Solve dissolved contaminant transport equations to compute verti-
         cal distributions of dissolved contaminant.
     i.  Redistribute the sediment and particulate contaminant concen-
         trations due to the settling velocities of the sediments.
     j.  Calculate  the decay of the contaminant in the river bed.
     k.  Update the bed history with new deposition and resuspension of
         sediments  and particulate contaminants.

 5.   Write the simulation results to result files

     a.  Save computed concentrations which will become input to the seg-
         ment downstream.

-------
     b.  Save the concentrations to segment's result files for post-
         processing by Program SPPR.
     c.  Write the depth-averaged concentrations to the time series
         analysis file for post-processing by Program FRANCO (Onishi
         et al, 1979b).

PROGRAM MODULE DESCRIPTION

     Figure 1 is a schematic of the model linkage.  Following is the
description of each program module in alphabetical order following the
main program.

Executive Program - SERATRA

     Except for some concentration conversions and averaging, the execu-
tive program's main responsibility is calling the other subprograms.   It
does, however, write the results at each time step to the time series
analysis file, the segment's result file, and the next segment's upstream
condition input file.  It also controls the segment and time-step loops.

     The executive program calls the following subroutines:
                     STRTUP     WTRDAT     FCODE     SAVE IT
                     INIDAT     UPSDAT     HYDFLO    DIA6
                     DIMDAT     TRBDAT     ICFLO
                     SEDDAT     HYDDAT     RDSFLO
                     PHOINP     RPTERR     TRBFLO
                     BEDDAT     COLLAP     TRANSP

Subroutine BEDDAT

     Called at the beginning of simulation in each segment to read the
segment's initial bed conditions that include the sediment weight frac-
tions of three sediment sizes, and contaminant concentrations associated
with these three sediment size fractions.

     Called by SERATRA

Subroutine BEDDK

     Computes changes  in the bed contaminant concentrations caused by
radionuclide decay.

     Called by TRANSP

Subroutine BEDHIS

     Maintains and updates a record of bed history for river-bed eleva-
tion, bottom sediment  size fraction ratio, and associated contaminant
concentrations.

     Called by TRANSP

-------











































































































»















•^
PROGRAM SERATRA
1. CALL EXECUTION SUBROUTINES
2. PERFORM CONCENTRATION COWERS IONS AND AVER AC ING
3. WRITE RESULTS TO VARIOUS FILES

SUBROUTINE STRTUP
L CONTROL THE INTERACTIVE I/O SESSION PRIOR TO THE SIMULATION
2 OPEN SEVERAL TEMPORARY FILES
3. CALL SUBROUTINE FDCODE

SUBROUTINE FDCODE
L SEPARATE THE BASE RESULT FILE NAME INTO THE FIVE PARTS

SUBROUTINE INIDAT
L READ THE SIMULATION CENTRAL VARIABLES
2. CALL SUBROUTINE PUTTRR IF AN ERROR IS DETECTED

SUBROUTINE PUTERR
1. COUNT THE NUMBER OF ERRORS DETECTED
2. STORE THE ERROR IDENTIFICATION CODES

SUBROUTINE DIMDAT
OF EACH RIVER SEGMENT

SUBROUTINE 5EODAI
L READ THE INPUT DATA FOR THE SEDIMENT CHARACTERISTICS
3. CALL SUBROUTINE PUTERR IF AN ERROR IS DETECTED

SUBROUTINE PUTERR
1 COUNT THE NUMBER OF ERRORS DETECTED
2. STORE THE ERROR IDENTIFICATION CODE

SUBROUTINE PHOINP
L READ INPUT DATA FOR THE PHOTODEGRADATION

SUBROUTINE BEDDAT
L READ THE INITIAL BED CONDITIONS FOR SEDIMENT AND CONTAMINANTS

SUBROUTINE WTRDAT
1. READ AND PROCESS INITIAL CONDITIONS OF SEDIMENT AND
CONTAMINANTS IN A WATER COLUMN

SUBROUTINE UPSDAT
L READ THE UPSTREAM BOUNDARY CONDITIONS OF SEGMENT 1 (UPPER MOST
SEGMENT)
2. STORE THEM IN A TEMPORARY FILE
3. CAU. SUBROUTINE PUTERR IF AN ERROR IS DETECTED

SUBROUTINE PUTERR
L COUNT THE NUMBER OF ERRORS DETECTED
2. STORE THE ERROR IDENTIFICATION CODES

SUBROUTINE TRBDAT
L READ AND PROCESS TRI BUTARY DATA SET
2. STORE THEM 1 N A TEMPORARY Fl L£
3. CAL SUBROUTINE PLTTERR IFAN ERROR IS DETECTED

SUBROUTINE PUTERR
L. COUNT THE NUMBER OF ERRORS DETECTED
2. STORE THE ERROR 1 DENTIFI CATION CODES

SUBROUTINE HYDDAT
1. READ AND PROCESS THE HYDROLOGIC INPUT DATA
2. STORE THEM 1 N A TEMPORARY F' LE
4. CALL SUBROUTINES TRNPOS AND RADIUS

SUBROUTINE PUTERR
2. STORETHE ERROR IDENTIFICATION CODES

SUBROUTINE TRNPOS
L CREATES EQUIVALENT RECTANGULAR ELEMENTS

SUBROUTINE RADIUS
1. CALCULATES THE HYDRAULIC RADIUS OF A GIVEN SECTION


















1




























j






^— -


I^MMM


































































Figure 1.   Schematic of Model  Linkage



                 5

-------
                              SUBROUTINE DIAG
             I ASSIGN DIAGNOSTIC TRACES TO THE APPROPRIATE SEGMENT
                               SUBROUTINE RPTERR
             1. WRITE DETECTED ERRORS TO THE FILE. SEP. 1ST
                               SUBROUTINE COLLAP
             1. CONVERT NOOAL VALUES OF CONCENTRATIONS TO CELL- CENTERED
               CONCENTRATIONS
                               SUBROUTINE FCODE
             1. SUILDThE SEGMENT'S RESULT FILE SPECIFICATION FOR THE OUTPUT
               PARAMETER FILE NAME
n
                  SUBROUTINE HYDRO
L  READ THE HYDROLOGIC DATA FROM THE TEMPORARY FILE
2.  COMPUTE THE VERTICAL VELOCITY
3.  CALL SUBROUTINES SHEARR SHEARS AND PROFIL
                           SUBROUTINE SHEARR
          L COMPUTE BED SHEAR STRESS AND SHEAR VELOCITY FOR IMPROVEMENTS
                           SUBROUTINE SHEARS
          L COMPUTE BED SHEAR STRESS AND SHEAR VELOCITY FOR RIVERS
                           SUBROUTINE PROFIL
          L DISTRIBUTE FLOW DISCHARGE VERTICALLY TO EACH ELEMENT
                           SUBROUTINE ICRO
          1. READ SEDIMENT AND CONTAMINANT CONCENTRATIONS AND
            INFLOWS INTO THE SEGMENT FROM THE UPSTREAM SEGMENT
          2. CALL SUBROUTINE EQUPCS. RADIUS,  SHEARR, SHEARS. AND
            PROFIL
                            SUBROUTINE EOUPCS
          1. GENERATES A COMPATIBLE SET OF ELEMENTS UPSTREAM OF THE
            FIRST SEGMENT
                           SUBROUTINE RADIUS
          L CALCULATES THE HYDRAULIC RADIUS OF A GIVEN SECTION
                           SUBROUTINE SHEARR
         1.  COMPUTE BED SHEAR STRESS AND SHEAR VELOCITY FOR
            IMPROVEMENTS
                           SUBROUTINE SHEARS
         L  COMPUTE BED SHEAR STRESS AND SHEAR VE.OC1TY FOR RIVERS
                           SUBROUTINE PROFIL
         1.  DISTRIBUTEROW DISCHARGE VERTICALLY TO EACH ELEMENT
                           SUBROUTINE RDSFLO
         L  IF THE FLOW DEPTH CHANGES FROM ONE TIME TO THE NEXT TIME.
            PERFORM THE PROPER ADJUSTMENT OF SEDIMENT AND CONTAMINANT
            CONCENTRATIONS. CALL SUBROUTINE EOUPXS
                           SUBROUTINEEQUPXS
         1.  GENERATES A COMPATIBLE SET OF ELEMENTS TO INPUT INTO
            THE NEXT TIME STEP
                      Figure  1.    (contd)

-------
                  SUBROUTINE TRBRO
I  READ THE TRIBUTARY INPUT DATA FROM THE TEMPORARY FILE
Z  DISTRIBUTETRIBUTARYINaOW OF SEDIMENT AND CONTAMINANTS
   VERTICALLY	

                  SUBROUTINE TRANSP
L  CALL SUBROUTINES BEDDK, BEDHIS, COMB, DISOLV, PARTIC.
   SAND. SEDIME. SETUP. 5ILCLA. TRISOL	

                  SUBROUTINE SAND
1.  CALCULATE THE AMOUNT OF SAND DEPOSITION TO THE RIVER BED
   OR RESUSPENSION FROM THE BED
2.  CALL SUBROUTINETOFFAL AND COLBY	

                  SUBROUTINE TOF^L
i  COMPUTE THE CAPACITY OF THE FLOW TO TRANSPORT SAND BY USING
   THE TOFFALETTI METHOD


                  SUBROUTINE COLBY
1.  COMPUTE THE CAPACITY OF THE ROW TO TRANSPORT SAND BY US ING
   THE COLBY METHOD

                  SUBROUTINE SILCLA
1.  CALCULATE THE AMOUNT OF SILT AND CLAY DEPOSITION OR EROSION


                  SUBROUTINE SEDIME
1.  CALCULATE COEFFICIENTS OF CONVECTION, DIFFUSION,  DECAY AND
   SOURCE TERMS IN THE SEDIMENT TRANSPORT EQUATIONS

                  SUBROUTINE PARTIC
1.  CALCULATE COEFFICIENTS OF CONVECTION, DIFFUSION,  DECAY AND
   SOURCE TERMS IN THE PARTICULATE CONTAMINANT EQUATIONS
                  SUBROUTINE DISOLV
L  CALCULATE COEFFICIENTS OF CONVECTION,  DIFFUSION. DECAY AND
   SOURCE TERMS IN THE DISSOLVED CONTAMINANT EQUATION	


                  SUBROUTINE SETUP
1.  SET UP FINITE ELEMENT MATRICES FOR SEDIMENT AND CONTAMINANT
   TRANSPORT EQUATIONS

                  SUBROUTINE COMB
L  PERFORMAN INTERMEDIATE COMPUTATION FOR ALGEBRAIC EQUATIONS
   RESULTING FROM THE SEDIMENT AND CONTAMINANT TRANS PORT
   EQUATIONS
           Figure   1.    (contd)

-------
                 SUBROUTINE TRISOL
L SOLVETHESYSTEMOFTHEALGEBRAICEOUATIONS BYTHEGAUSSIAN
  aiMINATION TECHNIQUE
                  SUBROUTINE 8EDDK
L  COMPUTE CHANGES IN THE PARTICULAR CONTAMINANT CONCENTRATIONS
   WITHIN THE RIVER 3ED DUE TO RADIONUCUDE DECAY
                  SUBROUTINE BEDHIS
L  MAINTAIN AND UPDATE A RECORD OF BED HISTORY FOR THE RIVER
   BED ELEVATION, AND DISTRIBUTIONS OF BED SEDIMENTS AND PARTICULATE
   CONTAMINANT
                  SUBROUTINE SAVEIT
L  COMPUTE THE DEPTH-AVERAGED CONCENTRATIONS OF SEDIMENT AND
   CONTAMINANTS
2.  SUM UP THE PARTI CULATE CONTAMINANT CONCENTRATION FOR EACH
   SEDIMENT SIZE TO OBTAIN THE TOTAL PARTICULATE CONTAMINANTS
3.  SUM UP THE DISSOLVED AND PARTICULATE CONTAMINANT CONCENTRA-
   TIONS TO OBTAIN TOTAL OF CONTAMINANT CONCENTRATIONS
4.  WRITE THE SIMULATION RESULTS TO THE OUTPUT FILE
                Figure  1.    (contd)

-------
Subroutine BEDDAT

     Reads and processes  initial bed conditions.

     Called by SERATRA

Subroutine BEDDK

     Calculates the decay of. the contaminants  in  the  river  bed.

     Called by TRANSP

Subroutine BEDHIS

     Adjusts bed surface elevations, sediment  fractions,  and  associated
concentrations due to scouring and deposition.

     Called by TRANSP

Subroutine COLBY

     The model, SERATRA, offers options to select either  the  Colby  or
Toffaletti methods to compute the capacity of  the flow  to transport sand
in rivers.  This subroutine  describes the Colby method.   The  Colby  method
includes the effects of temperature and fine sediment concentration on
sand transport explicitly and is generally applied  to small streams.

     Called by SAND

Subroutine COLLAR

     Converts nodal values of concentrations to cell-centered
concentrations.

     Called by SERATRA

Subroutine COMB

     For the following equation:

     [P] (C}n+l =  [S] {C>n + {R},

this subroutine calculates the right hand side of the equation.

     Called by TRANSP

Subroutine DIMDAT

     Reads and processes the input data that describe the dimensions of
each segment.  Dimensions include segment length, surface area and  thick-
ness of each vertical water column element, bed layer thicknesses,  initial

-------
bed thickness, numbers of bed layers and vertical water column elements,
bed surface elevation, and porosity of bed sediment.

     Called by SERATRA.

Subroutine DISQLV

     Calculates the coefficients of convection, diffusion, decay and
source terms in the dissolved contaminant transport equation.

     Called by TRANSP

Subroutine EQUPCS

     Calculates depth of upstream elements to match conditions at
segment 1.

     Called by ICFLO

Subroutine EQUPXS

     Calculates depth of elements previous to the present computational
segment.

     Called by RDSFLO

Subroutine FCODE

     Builds the segment's result file specification for the  output parame-
ter file name from the device name, group identification code, user
identification code, base file name, extension and the segment number.

     Called by SERATRA

Subroutine FDCODE

     Separates the base result file name  into the five parts  of device,
group identification code, user identification code, base file name,  and
extension.

     Called by STRTUP

Subroutine HYDDAT

     Reads and processes the hydrologic  input data.  The data are read
(logical Unit 1), checked for consistency, and written to the temporary
file HYDROLOGY.TMP (logical Unit 4).

     Called by SERATRA
     Calls TRNPOS, RADIUS, and PUTERR
                                      10

-------
Subroutine HYDFLO

     Called each time step to read the hydrologic data from the  file
HYDROLOGY.IMP, which has been prepared by subroutine HYDDAT.   It also
computes the vertical velocities, if any.

     Called by SERATRA
     Calls SHEARR, SHEARS, and PROFIL

Subroutine ICFLO

     Reads the sediment and contaminant concentrations and inflows  into
the segment from the upstream segment.  For Segment 1, the data  are read
from the file prepared by Subroutine UPSDAT.  For the other segments, the
data are the simulation results for the stream segment that were saved by
the executive routine.

     Also redistributes sediment and contaminant concentrations  within the
segment by calling Subroutine SEGMTX if the depth of the upstream segment
differs from the depth of the current segment.

     Called by SERATRA
     Calls EQUPCS, RADIUS, SHEARR, SHEARS, PROFIL

Subroutine INIDAT

     Reads the simulation control variables such as number of  time  steps,
number of segments, time step save frequency, time step length,  and the
time series analysis control parameters.

     Called SERATRA
     Calls PUTERR

Subroutine PARTIC

     Calculates the coefficients of convection, diffusion, decay, and
source terms in the particulate contaminant transport equation.  This
calculation is performed for the particulate contaminant attached to each
sediment in three sediment size fractions.

     Called by TRANSP

Subroutine PHOINP

     Reads data and parameters for the dissolved contaminant degradation
due to photolysis.

     Called by SERATRA
                                     11

-------
Subroutine PROFIL

     Assigns the flow discharge to each element according to a logarithmic
or uniform vertical velocity profile from the cross-sectionally averaged
discharge.  The decision of which profile to be used is based upon the
distance from the river bottom to the elevation where the logarithmic
velocity becomes theoretically zero.  When this distance is greater than
one fourth the bottom element thickness, a uniform profile is used.
Otherwise, the logarithmic profile is assigned to the flows.

     Called by HYOFLO, ICFLO

Subroutine PUTERR

     Called when an error is detected during the input data processing.
PUTERR stores the error identification code and counts a number of error
detected.

     Called by DIMDAT, INIDAT, TRBDAT, and UPSDAT

Subroutine RADIUS

     Calculates the hydraulic radius for a given depth and geometry.

     Called by HYDDAT, ICFLO

Subroutine RDSFLO

     Redistributes the sediment and contaminant concentrations within the
same segment whenever the flow depth changes from one time to the next.

     Called by SERATRA
     Calls EQUPXS

Subroutine RPTERR

     If any errors are detected during the input of data processing, this
subroutine writes these errors to the file SED.LST (logical unit 6).  It
opens the error message file SERATERR.MSG (logical unit 10), reads the
appropriate error messages, and reports them.

     Called by SERATRA

Subroutine SAND

     Calculates the amount of sand deposition to the river bed or resus-
pension from the bed.  Availability of sand to be scoured from the river
bed is also checked if resuspension occurs.  The user decides whether to
use the Colby or Toffaletti sediment discharge formula to compute the
capacity of the flow to transport the noncohesive sediment for an assigned
river reach.  However, if the Colby method is selected and should fail


                                     12

-------
during the simulation period, as a result of some  limitations, the
Toffaletti method automatically replaces the Colby method to continue the
simulation.

     Called by TRANS
     Calls TOFFAL and COLBY

Subroutine SAVE IT

     Writes the simulation results to the binary output file (logical
unit 5) at predetermined time steps.  SAVE IT computes the depth-averaged
concentrations of sediment and contaminants, total particulate concentra-
tion (sum of depth-averaged particulate contaminants associated with three
sediment size fractions), total contaminant concentrations  (sum of dis-
solved and particulate contaminants), and average contaminant concen-
trations for each river bed layer before they are written to the file.

     Called by SERATRA

Subroutine SEDDAT

     Reads the input data related to sediment characteristics for each
river segment.  These values include sediment fall velocities, densities,
diameters, critical shear stress values, vertical diffusion coefficients,
contaminant adsorption values, and decay parameters.  It computes rates of
contaminant decay due to hydrolysis, oxidation, and biodegradation.

     Called by SERATRA
     Calls PUTERR

Subroutine SEDIME

     Calculates the coefficients of convection, diffusion,  decay, and
source terms in the sediment transport equations for each sediment size
fraction.

     Called by TRANS

Subroutine SETUP

     Sets up finite-element matrices [P] , [S] and  [R] for sediment and
contaminant transport.
    [P]  g    +  [S] (0 =  {R}

     Called by TRANS

Subroutine SHEARR

     Computes bed shear stress and shear velocity for the sediment-laden
flow in impoundments such as reservoirs where the slope of the bed is not

                                     13

-------
parallel to the slope of the water surface.  Computations are  based  on  the
velocity, depth, and bed-sediment diameter.

     Called by HYDFLO

Subroutine SHEARS

     Computes the bed shear stress and shear velocity of free-flowing
water bodies, such as rivers and streams.  The bed slope, hydraulic  radius
and specific weight of water are the basis for the calculations.  This
method is not applicable to areas of impoundments.

     Called by HYDFLO

Subroutine SILCLA

     Calculates the amount of silt and clay deposition or erosion.
Availability of silt and clay on the river bed is checked if erosion
occurs.  The Partheniades and Krone formulas are used to compute the rates
of cohesive sediment deposition or erosion.

     Called by TRANSP

Subroutine STRTUP

     Responsible for controlling the interactive I/O session prior to the
simulation and for opening the following temporary files:

       Name        LUN                        Contents
   DUMMY.DTI        2    Inflow/outflow for Segment 1, Initial conditions
                         to Segment 1
   DUMMY.DT2        3    Inflow/outflow for other segments
   HYDROLOGY.TMP    4    Current segment's hydrologic data
   SED.LST          6    Line printer listing file
   TRIBUTARY.TMP    7    Current segment's tributary data

     Called by SERATRA
     Calls FDCODE

Subroutine TOFFAL

     User can choose either the Toffaletti or Colby methods to compute  the
capacity of the flow to transport sand.  This routine is used to compute
sediment capacity by the Toffaletti method.

     Called by SAND
                                     14

-------
Subroutine TRANSP

     Controls Step 4  (solve the sediment and contaminant  transport  equa-
tions) as described in the previous section.  The major task  of  this  sub-
routine is to call other subroutines.

     Called by SERATRA
     Calls BEDDK, BEOHIS, COLLAR, COMB, OISOLV, PARTIC, SAND,  SEDIME,
           SETUP, SILCA and TRISOL

Subroutine TRBDAT

     Reads and processes tributary data set.  The data are  read  from  the
input stream (logical unit 1), and written to a temporary file,
TRIBUTARY.TMP (logical unit 7).  Tributary data include sediment con-
centration for each sediment size fraction, concentration of  particulate
contaminant associated with each sediment size fractions, and  concen-
tration of dissolved contaminant.

     Called by SERATRA
     Calls PUTERR

Subroutine TRBFLO

     If a segment contains a confluence with a tributary, this routine  is
called each time step to read the tributary input data from TRIBUTARY.TMP
(logical unit 7) and to redistribute concentrations to each vertical  layer.

     Called by SERATRA

Subroutine TRISOL

     Solves the system of equations [A] {C} = [B]  for {C}.  The  Gaussian
elimination technique is used in this program.

     Called by TRANSP

Subroutine TRNPOS

     Creates idealized rectangular geometry from input cross-sections.

     Called by HYODAT

Subroutine UPSDAT

     Responsible for reading the upstream inflow conditions to Segment  1
(upper most segment) from the input stream (logical unit  1) and  writing
them to DUMMY.DTI (logical  unit 2) for subsequent use during the simula-
tion of Segment 1.

     Called by SERATRA
     Calls PUTERR

                                     15

-------
Subroutine wTRDAT

     Reads and processes initial sediment and contaminant  concentrations
in segments except Segment 1 prior to the simulation.  Data to be read
from the input stream (logical unit 1) include the sediment concentration
for each sediment size fraction, the concentrations of the contaminant
attached to a sediment of each size fraction, and dissolved contaminant
concentration.

     Called by SERATRA

"INCLUDE" File Descriptions

     In this program, INCLUDE files are used to ease the program develop-
ment and maintenance.  Any changes to an INCLUDE file are  propagated
throughout the program units that reference the file.

ELMSIZ.PRM Description

     This file contains a single PARAMETER statement that  sets the  size of
three constants.  These parameterized constants in turn set the sizes of
most of the arrays referenced in the program modules.

     MXELEM specifies the maximum number of elements that  will be allowed
in the water column.  This constant can be changed to tailor the program
to a particular problem, by noting that each increase of one element will
add approximately 400 (octal number) bytes to the program's memory
requirements (assuming that the overlay descriptor is not  altered).

     The maximum number of bed layers is controlled by MAXLEV.,  Adjusting
this parameter does not have much effect on the overall size of the
program.

     MAXCON limits the number of sediment and contaminant  types that will
be computed during a simulation and, while it is a parameter, it cannot be
changed without program modifications.  The program expects the following
concentration values to be in the specified order:

 1.  sand
 2.  silt
 3.  clay
 4.  contaminant attached to sand
 5.  contaminant attached to silt
 6.  contaminant attached to clay
 7.  dissolved contaminant (not included in contaminant concentrations  in
     river bed).

TRANS.COM Description

     SERATRA minimizes the use of any COMMON areas of storage.  However,
because of the limits of the FORTRAN compiler, it was necessary to  sub-
stitute the labeled COMMON TRANS for the argument list to  the subroutine

                                     16

-------
TRANSP.  Only those variables that are needed by the subroutine are
included in the common.  The sizes of the arrays are set by the PARAMETER
statement in the file ELMSIZ.PRM.
DEFINITION OF VARIABLES

     Variables used in SERATRA
and definitions).
       Name
ABAR(MXELEM)


ALEN

ALFA

ANALMT


ANALYS

AREA(MXELEM)


AWID(MXELEM)

B(MAXLEV,MAXCON-1)


BASE(5)

BDIV

BED

BETA

C(MXELEM.MAXCON)
Type

R*4


R*4

R*4

R*4


L*l

R*4


R*4

R*4


BYTE

R*4

R*4

R*4

R*4
CCIN(MXELEM,MAXCON)     R*4
CLAST(MXELEM.MAXCON)    R*4
       are listed here (name, array sizes, types,
	Definitions	

Average surface area of the vertical
elements (AREA(I)+AREA(I+1))/2.0

River segment length

Decay term

Cutoff concentration of dissolved
contaminant for time series analysis

Control variable for time series analysis

Surface area of each vertical element  of a
segment

Width of each vertical element of a segment

Sediment and contaminant concentrations
within the river bed

Result file base file name

Standard thickness of each bed layer

Total bed thickness

Source or sink term

Sediment and contaminant concentrations in
a water column

Sediment and contaminant concentrations
flowing into a segment

Initial concentrations of sediment and
contaminant for a given segment
                                     17

-------
Name
COLD(MXELEM,MAXCON)

CTRB(MXELEM,MACXON)
CTRIB(MAXCON)
D(MXELEM)
DECAY(6)
DELTD
DELTH
DELZ
DELZT
DENS(3)
DEPO
DEV(3)

DFZ(4)
DIAM(3)
DSHR(3)
Dl(MXELEM)
D2(MXELEM)
D50
E(18)
Type
R*4

R*4
R*4
R*4
R*4
R*4
R*4
R*4
R*4
R*4
R*4
BYTE

R*4
R*4
R*4
R*4
R*4
R*4
R*4
Definitions
Solution of the transport equations con-
verted to cell -centered concentrations.
They become inflow concentrations to the
downstream segment.
Vertically distributed sediment and con-
taminant concentrations in a tributary
Cross-sectionally averaged concentrations
of sediment and contaminant in a tributary
Diagonal coefficients of the tridiagonal
matrix
First-order degradation rates of
contaminant
Simulation time step in days
Simulation time step in seconds
Standard thickness of each vertical element
Thickness of the top water element
Sediment density
Deposition rate of cohesive sediments
Device specification from the result file
name
Vertical diffusion coefficients for sand,
silt, clay and dissolved contaminant
Particle diameters of sand, silt and clay
Critical shear stress for deposition of
sand, silt and clay
Subdiagonal coefficients of the tri-
diagonal matrix
Superdiagonal coefficients of the tri-
diagonal matrix
Median bed sediment diameter
Light adsorption coefficients for
18 different wavelengths



     18

-------
Name
ECHO
ELEV
ENDHYD
ENDIC
ENDTRB
Type
L*l
R*4
1*4
1*4
1*4
Definitions
Line printer echo control variable
Bed elevation of the segment
Ending time (seconds) for the current set
of hydro! ogic data
Ending time (seconds) for the current set
of initial conditions
Ending time (seconds) for the current set
ERODE(3)
INFLO
R*4
ETIME
FERROR
FTYPE(3)
GSI
GUIC(3)
HLDERR(IOO)
HRAD
ILAYER(3)
1*4
L*l
BYTE
R*4
BYTE
BYTE
R*4
1*2
1*2
ISEG
ITPRT
JULIAN
KAY1
KAY2
1*2
1*2
1*2
R*4
R*4
of tributary data
Erodibility coefficient of cohesive
sediment
Elapsed simulation time (seconds)
Fatal error flag
File extension from the result file name
Total capacity of sediment transport rate
Group number from the UIC of the result
file name
Holding array for input error numbers
Hydraulic radius
Zero or positive value corresponds to the
number of layers to be completely scoured
for each sediment size fraction.  Negative
values correspond to the number of layers
to be created by sediment deposition.
Logical unit number of the file containing
the results of the previous segment
Segment number currently being simulated
Time plane save frequency
Julian starting date of the simulation
Light extinction coefficient in clear water
Light extinction coefficient due to sus-
pended sediment in water
                                     19

-------
       Name
MAXLEV

MAXCON


MXELEM


NBED

NELEM


NELEMB


NEWQI



NSETS
NSTEPS


NTRIBS


NUMERR

NXEQ

OUTFLO



PCOEF(4)


PDELZ


PDELZT
1*2     Maximum allowable number for bed layers

1*2     Total number of substances (sediment and
        contaminant) for simulation

1*2     Maximum allowable number of vertical water
        elements

1*2     Number of bed layers

1*2     Number of elements in the water column for
        the current segment

1*2     Number of elements in the water column for
        the previous segment

L*l     QHIN data flag that is turned on when new
        sets of incoming flows or tributaries are
        supplied

1*2     Number of time planes that the initial
        conditions of Segment 1 must be written to
        the input file of Segment 2.  This  is to
        allow for the travel time of the flow
        through the segment to reduce or eliminate
        the numerical dispersion.

1*4     Total number of time steps for the
        simulation

1*2     Indicator to signal the presence of a
        tributary to the segment

1*2     Input error counter

1*4     Current time step counter

1*2     Logical unit number of the file receiving
        the results of each time step for the
        current segment

R*4     Photolysis rate at the water surface for
        four seasons

R*4     Standard element thickness of the previous
        segment

R*4     Thickness of the top element of the
        previous segment
                                      20

-------
Name
PDEPTH
PELEV
PHI
POR
PTOELZ
PTDLZT
PTQAVG(MXELEM)
QAVG(MXELEM)
QHIN(MXELEM)
QHOLD(MXELEM)
QHOUT(MXELEM)
QV(MXELEM)
R(MXELEM)
RESELN
RHO
RSUSP(3)
S(MXELEM,3)
SCSHR(3)
SD(MXELEM,3)
SECDAY
Type
R*4
R*4
R*4
R*4
R*4
R*4
R*4
R*4
R*4
R*4
R*4 .
R*4
R*4
R*4
R*4
R*4
R*4
R*4
R*4
R*4
Definitions
Flow depth of the previous segment
Bed elevation of the previous segment
The reaction quantum yield for the con-
taminant in air-saturated pure water to be
used to compute the photolysis rate
Bed sediment porosity
Standard element thickness at the previous
time step
Thickness of the top element at the
previous time step
Discharge leaving the segment at the
previous time step
Discharge leaving the segment at the end
of the current time step
Inflow rate to the current segment
Discharge into the segment from the
upstream segment previously simulated
Discharge leaving the segment at the end
of the current time step
Vertical flow rate
Finite-element load vector
Water surface elevation
Density of water
Erosion rates of sediments
Finite-element unsymmetric band matrix
Critical shear stresses for scour for
sand, silt and clay
Amount of sediment removed from each
element as a result of sediment deposition
Number of seconds in a day
21

-------
Name
SECYR
51(18,4)
SIMLEN
SLOPE
SMETH
SORBK(9)
SR(3)
STRESS
T
TEMPR
TRBOPT
USTAR
UUIC(3)
VEL
VEL1
VEL2
VOL
VSET(3)
WL(18)
Type
1*4
R*4
1*4
R*4
BYTE
R*4
R*4
R*4
R*4
R*4
1*2
R*4
BYTE
R*4
R*4
R*4
R*4
R*4
R*4
Definitions
Number of seconds in a year
Solar intensity table for 18 different
wavelengths and the four seasons to be
used to compute a photolysis rate
Simulation length in seconds
River bottom slope
Sand transport method indicator
Distribution coefficients and transfer
rate contaminants for adsorption mechanisms
Amount of sediment being added to each
element due to bed sediment erosion
Bed shear stress value
Ratio of the previous depth to the current
depth
Water temperature
Tributary input control variable
Bed shear velocity
User number from the UIC of the result
file name
Flow velocity
First convective term
Second convective term
Segment flow volume
Settling velocities of sediments
18 different sunlight wavelengths that are
XNT(3)


XYSO
        set into the photolysis submodel

R*4     Bed sediment weight in a bed layer for
        each sediment size fraction

R*4     Thickness of the top bed layer
                                     22

-------
FILE EXPLANATION
     At any given time during  a  simulation,  SERATRA  could  have  as  many as
nine active files.  These  include  the  input  stream data  file, print  file,
temporary  internal files,  error  message  file and  result  files as shown in
Table 1.
    Name
User Supplied

DUMMY.DTI



DUMMY.DT2



HYDROLOGY.TMP


User Supplied

SED.LST

TRIBUTARY.TMP
LUN

 1

 2
 5

 6

 7
TIMSERIES.DAT   8

SERATERR.MSG   10
       TABLE  1.   LIST  OF  FILES

        Type	   	
Formatted, sequential

Unformatted, sequential
           Usage
 3   Unformatted, sequential
Simulation input data file

Output of odd-numbered
segments, input to even-
numbered segments

Output of even-numbered
segments, input to odd-
numbered segments
     Unformatted, sequential   Temporary hydrologic data
                               file
Unformatted, sequential

Formatted, sequential

Unformatted, sequential
Simulation result file

Print file

Temporary tributary data file
Interactive I/O logical unit
     Unformatted, sequential   Time series analysis data

     Formatted, direct access  Input error message file
     The following describes each of these files.

Input Stream File

     This file is prepared by the user prior to the simulation.  The file
contains all input data necessary to run the simulation.  The file  is
opened by Subroutine STRTUP and is read by all of the  input  stream  pro-
cessing modules.

DUMMY.DTI and DUMMY.DT2

     These two files work in tandum to provide input to the  current seg-
ment and to store the simulation results of each time  step.  Both files
are opened in Subroutine STRTUP.  When the initial conditions for
Segment 1 are encountered in the input stream, they are written to
DUMMY.DTI by Subroutine UPSDAT.  As Segment 1 is being simulated, its
                                     23

-------
initial conditions are read from DUMMY.DTI and  after each time  step  its
computed concentrations and outflows are written to DUMMY.DT2.  The
executive routine is responsible for writing the data to DUMMY.DT2 and
Subroutine ICFLO reads the data from the inflow file.

     When simulation of Segment 1 is completed  and Segment  2  is to be
modeled, the two files switch roles.  DUMMY.DT2 becomes the inflow file
and DUMMY.DTI becomes the outflow file.  This alternating pattern is then
repeated for subsequent segments.  DUMMY.DTI is the inflow  file for  odd-
numbered segments and the outflow file for even-numbered segments.
DUMMY.DT2 is the outflow file for the odd segments and the  inflow file for
the even segments.  The variables INFLO and OUTFLO control  this swapping
of reading and writing.

HYDROLOGY.TMP

     This temporary file is used to store the hydrologic data for the  seg-
ment being simulated.  Subroutine STRTUP opens  the file; Subroutine  HYDDAT
writes the data to the file from the input stream; and two  modules read
the data.  SERATRA reads enough of the file to  get the initial  thickness
of the top element and then rewinds the file so that it can be  processed
by Subroutine HYDFLO at the proper times.

Result Files

     Each segment has a separate result file with a name based  upon  the
base file name supplied by the user and the segment number.   SERATRA opens
the file and writes the first record that contains only the segment  num-
ber.  The rest of the data is processed and written to the  files by  Sub-
routine SAVE IT at predetermined time steps.  These are the  files that  are
processed by the post processing program SPPR.TSK.

SEP.1ST

     This is the data file that receives all the data for printout,
including the input stream echo and any error messages.  The  user must
have this file printed.

TRIBUTARY.TMP

     Any tributary data encountered in the  input stream are written  to
this file by Subroutine TRBDAT.  The data are read at each  segment having
a tributary during the simulation by Subroutine TRBFLO.

TIMESERIES.DAT

     The executive routine performs all the processing  of this  file  which
will contain the data needed by the time analysis model FRANCO.  It  is
recommended that the user rename this file  after the simulation to avoid
confusion later.
                                      24

-------
SERATERR.MSG

     This direct access file contains all of the error messages that may
be needed during the processing of the input stream.  The file is used  by
Subroutine RPTERR and is created with Program MSGENT.TSK.
                                     25

-------
                                 SECTION 3

                       DESCRIPTION OF MODEL OPERATION
SERATRA OPERATING INSTRUCTIONS

     These operating instructions assume the operator is familiar with the
RSX-11D operating system and can log onto the system and specify any
nondefault devices or user identification codes.  In the samples below,
the underlined portions are the operator's response.  SERATRA is activated
by using the MCR RUN command.

     NCR RUN SERATRAmode
     After it has been loaded, SERATRA will seek information from the user
concerning file names and simulation parameters.

     ENTER NAME OF INPUT FILE > 3YEAR.CNL

What is needed here is the file descriptor of the input file that has been
prepared by the user as described elsewhere in this report  (SERATRA  Input
Requirements).

     DO YOU WANT THE INPUT FILE ECHOED (Y OR N) > Y_

     As indicated, the proper response to this question is  either a  "Y" or
an "N"   This listing can consume a large number of pages if there is a
large amount of time varying data.  The listing does not go directly to
the printer device but is written to the file "SED.LST" and the user must
have the file printed.

     ENTER BASE FILE NAME > 3YEAR.RLT

     Simulation results are written at preselected time planes  bo files
that are to be used during post-processing with Program SPPR.   Each  river
segment being simulated is assigned a separate file to receive  the results
when the user supplies a portion of the file names (the base file name)
and SERATRA generates the unique portion of the file name (the  river
segment number).  The base file name consists of a 5-digit  name (it  must
have exactly 5 digits) and a 3-digit extension such as "3YEAR.RLT".
SERATRA appends a 4-digit segment number to each file it creates.  For
example, if three segments are being simulated, the files 3YEAR0001.RLT,
3YEAR0002.RLT and 3YEAR0003.RLT would be produced.
                                      26

-------
     WHICH SAND CAPACITY METHOD IS TO BE USED?
     ENTER T (TOFFALETTI) OR C (COLBY) > T

     The user has the option of using either the Toffaletti or Colby
method to compute the capacity of the flow to transport sand.  When the
Colby method is selected, it may fail under certain conditions during the
simulation.  If this happens, SERATRA will switch automatically to the
Toffaletti method, but it will continue to try to use the Colby method
whenever possible.  The Colby method includes effects of water temperature
and fine sediment concentration on sediment transport explicitly and is
best suited to a small river.  The Toffaletti method is applicable to both
large and small rivers.

CONSOLE SWITCHES

     Once each time step SERATRA examines the status of Console Switches 1
and 2 which are used to report simulation status and to terminate the
run.  The simulation status report consists of the line

     SEGMENT #XXX TIME STEP YYYYYYYYYY

This line will be printed at the terminal device that was used to activate
the model as long as Console Switch 1 is on.  XXX is the number of the
segment being simulated and YYYYYYYYYY is the number of the time step
about to be taken.

     Console Switch 2 is used to terminate the simulation at the
operator's discretion.  When the switch is raised the following message
will be displayed.

               ***** SERATRA *****
TERMINATED BY OPERATOR AFTER TIME PLANE #XXXXXXXXXX IN SEGMENT #YYYYY

XXXXXXXXXX is the number of the time plane just completed and YYYYY is the
number of the segment being simulated.

INPUT REQUIREMENTS FOR SERATRA

     The input requirements for SERATRA consist of 18 separate data sets.
Most of them are required and some are optional.  Each data set is
described separately in this section, but the order is implied by the
number of the data set.  In addition to numbers and titles of the data
sets, each description contains a brief explanation of the data, the order
and format of the records and the definition of each field in the
records.  Examples of each data set are also included.  Actual values used
in these examples must be regarded as only for illustration purposes.

     Listed below are the numbers and titles of each data set.  Data
Sets 1, 2, 14 and 17 are read only once during the simulation, and the
remaining sets must be repeated as a group for each river segment being
simulated.
                                    27

-------
Data Set Numbers                            Title
      1             Simulation Identification Title
      2             General  Information Common to All Segments;
      3             Water Columns,  Bed and Sediment Dimensions;
      4             Surface  Area of Each Element
      5             Particle Settling Velocity
      6             Density  of Sediment Particles
      7             Diameter of Sediment Particles
      8             Critical Shear  Stresses for Bed Scouring
      9             Critical Shear  Stresses for Sediment Deposition
     10             Erodibility Coefficients
     11             Vertical Diffusion Coefficients
     12             Adsorption/Desorption Values
     13             Contaminant Degradation and Decay Parameters
     14             Photolysis Coefficients and Tables
     15             Initial  Bed Conditions
     16             Initial  Water Column Conditions
     17             Upstream Inflow Conditions to Segment 1
     18             Tributary Inflow Conditions of Sediment and
                    Contaminants
     19             Hydrologic Data


     The following table shows the  order of each data set of an input file
that would be required to model three river segments:


Sequence Numbers    	Contents	

     1-2            Data Sets 1-2 (Data common to all segments)
     3-13           Data Sets 3-13  (Data for Segment 1)
      14            Data Set 14 (Common to all segments)
    15-19           Data Sets 15-19 (Data for Segment 1)
    20-29           Data Sets 3-13  (Data for Segment 2)
    30-31           Data Sets 15-16 (Data for Segment 2)
    32-33           Data Sets 18-19 (Data for Segment 2)
    34-43           Data Sets 3-13  (Data for Segment 3)
    44-45           Data Sets 15-16 (Data for Segment 3)
    46-47           Data Sets 18-19 (Data for Segment 3)


Data Set No. 1 - Simulation  Identification Title

This data set consists of two records that are used to identify both the
simulation and the data file itself.

FORMAT:  20A4/20A4
                                    28

-------
Example:
  I ' I ' ' ' ' '
                    u,s,i.v,;.
                                      :i .i,-, .l.9/i?. .'. Afl.Y. ,3,*.-, 1.97.8, . , , . ,
Data Set No.  2 - General  Information Common to All Segments

FORMAT:  I10,2I5,L5,3F10.0

Column   Variable    Description

 1-10     NSTEPS     Number  of time  steps to be taken during the simulation
                     (>0).
11-15     NSEG       Number  of river segments to be simulated (00.0).
36-45     ANALMT     Lower limit  of  depth-averaged dissolved concentrations
                     used  for the time series analysis.  This variable sets
                     a  lower  limit above which the results are saved for
                     the time series analysis program, FRANCO.  This result
                     will  only be saved when the dissolved concentration
                     exceeds  this limit.  Care must be taken to assure that
                     this  value is not set too high.   This variable is used
                     only when ANALYS=TRUE.  (kg/m3 or pC/m3)
46-55     DEPMIN     Minimum  depth below which certain calculations will
                     not be  performed.
Ex<
i
imple:
< A > XBX -«C ^X -< X > < G *•
Mill l¥l1C I I iM I I f|C |T|Wl I I II 1 I6|°n 1 1 1 I4 'l^fl6! 1)11 1 /Vl1! 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
12 3 14 5 6 7 3
000 00000
The above example describes that:
     a) 1440 time steps will be taken  for  each  of the
     b) 15 segments; the results will  be saved  every
     c) 60 time steps;
                                        29

-------
     d) the results are to be made available to the time  series  analysis
        program, FRANCO;
     e) 60 seconds is the length of each time step; and data will  be  saved
        for FRANCO when the dissolved concentration exceeds
     f) 4.5E-6 (kg/m3 or pC/m3)
     g) 0.1 meter is the lower limit for depth related calculations

Data Set No. 3 - Water Column, Bed and Segment Dimensions

FORMAT:  2I5,7F10.0

Column   Variable   Description

 1-5      NELEM     Number of vertical water column elements (cells)  in
                    the segment at the beginning of the simulation.   The
                    maximum allowable value of this variable is  set by the
                    PARAMETER MXELEM which is kept in File ELMS1Z.PRM.
 6-10     NEED      Number of bed layers at the beginning of the
                    simulation (0 < NBED <_ 10)
11-20     DELZ      Thickness of all but the top vertical elements  in
                    meters (0 < DELZ)
21-30     BDIV      Thickness of all but the top bed layer in meters  (0.0
                    < BDIV)
31-40     BED       Initial total bed thickness including the top  bed
                    layer in meters (0.0 < Bed < NBED*BOIV).  The
                    thickness of the top bed layer (XYSO) will be
                    calculated by:
                    XYSO = BED <(NBEO-1)*BOIV
41-50     ALEN      Length of the segment in meters.
51-60     ELEV      Bed elevation of the segment measured at its midpoint
                    in meters.
61-70     FOR       Porosity of the bed sediment defined  as the  ratio of
                    the water volume to the total volume.  (POR £  1.0)
71-80     PELEV     Bed elevation upstream of Segment 1 (uppermost
                    segment).  This variable is read only with the data
                    for Segment 1 and is ignored for all  the other
                    segments.  It also tells SERATRA which method  to  use
                    when computing the bed shear stress values.
                    =0.0; bed shear stress computations will be  based upon
                          the velocity, depth and bed sediment size.  This
                          method is applicable for modeling impoundment
                          areas such as reservoirs.
                    7*0.0; bed shear stress computations will be  based
                          upon the properties of free-flowing water (bed
                          slope, hydraulic radius and specific weight of
                          the water) in streams and rivers
Example:
•w— f) 	 M 	 8 	 » 	 C 	 X 	 0 	 » 	 E 	 1 	 F 	 X 	 G 	 M 	 ri 	 •
, , ,3, , , , .«| 	 , ,1,.,3
,11111 ,»i.il
1__L . 1 . L J»l- ,*
, , , ,1,3,M,.,»] , , , , i , ,»,. ,3
, , , , *,1,9,.,3
,11111111
                                     30

-------
The above example  indicates  that:
     a) the segment  initially  contains  5 vertical  elements;
     b) the river  bed  initially  consists of 4 layers;
     c) the standard water column  element thickness is 1.5 meters;
     d) the standard thickness of  the  bed layers of 0.1 meter;
     e) the total  bed  thickness  is 0.4  meter which will leave a top bed
        layer thickness  of 0.1 meter;
     f) the segment's  length is  1500.0  meters;
     g) the porosity of  the  bed  sediment is 0.5 or 50% empty space;
     h) the bed elevation at the segment's midpoint is 219.5 meters (this
        also assigns the method  to compute bed  shear stresses).
Data Set No. 4 - Surface Areas  of  Each  Element

Record 1 - Format I5.2F10.0

Column   Variable   Description
1-5
6-15
         NAREA
         VPAREA
16-25    DELEV


Example:   _
                    Number  of  surface  areas  to be read in Record 2
                    Surface area  to  be  used  in excess  of input data in
                    square  meters
                    Vertical interval  to  be  used  in conjunction with
                    VPAREA  in  meters
                                  1 1 1 1 1 1 1 | 1
                                          1 1 1 I u 1 1 1
                                                        1 1 1 1 1 1 1 1 !
^
Record 2 - Format 8F10.0

Column   Variable   Description

 1-10    AREA(l)    Surface area  of channel  bottom in square meters
11-20    AREA(2)    Surface area  at node  2  in  square  meters
71-80    AREA(8)    Surface area at node 8  in  square  meters
         AREA
         (NAREA)
Example:
                    Surface area at top node  in square meters
         106800. 106900. 1070UO. 1C710C
                    Mill
                                  107200.
                                     31

-------
Supply surface areas AREA (1) through AREA  (NAREA).  Element  numbers  start
from the river bottom.  A value of MXELEM is specified  in  Include
Statement ELMSIZ.RPM.  Although value of MXELEM  is adjustable,,  currently
it is set to be 21.

Example explanation:

     The surface areas of the first 8 elements are:

Element   Area (meters)
   1
   2
   3
   4
   5
   6
   7
   8
    106800.0
    106900.0
    107000.0
    107100.0
    107200.0
    107300.0
    107400.0
    107500.0
                           •V
Record 3 - Format 8F10.0

Column   Variable   Description

 1-10    EL(1)      Elevation  or depth  at  channel  bottom  in  meters
11-20    EL(2)      Elevation  or depth  at  node  2  in meters
71-80    EL(8)
            Elevation or depth at node 8 in meters
         EL(NAREA)  Elevation  or  depth  at  top  node  in  meters
Example:
  -^— A  > <  C
      •A
.0
2.0
3.0     4
.0     5.0
Data Set No.  5  - Particle  Settling  Velocity

FORMAT:  3F10.0

Column   Variable    Description

  1-10      VSET(l)    Settling  velocity of  sand  particles in m/sec;   VSET(l)
                     > 0.0)  .
                                      32

-------
11-20     VSET(2)   Settling velocity of silt particles  in m/sec;  VSET(2)
                    > 0.0) .
21-30     VSET(3)   Settling velocity of clay particles  in m/sec;  VSET(3)
                    > 0.0) .
Example:
                                        4
                                        0
Example explanation:
     a) Settling velocity of sand is 5.82E-3 m/sec.
     b) Settling velocity of silt is 3.87E-4 m/sec.
     c) Settling velocity of clay is 2.93E-5 m/sec.
Data Set No. 6 - Density of Sediment Particles

FORMAT:  3F10.0

Column   Variable   Description

 1-10     DENS(l)   Density of sand particles in kg/m3;  DENS(l)   0.0
11-20     DENS(2)   Density of silt particles in kg/m3;  DENS(2)   0.0
21-30     DENS(3)   Density of clay particles in kg/m3;  DENS(3)   0.0


Example:
                    :.-3i... j..fi£.-a	
;T1
Example explanation:
     a) Density of sand is 2.65E+3 kg/m3.
     b) Density of silt is 2.2E+3 kg/m3.
     c) Density of clay is 1.8E+3 kg/m3.
Data Set No. 7 - Diameter of .Sediment Particles

FORMAT:  4F10.0

Column   Variable   Description

 1-10     DIAM(l)   Diameter of sand particles in meters  DIAM(l)   0.0
11-20     DIAM(2)   Diameter of silt particles in meters  DIAM(2)   0.0
21-30     DIAM(3)   Diameter of clay particles in meters  DIAM(3)   0.0
31-40     D50       Median bed sediment diameter in meters  (D50   0.0).
                                     33

-------
Example:
4 	 n M 	
i i r'l*r'i iri i^ * •
0
— a 	 «— —
A..QCE-S . .
2
0
	 C 	 " 	 C
£_-,Q_Q^-A_L.,U
0
i 	 »
?^-4
4 '
0

1 1 1 1 1 1 1 1 1 1
5
0

., !.,)..,
6
0


7
0


8
0
Example explanation:

     a) Diameter of sand is 1.25E-4 meters.
     b) Diameter of silt is 3.00E-5 meters.
     c) Diameter of clay is 2.00E-6 meters.
     d) Median bed sediment diameter is 1.25E-4 meters
Data Set No. 8 - Critical Shear Stresses for Sediment Scouring

FORMAT:  3F10.0

Column   Variable   Description
 1-10    SCSHR(l)
11-20
21-30
SCSHR(2)
SCSHR(3)
Critical shear stress for scouring sand in kg/m2.
This value will be disregarded in the model.
Critical shear stress for scouring silt in kg/m2.
Critical shear stress for scouring clay in kg/m2.
Example:
     I. .1...QQE.-.5 i.. .7...UE-.3 .. .7.,
                                                       t i 1 till ill I
Example Explanation:
     a) Critical shear stress value for  scouring  sand  is  l.OOE-5  kg/m2.
     b) Critical shear stress value for  scouring  silt  is  7.14E-3  kg/m2
     c) Critical shear stress value for  scouring  clay  is  7.45E-3  kg/m^.
Data Set No. 9 - Critical  Shear  Stresses  for Sediment  Deposition

FORMAT:  3F10.0

Column   Variable    Description

  1-10      DSHR(l)    Critical  shear  stress value  for  depositing sand in
                     kg/m2  [DSHR(l)  <  SCSHR(l)].   This  value will  not be
                     used  in the  model.
11-20      DSHR(2)    Critical  shear  stress value  for  depositing silt in
                     kg/m2  [DSHR(2)  <  SCSHR(2)].
21-30      DSHR(3)    Critical  shear  stress value  for  depositing clay in
                     kg/m2  [DSHR(3)  <  SCSHR(3)].

                                      34

-------
Example:


1 . . .1.-PP.E.-A .
0


,ft-



Jflfc-A , . Z.Rf
2
0
• i»
IE.-.4 .....
0

....!....
4
0

	 i , , ,
0

...... 1 .
6
0

	 i • • I • i i i i i ^
7
0


8
0
Example Explanation:

     a) Critical shear stress value for depositing sand  is  l.OOE-6 kg/m2.
     b) Critical shear stress value for depositing silt  is  5.10E-4 kg/m2.
     c) Critical shear stress value for depositing clay  is  2.04E-4 kg/m2.


Data Set No. 10 - Erodibility Coefficients

Format:  3F10.0

Column   Variable   Description

 1-10    ERODE(l)   Erodibility coefficient of sand in kg/m2-sec
                    [ERODE(l) > 0.0].  This value will be disregarded  in
                    the model.
11-20    ERODE(2)   Erodibility coefficient of silt in kg/m2-sec
                    [ERODE(2) > 0.0].
21-30    ERODE(3)   Erodibility coefficient of clay in kg/m2-sec
                    [ERODE(3) > 0.0].
Example:
     I i i i •JVi /-. . I	'1^1 i i*l . . . .Vi .n i^ . . . i i . . . . I i i . . i . i i . I . . i . . . . i . I i . . . i i . . . I . . . . . . . . . I
             12345678
             OOOOOOQO

Example Explanation:

     a) Sand erodibility coefficient is 1.5E-1 kg/m^-sec.
     b) Silt erodibility coefficient is 1.5E-1 kg/m2-sec.
     c) Clay erodibility coefficient is 1.5E-1 kg/m2-sec.
Data Set No. 11 - Vertical Diffusion Coefficients
Format:
Column
1-10
11-20
21-30
31-40
4F10.0
Variable
DFZ(l)
DFZ(2)
DFZ(3)
DFZ(4)

Description
Vertical diffusion coefficient for sand in m2/sec
Vertical diffusion coefficient for silt in m2/sec
Vertical diffusion coefficient for clay in m2/sec
Vertical diffusion coefficient for dissolved
                    contaminant in m2/sec.

                                     35

-------
Example:
                                  i3,.,»,E|-|4! , , , , , , , , , I , , , , , , , , , I
                                       1        5        S
Example explanation:

     a) Vertical diffusion coefficient  for  sand  is  3.0E-4 m^/sec.
     b) Vertical diffusion coefficient  for  silt  is  3.0E-4 m^/sec.
     c) Vertical diffusion coefficient  for  clay  is  3.0E-4 m2/sec.
     d) Vertical diffusion coefficient  for  dissolved  contaminant is
        3.0E-4 m2/sec.

Note:  OFZ   DELZ * WS
Data Set No. 12 - Adsorption Values  (two  records)

Record No. 1 - FORMAT:  8F10.0

Column   Variable   Description
1-10

11-20

21-30

31-40

41-50

51-60

61-70
71-80
Record
SORBK(l)

SORBK(2)

SORBK(3)

SORBK(4)

SORBK(5)

SORBK(6)

SORBK(7)
SORBK(8)
Distribution coefficient of contaminant associated
with sand in m-Vkg.
Distribution coefficient of contaminant associated
with silt in nrVkg.
Distribution coefficient of contaminant associated
with clay in m^/kg.
Contaminant transfer rate with suspended sand in
sec~l.
Contaminant transfer rate with suspended silt in
sec'l.
Contaminant transfer rate with suspended clay in
sec~l.
Contaminant transfer rate with bed sand in sec"1.
Contaminant transfer rate with bed silt in sec"1.
No. 2 - FORMAT: F10.0
Column    Variable    Description

  1-10     SORBK(9)    Contaminant transfer rate with bed clay in sec"1


Example:
                                                         ,- J5 ft.,ll
                                     36

-------
Example Explanation:
     a) Contaminant
        1.0 m3/kg.
     b) Contaminant
        5.0E+3 m3/kg
     c) Contaminant
        1.5E+4 m3/kg
     d) Contaminant
     e) Contaminant
     f) Contaminant
     g) Contaminant
     h) Contaminant
     i) Contaminant
distribution

distribution
coefficient (Kd) value of sand is

coefficient (Kd) value of silt is
distribution coefficient (Kd) value of clay is

transfer rate with suspended sand is 4.63E-3 sec"l.
transfer rate with suspended silt is 4.63E-3 sec'l.
transfer rate with suspended clay is 4.63E-3 sec~l.
transfer rate with bed sand is 3.1709E-8 sec'j.
transfer rate with bed silt is 3.1709E-8 see"*.
transfer rate with bed clay is 3.1709E-8 sec'*.
Desorption rates are input in the same format following the  adsorption
rates in the previous data record.
Data Set 13 - Contaminant Degradation and Decay Parameters

This data set consists of one or two records depending  upon  the  value
input as DECAY(2).  All of the decay parameters except  DECAY(l)  can  be
summed into this parameter, DECAY(2), and then the  others do not  have to
be input.

Record 1 - FORMAT:  8F10.0

Column   Variable   Description

 1-10    DECAY(l)   Radionuclide decay  (sec"1)-
11-20    DECAY(2)   Total degradation (sec"1).
                    ^0.0; implies that  all of the degradation  parameters
                          (except radionuclide decay) have been  lumped
                          into this rate and that the other  degradation
                          parameters will not be used.  The  second record
                          will not be read.
                    =0.0; implies that  each of the  degradation parameters
                          will be input separately.
21-30    OECAY(6)   Volatilization degradation rate  (sec'1).
31-40    PH         Degree of acidity or alkalinity.
41-50    AKA        Second order acid rate constant  for hydrolysis
                    (sec-*).
51-60    AKB        Second order base rate constant  for hydrolysis
                    (sec-1).
61-70    AKN        Second order rate constant of neutral reaction with
                    water (sec-1).
71-80    AKOX       Second order rate constant of free  radical oxygen for
                    oxidation (M/sec).

Record 2 - FORMAT:  3F10.0; read only if DECAY(2) =  0.0;
                                     37

-------
Column   Variable   Description

 1-10     R02       Concentration of free radical  oxygen  (M).
11-20     AKBIO     Second order rate constant for biodegradation
                    (m3/kg/sec).
21-30     BIOMAS    Biomass per unit volume  (kg/mj).
Example:
                  , J>,-J>
                 1*1- i
JTTTTTTZJ:
 A)  Radionuclide decay is 0 sec~l.
 B)  Total degradation is assigned to be 0.0  implying  each  of  the
     degradation parameters to be followed.
 C)  Degradation rate due to volatilization  is  1.4  x 10"^ sec"-'-.
 D)  pH is 6.0.
 E)  Second order acid rate constant for hydrolysis  is  5000 sec~l.
 F)  Second order base rate constant for hydrolysis  is  50 sec"-'-.
 G)  Second order rate constant of neutral reaction with water is  4.0
     x 10"5 sec"1.
 H)  Second order rate constant of free radical  oxygen  for  oxidation is
     1.4 x 10"5 M/sec.
 I)  Concentration of the radical oxygen is  0.1  M.
 J)  Second order rate constant of free radical  oxygen  for  oxidation is
     0.0014, m3/kg-sec.
 K)  Biomass per unit volume is 0.1 kg/m3.
Data Set 14 - Photolysis Coefficients  and Tables

This data set is used to input  the  information  necessary to compute
chemical degradation due to photolysis.   It  consists  of  a record of
coefficients, a table of adsorption  coefficients  and  a table of solar
intensities.

Record 1 - FORMAT:   I5.3F10.0

Column   Variable    Description

 1-5      JULIAN     Julian starting  date  of  the simulation.  The
                     photolysis  calculations  can be  turned off by inputting
                     this variable  as zero.
 6-15     PHI        The reaction quantum  yield  for  the chemical in
                     air-saturated  pure water.   This is a measure of the
                     efficiency  with  which a  photochemical process converts
                     adsorbed  light into chemical  reaction.

                                      38

-------
 16-25
 26-35
Example:
KAY1      Light extinction coefficient of clear water (m~l)
KAY2      Light extinction coefficient of suspended sediments in
          water (
• n H a » c u D •
-L l'_l?j2| 1 1 I_1_J
_1 I3I« l?J._l_L. 1 1 J-L l?ll.|2| _l_l J L
:_A_- i.3i..i_i : ,
i_: 1 I I l-i I I
1 1 1 1 1 ' 1 1 1 I
f f ' i t : i . ( -j
I 1 , i 1 1 ! j r 1
 A)  Julian starting data  of  the  simulation  is  152  days  (June  1).
 B)  Reaction quantum yield of photolysis  is 0.5.
 C)  Light extinction coefficient  of clear water  is 0.1  1/m.
 D)  Light extinction coefficient  of suspended  sediment  in  water  is
     0.5 1/m.
Records 2-4 - Adsorption Coefficient Table

These three records are the adsorption coefficients table for the
18 wavelengths.  Each value is a measure  of the  chemical's  ability  to
adsorb light of a particular wavelength.  Wavelength  units  are  nano meters,

                    8F10.0
Record
Column
1-10
11-20
21-30
31-40
41-50
51-60
61-70
71-80
Record
Column
1-10
11-20
21-30
31-40
41-50
51-60
61-70
71-80
2 - FORMAT:
Variable
Ed)
E(2)
E(3)
E(4)
E(5)
E(6)
E(7)
E(8)
3 - FORMAT:
Variable
E(9)
E(10)
E(1D
E(12)
E(13)
E(14)
E(15)
E(16)
                    Description
                    Adsorpti
                    Adsorpti
                    Adsorpti
                    Adsorpti
                    Adsorpti
                    Adsorpti
                    Adsorpti
                    Adsorpti

                    8F10.0
                  on
                  on
                  on
                  on
                  on
                  on
                  on
                  on
coefficient
coefficient
coefficient
coefficient
coefficient
coefficient
coefficient
coefficient
for the
for the
for the
for the
for the
for the
for the
for the
wavelength of 300.00
wavelength of 303.75
wavelength of 308.75
wavelength of 313.75
wavelength of 318.75
wavelength of 323.10
wavelength of 346.00
wavelength of 370.00
                    Description

                    Adsorption coefficient
                    Adsorption coefficient
                    Adsorption coefficient
                    Adsorption coefficient
                    Adsorption coefficient
                    Adsorption coefficient
                    Adsorption coefficient
                    Adsorption coefficient
                                 for the
                                 for the
                                 for the
                                 for the
                                 for the
                                 for the
                                 for the
                                 for the
                    wavelength
                    wavelength
                    wavelength
                    wavelength
                    wavelength
                    wavelength
                    wavelength
                    wavelength
                   of 400.00
                   of 430.00
                   of 460.00
                   of 490.00
                   of 536.25
                   of 587.50
                   of 637.50
                   of 687.50
Record 4 - FORMAT:  2F8.0
                                     39

-------
Column   Variable   Description
1-10
11-20
Example:
i
« .1
i 	
E(17)
E(18)

j,,s!

f,.f\ , , 1 ,
Adsorption coefficient for the wavelength
Adsorption coefficient for the wavelength
_B 	 M 	

-J 	 M—

	 C 	 H 	 0 	 »

	 K 	 M L 	 »

< 6 	 M 	 F 	 •

< 	 N 	 H 	 N 	 •





of
of
6 	
1 !«'•
0 	

756
800

,'l,

,si , ,
.00
.00
	 H-

	 P-




P<-,*\

».3\

| I ! f t ( f
^,.,5]
, , ,»,..5I , ,
1 1 1 1 1 1 1 1 1 1 1 ! 1 1 1 1
,,,.,,,, : 1 .,,,,,,:,

' 1 ]
. 1 J 1
i . i
M.I
 A)  Molar absorption coefficient for  the  light  with  the  wavelength of
     300.00 is 0.5 1/M/cm.
 B)  Molar absorption coefficient for  the  light  with  the  wavelength of
     303.75 is 0.5 1/M/cm.
 C)  Molar absorption coefficient for  the  light  with  the  wavelength of
     308.75 is 0.5 1/M/cm.
 D)  Molar absorption coefficient for  the  light  with  the  wavelength of
     313.75 is 0.5 1/M/cm.
 E)  Molar absorption coefficient for  the  light  with  the  wavelength of
     318.75 is 0.5 1/M/cm.
 F)  Molar absorption coefficient for  the  light  with  the  wavelength of
     323.10 is 0.5 1/M/cm.
 G)  Molar absorption coefficient for  the  light  with  the  wavelength of
     346.00 is 0.5 1/M/cm.
 H)  Molar absorption coefficient for  the  light  with  the  wavelength of
     370.00 is 0.5 1/M/cm.
 I)  Molar absorption coefficient for  the  light  with  the  wavelength of
     400.00 is 0.5 1/M/cm.
 J)  Molar absorption coefficient for  the  light  with  the  wavelength of
     430.00 is 0.5 1/M/cm.
 K)  Molar absorption coefficient for  the  light  with  the  wavelength of
     460.00 is 0.5 1/M/cm.
 L)  Molar absorption coefficient for  the  light  with  the  wavelength of
     490.00 is 0.5 1/M/cm.
 M)  Molar absorption coefficient for  the  light  with  the  wavelength of
     536.25 is 0.5 1/M/cm.
 N)  Molar absorption coefficient for  the  light  with  the  wavelength of
     587.50 is 0.5 1/M/cm.
 0)  Molar absorption coefficient for  the  light  with  the  wavelength of
     637.50 is 0.5 1/M/cm.
 P)  Molar absorption coefficient for  the  light  with  the  wavelength of
     687.50  is 0.5  1/M/cm.
 Q)  Molar absorption  coefficient  for  the  light with the wavelength of
     758.00  is 0.5  1/M/cm.
 R)  Molar absorption  coefficient  for  the  light with  the wavelength of
     800.00  is 0.5  1/M/cm.
                                      40

-------
5-7
8-10
11-13
14-16
Spring
Summer
Fall
Winter
Mar. 1-May 31
June 1-Aug. 31
Sept.l-Nov. 30
Dec. 1-Feb. 28
Records 5 to 16 - Solar Intensity Table

This table consists of four sets of 18 wavelength values as shown below:

Record No.    Season    Calendar Dates     Julian Dates

                                            60-151
                                           152-243
                                           244-334
                                           335-365; 1-59

The 18 values correspond to the wavelengths specified in the adsorption
coefficient table (Records 2-4).  The following tables provide suggested
intensity values for 5 different latitudes that should cover most
applications within the United States.  These values are the result of
research conducted by the Stanford Research Institute for the U.S.
Environmental Protection Agency (Smith et al., 1977; Stanford Research
Institute, 1979).


             TABLE 2.  SOLAR INTENSITY VALUES FOR LATITUDE 10 N
Wavelength,
Nanometers
300
303.75
308.75
313.75
318.75
323.1
346
370
400
430
460
490
536.25
587.5
637.5
687.5
756
800
Solar Intensity, einsteins/liter/day
Spring
1.02E-2
1.78E-2
2.85E-2
3.27E-2
4.18E-2
3.70E-2
3.39E-1
4.33E-1
8.40E-1
1.16
1.47
1.50
2.74
2.90
2.90
2.80
2.70
3.00
Summer
4.66E-4
3.16E-3
9.37E-3
1.90E-2
2.91E-2
2.65E-2
3.29E-1
4.38E-1
8.37E-1
1.17
1.47
1.50
2.69
2.79
2.80
2.80
2.70
2.50
Fall
4.19E-4
2.87E-3
8.51E-3
1.73E-3
2.66E-2
2.91E-2
2.99E-1
3.85E-1
7.64E-1
1.07
1.36
1.37
2.46
2.52
2.60
2.60
2.50
2.30
Winter
3.20E-4
2.39E-3
7.26E-3
1.51E-2
2.38E-2
2.36E-2
2.92E-1
3.44E-1
6.96E-1
9.80E-1
1.23
1.27
2.26
2.35
2.43
2.30
2.40
2.10
                                     41

-------
TABLE 3.  SOLAR INTENSITY VALUES FOR LATITUDE 20°N
Wavelength,
Nanometers
300
303.75
308.75
313.75
318.75
323.1
340
370
406
430
460
490
536.25
587.5
637.5
687.5
750
800
Solar Intensity, einsteins/1 Her/day
Spring
3.51E-4
2.51E-3
8.09E-3
1.81E-2
2.82E-2
2.83E-2
3.29E-1
4.24E-1
8.41E-1
1.17
1.47
1.50
2.68
2.80
2.80
2.80
2.76
2.50
Summer
4.44E-4
3.15E-3
9.61E-3
1.97E-2
3.02E-2
3.03E-2
3.47E-1
4.47E-1
8.83E-1
1.23
1.55
1.58
2.81
2.96
2.90
3.00
2.80
2.70
Fall
2.74E-4
2.20E-3
6.89E-3
1.48E-2
2.33E-2
2.33E-2
2.68E-1
3.45E-1
6.96E-1
9.80E-1
1.24
1.26
2.30
2.35
2.42
2.40
2.20
2.26
Winter
1.47E-4
1.47E-3
5.34E-3
1.15E-2
1.88E-2
1.88E-2
2.21E-1
2.86E-1
5.97E-1
8.40E-1
1.06
1.09
1.95
2.03
2.07
2.10
2.36
1.60
                       42

-------
TABLE 4.  SOLAR INTENSITY VALUES FOR LATITUDE 30°N
Wavelength,
Nanometers
300
303.75
308.73
313.75
318.75
323.1
340
370
400
430
460
490
636.25
587.5
637.5
687.5
750
800
Solar Intensity, einsteins/liter/day
Spring
2.30E-4
2.13E-3
7.26E-3
1.65E-2
2.64E-2
2.69E-2
3.20E-1
4.14E-1
8.27E-1
1.15
1.45
1.48
2.64
2.74
2.76
2.80
2.70
2.50
Summer
3.65E-4
2.32E-3
9.02E-3
1.92E-2
3.02E-2
3.04E-2
3.74E-1
4.37E-1
9.07E-1
1.34
1.59
1.62
2.89
3.03
3.00
3.00
2.90
2.80
Fall
1.35E-4
1.44E-3
4.84E-3
1.16E-2
1.89E-2
2.30E-2
2.23E-1
2.84E-1
6.23E-1
8.50E-1
1.09
1.11
2.00
2.07
2.09
2.10
2.10
1.90
Winter
4.10E-5
6.50E-4
2.76E-3
7.55E-3
1.31E-2
1.34E-2
1.70E-1
2.19E-1
4.75E-1
6.69E-1
8.50E-1
8.80E-1
1.57
1.63
1.67
1.73
1.63
1.60
                        43

-------
TABLE 5.  SOLAR INTENSITY VALUES FOR LATITUDE 40°N
Wavelength,
Nanometers
300
303.75
308.75
313.75
318.75
323.1
340
370
400
430
460
490
536.25
587.5
637.5
687.5
750
800
Solar Intensity^ einsteins/liter/day
Spring
1.09E-4
1.37E-3
2.96E-3
7.99E-3
1.38E-2
1.42E-2
1.78E-1
2.30E-1
5.26E-1
6.76E-1
8.90E-1
9.23E-1
1.69
1.73
1.78
1.50
1.70
1.60
Summer
2.49E-4
2.32E-3
7.93E-3
1.81E-2
2.91E-2
2.97E-2
3.54E-1
4.58E-1
9.71E-1
1.28
1.43
1.63
2.92
3.05
3.00
3.10
2.90
2.90
Fall
1.09E-4
1.37E-3
5.35E-3
1.38E-2
2.319E-2
2.39E-2
1.08E-1
3.84E-1
7.91E-1
1.11
1.39
1.42
2.52
2.62
2.60
4.70
2.60
2.50
Winter
5.38E-6
1.56E-4
1.02E-3
3.79E-3
7.53E-3
8.10E-3
7.52E-2
1.47E-1
3.38E-1
4.80E-1
6.10E-1
6.20E-1
1.12
1.16
1.19
1.39
1.20
1.16
                        44

-------
TABLE 6.  SOLAR INTENSITY VALUES FOR LATITUDE 50°N
Wavelength,
Nanometers
300
303.75
308.75
313.75
318.75
323.1
340
370
400
430
460
470
536.25
587.5
637.5
687.5
750
800
Solar Intensity, einsteins/liter/day
Spring
3.71E-5
7.10E-4
3.55E-3
7.30E-3
1.84E-3
1.96E-2
2.66E-1
3.48E-1
7.24E-1
1.02
1.29
1.32
2.34
2.40
2.44
2.50
2.50
2.30
Summer
7.88E-6
1.75E-3
6.53E-3
1.63E-2
2.67E-2
2.77E-2
3.43E-1
4.44E-1
9.04E-1
1.26
1.60
1.63
2.90
3.04
3.00
3.10
2.90
2.90
Fall
1.52E-4
2.25E-4
1.29E-3
4.39E-3
8.64E-3
9.20E-3
1.24E-1
1.66E-1
3.65E-1
5.17E-1
6.60E-1
6.80E-1
1.22
1.25
1.31
1.34
1.31
1.24
Winter
4.00E-7
1.57E-5
1.78E-4
1.20E-3
2.93E-3
3.68E-3
6.29E-2
8.21E-2
1.96E-1
2.75E-1
3.51E-1
3.55E-1
6.30E-1
6.40E-1
6.90E-1
7.10E-1
7.10E-1
6.90E-1
                        45

-------
Records 5
Column
1-10
11-20
21-30
31-40
41-50
51-60
61-70
71-80
Records 6
Column
1-10
11-20
21-30
31-40
41-50
51-60
61-70
71-80
Records 7
Column
1-10
11-20
Example:
2,.,«3f,-,4



, , , , , ,2,-,3,»
, 8, 11,
14 - Format: 8F10.0
Variable
Description
SI(1,I) Solar intensity for wavelength of 300.00 (einsteins
liter"! day"!)
51(2,1)
SKM)
51(4,1)
51(5,1)
51(6,1)
51(7,1)
51(8,1)
, 9, 12,
Variable
51(9,1)
51(10,1)
51(11,1)
51(12,1)
51(13,1)
51(14,1)
51(15,1)
Solar intensity for wavelength of 303.75
Solar intensity for wavelength of 308.75
Solar intensity for wavelength of 313.75
Solar intensity for wavelength of 318.75
Solar intensity for wavelength of 323.10
Solar intensity for wavelength of 346.00
Solar intensity for wavelength of 370.00
15 - Format: 8F10.0

Description
Solar intensity for wavelength of 400.00
Solar intensity for wavelength of 430.00
Solar intensity for wavelength of 460.00
Solar intensity for wavelength of 490.00
Solar intensity for wavelength of 536.25
Solar intensity for wavelength of 587.50
Solar intensity for wavelength of 637.50
51(16,1) Solar intensity for wavelength of 687.50
, 10, 13,
Variable
51(17,1)
51(18,1)
i 	 0 *
, , ,2 ,.,3 ,2 £,-,3
«- J >
, , , , , ,1,.,2,8
• 	 fl 	 >
, , , , , ,2,.,9,a
16 - Format: 2F10.0

Description
Solar intensity for wavelength of 756.00
Solar intensity for wavelength of 800.00
i 	 C 	 M 	 D 	 >
, , ,7,.,3,3,E,-,3 , , ,l,.,8,<.£,-f
< 	 K 	 M 	 L 	 •
1 1 i i i ii I- ,4|3| , i i i ] ,li- ,6|3

L 1 1 1 1 1 -Ll-l 1 1 1 1 1 ' 1 1 1
. 	 E 	 M 	 f 	 » 	 S 	 * 	 H 	 >

, 	 H 	 H 	 M 	 M 	 0 	 »• 	 P 	 >
, , , , , ,2.. ,9,21 , , i , , ,3,. ,3,5 , , i , , iS,.,*!* 	 3,.,l,a|

1,1111,11 • 1 , 1 1 L L 1 1 1 I..1 J i 1 , ' J_ ' J. . 1 	 1_L_J_.J
This is the example of solar intensities during summer for latitude 40°N.

 A)  Solar intensity of the light with the wavelength of 300.00 is 2.49
     x 10~4 einstein/liter/day.
 B)  Solar intensity of the light with the wavelength of 303.75 is 2.32
     x 10~3 einstein/liter/day.
                                     46

-------
 C)  Solar intensity of the light with
     x 10~3 einstein/liter/day.
 D)  Solar intensity of the light with
     x 10~2 einstein/liter/day.
 E)  Solar intensity of the light with
     x 10~2 einstein/liter/day.
 F)  Solar intensity of the light with
     x 10~2 einstein/liter/day.
 G)  Solar intensity of the light with
     x 10"4 einstein/liter/day.
 H)  Solar intensity of the light with
     x 10~1 einstein/liter/day.
 I)  Solar intensity of the light with
     x 10~1 einstein/liter/day.
 J)  Solar intensity of the light with
     einstein/liter/day.
 K)  Solar intensity of the light with
     einstein/liter/day.
 L)  Solar intensity of the light with
     einstein/liter/day.
 M)  Solar intensity of the light with
     ei nstei n/1i ter/day.
 N)  Solar intensity of the light with
     einstein/liter/day.
 0)  Solar intensity of the light with
     einstein/liter/day.
 P)  Solar intensity of the light with
     einstein/liter/day.
 Q)  Solar intensity of the light with
     einstein/liter/day.
 R)  Solar intensity of the light with
     einstein/liter/day.

Data Set 15 - Initial Bed Conditions
the wavelength

the wavelength

the wavelength

the wavelength

the wavelength

the wavelength

the wavelength

the wavelength

the wavelength

the wavelength

the wavelength

the wavelength

the wavelength

the wavelength

the wavelength

the wavelength
of 308.75

of 313.75

of 318.75

of 323.10

of 346.00

of 370.00

of 400.00

of 430.00

of 460.00

of 490.00

of 536.25

of 587.50

of 637.50

of 687.50

of 756.00

of 800.00
is 7.93

is 1.81

is 2.91

is 2.97

is 3.54

is 4.58

is 9.71

is I.IB

is 1.43

is 1.63

is 2.92

is 3.05

is 3.00

is 3.10

is 2.90

is 2.90
A set of initial conditions is read for each of the six parameters using
one of two input methods.  The first method is used when there is no
vertical variation of the parameter.  This is accomplished by inputting
the control variable as a negative number which causes the specified value
to be applied to each of the bed layers.  When there is a vertical
variation, the values for each layer must be specified.  Bed layers are
numbered upward from the bottom (Layer 1) to the bed surface layer (Layer
BED).  In the descriptions below, only the first parameter has been fully
explained because the other five are input the same way.

Parameter 1 - Weight fraction of sand in river bed

Record 1 - Format:  I5.F10.0
                                     47

-------
Column   Variable   	Description	

  1-5     SWITCH      This is the control variable that signals the  input
                      method to be used.
                      <0;    there is no vertical variation and the  weight
                             fraction found in the variable VALUE  is to be
                             applied to each layer
                      _>0;    the weight fraction varies with depth and the
                             data in the record(s) that follow will
                             contain the values to be applied to each bed
                             1ayer.
  6-15    VALUE       The weight fraction of sediment to be assigned to
                      each vertical layer.

NOTE:  The next two records are read only when SWITCH _> 0.  NEED values
       will be read.

Record 2 - Format 8F10.0

Column    Variable   	Description
1-10 B(l
,1) Weight
fraction
of
sand
in
Layer
1 (bottommost
element)
11-20 B(2
21-30 B(3
31-40 B(4
41-50 B(5
51-60 B(6
61-70 B(7
71-80 B(8
,1) Weight
,1) Weight
,1) Weight
,1) Weight
,1) Weight
,1) Weight
,1) Weight
fraction
fraction
fraction
fraction
fraction
fraction
fraction
Record 3 - Format 8F10.0; Read only
Column Vari
1-10 B(9
able
,1) Weight
11-20 B(10,l) Weight
Ixample No. 1
•
if
of
of
of
of
of
of
of
sand
sand
sand
sand
sand
sand
sand
NBED >
in
in
in
in
in
in
in
8
Layer
Layer
Layer
Layer
Layer
Layer
Layer

2
3
4
5
6
7
8

Description
fraction
fraction


of
of

sand
sand

in
in

Layer
Layer

< — r — M 	 B 	 >

	 ••— 	 i
§• > i ) i i i i i i i i i i i i i
1 1 1 1 1 1 • i .
_LJ
1 1
1 1 -L 1 1 L
- ' i
1 1 1 1 1 1
9
10


' ' ' ' | ' ' ' '--' ' ' . -J- i- -'---i ' '- -J— '
         0         i        1         i         a

The above sample  is of a case where there is
 A)  no vertical variation and the value of
 B)  0.18 should be assigned to each bed layer.
                                     48

-------
Example No. 2:
«-»-n »
_| ! 1 4l 1 1 1 1_
4 	 a i
, , , , , *,.,!£

» 	 c 	 >
i LI i i i»njl|7




i i i i i i i i i

i i i_i i i i i i i i i i i i i i i i
, 	 n 	 M 	 6 	 >
, , , , i ,»,-,if
	 «-.!.5
i i i i i i i j i .
• i i i t i i i i j
i i i .1 i i i i i !. i i i i i ' i I
This illustrates the second method when
 A)  The sand fraction varies vertically.  There  are four  vertical  layers
     (NBED=4).  These layers will then be  assigned  the  value  of
 B). 0.18 for Layer 1,
 C)  0.17 for Layer 2,
 D)  0.16 for Layer 3, and
 E)  0.15 for Layer 4.  Note that Record 3 is not (and  should not be)
     included.
The record order and format for the remaining five parameters  are  the  same
as that of the first and they are read in the following  order:
Parameter 2
Parameter 3
Parameter 4
Parameter 5
Parameter 6
Weight fraction of bed silt
Weight fraction of bed clay
Contaminant concentration associated with bed sand
Contaminant concentration associated with bed silt
Contaminant concentration associated with bed clay
The contaminant concentration units depend upon the type of contaminant:

Radionuclide - pC/kg
Pesticide and other toxic chemicals - kg/kg

Data Set 16 - Initial Water Column Conditions

This data set is used to preset the concentrations of sand, silt, clay and
their associated contaminant concentrations at nodal points of each water
column element.  The user has the option of selecting one of two input
methods depending upon the vertical distribution of each of the seven
parameters.  When the parameter does not vary vertically, it is possible
to input only a constant that will be assigned to each element in the
water column.  Otherwise, the value for each element must be input element
by element.  The elements are numbered from the bottom (Element 2) to the
water surface (Element NELEM).  In the description below, only the first
parameter is completely explained because the same form is used for the
remaining six parameters.

Parameter 1  - Concentration of suspended sand (kg/m^)

Record 1 - Format:   I5.F10.0
                                     49

-------
Column    Variable
                                Description
  1-5     SWITCH      This is the control  variable that  signals  the  input
                      method to be used.
                      <0;    there is no vertical variation  and  the
                             constant found  in the variable  VALUE  is  to be
                             applied to each element  in  the  water  column.
                      X);    the parameter varies with depth and the  value
                             for each element will be supplied.
  6-15    VALUE       When SWITCH is less  than zero;  this  is the constant
                      concentration that will be given to  each nodal  point
                      of the elements in the water column.

The concentration record described below must be repeated  enough times  to
provide NELEM+1 values for the total number  (NELEM) of elements.   Of
course, the concentration values are read  only when SWITCHED.

The contaminant concentration units depend upon the type of  contaminant:
     Radionuclide -
                     —
                    Kg
     Pesticide and other toxic chemicals -
Concentration Record - Format 8F10.0
Column    Variable
  1-10

 11-20

 21-30
                                Description
C(N,1)    Concentration of sand at the bottom nodal point  of
          Element N
C(N+1,1)  Concentration of sand at the top nodal point of
          Element N and the bottom nodal point of Element  N+l
 71-80    C(N+7,1)  Concentration of sand  at  the  bottom  nodal  point  of
                    Element N+7  (if Element N+7 exists)  and  the  top  nodal
                    point of Element N+6

Example No. 1:
     .-.t	! .a,.,^..5	
           1
In the above case, there was
 A)  no vertical variation of the parameter  and
 B)  0.25 kg/m3 will be assigned to each  nodal point  of  element  in  the
     water column.
                                      50

-------
Example No.  2:
< — ft— »
, , , ft, 	 ,,,,,, ,,,,,,,,,
j 1
..,,1,1.,
< 	 g 	 M 	 C 	 » 0 	 M 	 E 	 N F 	 M 	 G 	 »
! , , , , j.-wl , , , , , ,a,.,2,4i , , , , , ,a,.,2,2
, , , , , ,I,.,2,<»i , , , , , ,»,.,i,9i , , , , , ,3,. ,1^1 ,,,,,,,,,

Above  Is a sample of:

 A)  Vertical variations  of  the parameter.   The  values  to be assigned to
     each of the water elements are
 B)  0.25 kg/m3 at the bottom  nodal  point  of Element  1  (bottommost
     element),
 C)  0.24 kg/m3 at the top nodal point  of  Element  1 and the  bottom nodal
     point of Element 2
 D)  0.22 kg/m3 at the top nodal point  of  Element  2 and the  bottom nodal
     point of Element 3
 E)  0.20 kg/m3 at the top nodal point  of  Element  3 and the  bottom nodal
     point of Element 4
 F)  0.19 kg/m3 at the top nodal point  of  Element  4 and the  bottom nodal
     point of Element/5 and
 G)  0.19 kg/m3 at the top nodal point  of  Element  5.

The record order and format  described above  are  the same  as  those  for the
remaining six parameters  which are read  in the following  order:
Parameter 2
Parameter 3
Parameter 4
Parameter 5
Parameter 6
Parameter 7
Concentration of silt (kg/m3)
Concentration of clay (kg/m3)
Concentration of contaminant associated with sand
Concentration of contaminant associated with silt
Concentration of contaminant associated with clay
Concentration of dissolved contaminant
The concentration units of Parameters 4, 5 and 6 depend  upon  the  type  of
contaminant:
     Radionuclide - pC/kg
     Pesticide and other toxic chemicals - kg/kg

The dissolved concentration units are correspondingly pC/m3 or  kg/m3.


Data Set 17 - Upstream Inflow Conditions to Segment  1

This data set supplies upstream boundary conditions  of sediment and
contaminant concentrations to Segment 1 (uppermost river segment).  Since
these data can vary with time, it is necessary to supply enough data to
span the duration of the simulation (DELTH*NSTEPS).  The user must
remember that the data are used in the function of a step function.  That
is, the concentrations remain constant until the next is to be  used.
There is no interpolation between data sets.
                                     51

-------
Record 1 - Format:  110, 15, F10.0
Column    Variable
                                Description
  1-10
ENDTIM
 11-15
NM
 16-25
UDEPTH
Ending time for the data set that follows.  This
implies that the starting time for the first data  set
is T = 0 and the starting time of the second data  set
is ENOTIM+DELTH.  A value of -9999 signals the end  of
the upstream inflow conditions (seconds).

Number of vertical water column elements that data
will be provided for.

50;  there is no vertical variation and the constants
found in the variable array CCIN are to be applied  to
each element in the water column

>0;  the parameters in the variable array CCIN vary
with depth and the values for each element will be
supplied

Elevation or Depth upstream of study reach until
T=ENDTIM in meters
Record 2 - Format 7F10.0; NM records will be used.
Column    Variable
  1-10
 11-20
 21-30
 31-40
 41-50


 51-60


 61-70
CCIN(I,2)
CCIN(I,3)
CCIN(I,4)
CCIN(I,5)


CCIN(I,6)


CCIN(I,7)
                                Description
Concentration of sand for Element  I  (kg/m3).
Concentration of silt for Element  I  (kg/m3).
Concentration of clay for Element  I  (kg/m3).
Concentration of contaminant associated with sand  for
Element I  (pesticide and other chemicals  -  kg/kg or
radionuclide - pC/kg).
Concentration of contaminant associated with silt  for
Element I  (pesticide and other chemicals  -  kg/kg or
radionuclide - pC/kg).
Concentration of contaminant associated with clay  for
Element I  (pesticide and other chemicals  -  kg/kg or
radionuclide - pC/kg).
Concentration of dissolved  contaminant  (pesticide  and
other chemicals - kg/m3 or  radionuclide - pC/m3).
                                     52

-------
Exa
mple:
ii in iWfmuiiiii
i?n5iim IIIIMIII
Illllllll

llllllllllllJIIIIII Illllllll.
1 1 1 i > 5
0 II 0 II 0
. - C 	 M 	 0 	 M 	 £ 	 M 	 F 	 •


	 „ P9£
.,,,,,. «£

,.,!,«,,
, , i , , ,. .1,94
	 1,8,1
• 	 J 	 M 	 K 	 >
	 Mf
< . , , , ,- ,2J4
	 ,2,14
i i i
000
, 	 c M - H 	 1
,1,.,»,»,E,-,5J , , ,l,.,W,-,4
, , ,1,. fiff.-f* , , ,!,.,«,»£,- .4
, , ,l,.44f,-^i , , .l^fifZ.-A

, , , , , ,3,6,80 , , , 2 	
	 ,W
, , 	 tfiP


, 	 1. 	 ,
, , , , ,-,9,9,9,9
^.2/tp
,.2#*
ill,,,,,.
' I t I i '• i^i^1'
	 ,23 f

IIIIII'II
. , ,l,.,a,2,E,-,5
, , ,l,.ff£,-P


,,,,,,,,. I 	 , , , , j 	
1 i
)
i 3
3 9
4
a
, , ,1,.,^£,-^
, , ,:..#$£.-?
, , ,1, .?ȣ,-?

, , ,2,.^,»,E,-,4
, , ^,.,0,9^,- ,4
, , f, .fȣr A
1

.,..,,

,1,1,11,1
, , ,1,. ,!«,-,«

1 t 1 ( 1 1 1 1 1
, , .1 ,.*?£,-$

Illllllll
,2,.,»16,E,-,«
, , ,2,.4,5f,-.4
, , , , , , '



, , , , , i . ,),,,,:;,,,
,,,,,, 	 ,,,,,,!
5 S 7 3
1900
Two sets of upstream inflow conditions are shown  in the above  sample.   The
values of the first set will be used from the beginning of the  simulation
until one time step beyond.
 A)

 B)
     3600 seconds at which time the second set will be used.  During  this
     period the water column will consist of
     3 vertical elements.  The values for each of the concentrations  for
     the first (bottommost) element are as follows:
 C)  sand concentration of 0.035 kg/fir
 D)  Silt concentration of 0.180 kg/m^
 E)  clay concentration of 0.200 kg/m3
 F)  particulate contaminant concentration associated with sand to  be
     l.OE-5 kg/kg
 G)  particulate contaminant concentration associated with silt to  be
     l.OE-4 kg/kg
 H)  particulate contaminant concentration associated with clay to  be
     l.OE-3 kg/kg
 I)  dissolved contaminant concentration of 2.0E-4 kg/m3

The second sample indicates that the last set of data is to be used until
the simulated time of

 J)  36,000 seconds.  Of course the length of the simulation may  not
     exceed the 10 hour.  During this period the river segment will have
 K)  two vertical elements.  The data set termination signal is
 L)  -9999.
Record 3 - Format I5.2F10.0

Column    Variable
                                          Description
  1-5
          NWID
  6-15    UWIDTH
 16-25    DEL
Number of upstream widths to be read.   If set to  zero,
the constant width, UWIDTH, will be used.
Width to be used in excess of input data in meters
Vertical interval to be used in conjunction with  UWIDTH
                                     53

-------
Record 4 - Format 8F10.0

Column    Variable   	Description	

  1-10    UWID(l)   Width  of  channel  bottom upstream of study  reach  in
                    meters
 11-20    UWID(2)   Width  at  node  2 upstream of study reach  in meters
 71-80    UWIO(8)   Width  at  node  8 upstream of study reach  in meters



  *

          UWID(NWID)     Width  at  top node upstream of study reach  in  meters

Record 5 - Format 8F10.0

Column    Variable   	Description	

  1-10    VEL(l)    Elevation or depth at channel bottom in meters
 11-20    VEL(2)    Elevation or depth at node 2 in meters





 71-80    VEL(8)    Elevation or depth at node 8 in meters





          VEL(NWID) Elevation or depth at top node in meters

Example:     -,^^_B_^-^c-^

             Inn5	11'i'ii'ii in Ii NI'I 11! il i ujjjj ii Inn null mi inn Ini mini iiii llli J
                                      ' ........
ii " 1 1 1 1 n "i m i n f I
                                 I inn mi
 A)  5 sets  of  widths  and  elevations are to describe the  channel  geometry
     upstream of  the  study reach
 B)  if  the  computations  require information at a depth  larger  than  the
     data provided,  a  27.0 meter width will be used
 C)  the width  in B)  will  be used in elements having a vertical  thickness
     of  1.0  meter
 D)-H)
     upstream widths

                                      54

-------
     elevations associated with the  upstream widths

Data Set 18 - Tributary  Influx Loads of Sediment  and  Contaminants

This data set is used to  input sediment and contaminant  contributions  from
a tributary.  Provisions  are provided for  inputting time  varying  influx
loads and the user must  supply enough data to  span the  length  of  the
simulation  (DELTH*NSTEPS).  During the simulation the concentrations are
supplied as a step function.  The units of contaminant  contributions from
the tributary are kg/sec  for pesticides and other chemicals  and pC/sec for
radionuc lides.'
Record 1 - Format:  215

Column    Variable
Description
  1-5     NTRIBS    Tributary indicator:
                    =0;  No tributary joining  at  this  segment.
                    =1;  there  is a tributary  joining  at this  segment  and
                         its data follow.
  6-10    TRBOPT    Tributary input control variable  (ignored  when
                    NTRIBS = 0).
                    =0;  the user will supply  one  value for  each  sediment
                         and contaminant  load  and  the  model  will
                         distribute it vertically  uniformly.
                    =1;  the user will provide NELEM  (see  Data  Set  3)
                         values for each  sediment  or  contaminant  load  to
                         NELEM  vertical elements.

The following two records make  up a set that is used  only  when  NTRIBS  =
1.  If input data are not time  varying, only one  set  of data  is
necessary.  The only requirement for this steady  input case  is  that  the
ending time be equal to or greater than length of  the  simulation.
Record 2 - Format 110

Column    Variable
Description
  1-10    ENDTIME   Ending time (in seconds) of the data that follow.
                    Influx loads described  in the next record or records
                    will be used until this time is exceeded.  This
                    variable is also used to signal the end of the
                    tributary data.  This is accomplished by inputting
                    ENDTIM as "-9999".

Record 3 - Format 7F10.0

When TRBOPT = 0 only one record is expected and the model will
redistribute the influx load vertically.  If TRBOPT = 1, a record for each
of the NELEM vertical elements must be supplied.
                                     55

-------
Column    Variable
                                     Description
  1-10    CTRB(J.l) Influx load of sand (kg/sec)
 11-20    CTRB(J,2) Influx load of silt (kg/sec)
 21-30    CTRB(G,3) Influx load of clay (kg/sec)
 31-40    CTRB(J,4) Influx load of contaminant associated with  sand
                    (pC/sec or kg/sec)
 41-50    CTRB(J,5) Influx load of contaminant associated with  silt
                    (pC/sec or kg/sec)
 51-60    CTRB(J,6) Influx load of contaminant associated with  clay
                    (pC/sec or kg/sec)
 61-70    CTRB(J,7) Influx load of dissolved contaminant  (pC/sec  or  kg/sec)

Example:
^^^^VL^^.^i,
i D U C -«
U_L ,, ,,_!_., i .,_!_, X J ,.,_
* r it C '
. . I i i I I ; I
< 	 H 	 1
^^, , , ],_,_, .,,_
. 	 I 	 H 	 r 	 1
i . . i • i i , I

                  *. . 3\
T51
                                 IT a E r
2 . a E ~- 6\
                                              i . JE- 3j
                                                             , flE - 7T
                            t I i i i i i i i i i I i ij t j i i ill i i,j _i_ j 11 i i I
                            3        «        S        6
                            t        t        t        I
 A)
 B)

 C)
 D)
 E)
 F)
 G)

 H)

 I)

 0)
 K)
There is a tributary joining at this segment  (NTRIBS  =  1),  and
the user will supply one value for each sediment and  contaminant  load
and the model will distribute it vertically uniformly (TRBOPT = 0).
Use the following tributary data until 3600 seconds.
Influx load of sand from the tributary is 2.0 kg/sec.
Influx load of silt from the tributary is 5.0 kg/sec.
Influx load of clay from the tributary is 4.0 kg/sec.
Influx load of contaminant associated with sand  is  1.0  x  10"'
kg/sec.
Influx load of contaminant associated with silt  is  2.0  x  10"6
kg/sec.
Influx load of contaminant associated with clay  is  1.0  x  10~5
kg/sec.
Influx load of dissolved contaminant is 2.0 x 10~'  kg/sec.
"-9999" signals the end of the tributary data.
Data Set 19 - Hydrologic Data

This data set is used to input discharge, depth  and  water  temperature.
This set is either time varying or not time  varying.   If  it  is  time
varying then as with the other time varying  data types, the  model  treats
these data as a step function.

Format:  110, 4F10.0
                                     56

-------
 Column     Variable
                                Description
   1-10
  11-20
  21-30
  31-40
  41-50

Example
ENDTIM    Ending time of the data in seconds.  This record will
          be used until the simulation passes this time  plane.
          Then the next data set will be used.  This  variable  is
          also used to signal the end of the hydro!09ic  data by
          inputting a value of "-9999".
QI        Total discharge into this segment in m^/sec.
QO        Total discharge out of this segment in m^/sec
DEPTH          Flow depth in meters
TEMPR          Water temperature in centigrade.
« • |> M
— 8 	 « 	
	 ,-i .. • 	 o 	 « 	 E-
_,,,,, JJBJM! , . , , , ,7, »\ . , • , , 7...Z.1



W,I,M 	 1 	 ,

1 1 ' i I 1 i •
    .^ . . . ,-,9,3,9,91
There are two  sets  of  hydrologic  data  in  the  above samples and the data on
the first record will  be used  until  one time  step  beyond.

 A)  3600 seconds.   During  the  time  plane of  3600  seconds  the discharge
     into the  segment  is
 B)  7.00 nvVsec; the  discharge out  of the segment is
 C)  7.21 m^/sec; with an average flow depth  of
 D)  1.37 meters; and  the water temperature is
 E)  20 C.  The second set  of  data will be used from one time step beyond
     3600 seconds until the end of the simulation  which cannot exceed
 F)  7200 seconds.   The values  have  changed slightly from  the first set.
     The discharge  into the segment  increases to
 G)  7.02 m^/sec; the  discharge from the  segments  drops to
 H)  7.19 m^/sec; the  flow  depth  decreases to
 I)  1.33 meters, but  the temperature  remains at
 J)  20 C.  The end  of the  hydrologic  data for  this  segment is signaled by
 K)  -9999.


SERATRA ERROR  MESSAGES

     Several checks  for data correctness  and  consistency and  run time
error are built into SERATRA.   The message

          *****SERATRA — FATAL ERROR*****
          PRINT "SED.LST" FOR DETAILS

will be printed at the terminal device whenever a  detected error prohibits
further input processing or produces meaningless results.   The reason the
simulation is terminated will be  reported  to  the file  "SED.LST".   The two
                                     57

-------
basic groups of errors are input data processing errors and simulation  run
time errors.  Some error messages are listed below.

          DEPOSITION EXCEEDS PERMISSIBLE BED DEPTH IN BEDHST NBED = XXXXX

     The total number of bed layers is limited to 10 in this model and
exceeding the limit will cause this error to be printed by Subroutine
BEDHST.  If the amount of deposition is not unreasonable, the thickness of
the bed layers will have to be increased.

          *****FATAL ERROR — SUBROUTINE COLBY*****

     This message  is immediately followed by another message that
indicates which of the three limitations has been violated.  When this
happens, SERATRA computes the sand carrying capacity using the Toffaletti
method and continues the simulation.  The error is fatal only as far as
Subroutine COLBY is concerned.  The indications and ranges are:

     DOUT      0.10 mm <_ median bed material size <_ 0.80 mm
     ROUT      0.10 ft ^ hydraulic radius < 100.0 ft
     VOUT      1.0 fps <_ average velocity £ 10.0 fps

     Another error message from Subroutine COLBY is

          *****SUBROUTINE COLBY — FLS WENT > 2.E + 5

Since the Colby method has a correction factor accounting for the fine
sediment concentration up to 200,000 ppm, river flows carrying a fine
sediment with more than 200,000 ppm will be out of the application range
of the Colby method.  However, this is not a fatal error and the
simulation will continually use the Colby method.

     The next three run time errors concern the time varying data sets  of
hydrologic data, initial conditions to Segment 1, and tributary data.
They are written to SEO.LST when the elapsed simulation time goes beyond
the time range of  any of these data sets.  However, this should never
happen because prior to simulating the segment, each available data set is
examined and insufficient data should be discovered at that time.  Hence,
any appearance of  one of the following errors means that something is
wrong with the temporary files:

     FATAL ERROR - INITIAL CONDITION DATA TO SEGMENT ONE HAS BEEN
EXHAUSTED.
     FATAL ERROR - HYDROLOGY DATA HAS BEEN EXHAUSTED.
     FATAL ERROR - TRIBUTARY DATA HAS BEEN EXHAUSTED.

Utility Program MSGENT

     SERATRA has a unique method of handling error messages in that each
error is assigned  a number that is a pointer into an error message data
file.  The information for each error consists of the type of error
(warning or fatal), error number and the error message text.

                                     58

-------
     The error message file ("SERATERR.MSG")  is a direct access  file  and
this program is needed to write the error  information  into the file from
the source file ("MSGENT.DAT").  Of course  it needs to be run only when
the source file has been changed or new errors have been added.  The  file
has a capacity of 100 separate errors and  if  this is exceeded, coding
changes to MSGENT.FLX and SERATRA subroutine  will be necessary.

     The format of each error message (it  is  the same  for both the source
and direct access file) is as follows:

Record 1 - Format:  Al, 13, 76A1

Column   Variable   Description
 1
ERRTYP
 2-4     ERRNUM
 5-80    ERRMSG
Type of error message
= W; warning error
= F; fatal error.  Processing discontinues.
Error number
First 76 characters of the error message text,
Record 2 - Format:  80A1
 1-80
ERRMSG
Last 80 columns of the error message text.
SERATRA POST-PROCESSING ROUTINE (SPPR)

     There are two reasons for writing the time plane results  to  a file
rather than just listing them on a printer device:  1) result  files are
more flexible, and 2) long-term simulations can produce an excessively
large printout.  Because of these two main reasons, a file naming
convention has been adopted that allows for a straightforward  post
processing.

     The user supplies the basic file descriptor, which consists  of a
5-digit name and a 3-digit extension (plus any nondefault devices or
UIC's).  SERATRA attaches a 4-digit river segment number to the 5-digit
base name.  For example, DB: 106,5 CALIB0010.RLT would refer to the 10th
river segment of the base result file DB: 106,5 CALIB.RLT.  This
facilitates a chaining operation for postprocessing.  To process  the same
time steps for all the river segments all that has to be specified is the
base file name, and beginning and ending segment numbers.

     SPPR will currently only list the results of the time plane, but it
will eventually be capable of also plotting the results.  The  results that
are reported are as follows:

 1)  River segment number
 2)  Time step number
 3)  Elapsed time
 4)  Datum
 5)  Number of elements
                                     59

-------
 6)  Standard element thickness
 7)  Top element thickness
 8)  Number of bed layers
 9)  Standard bed layer thickness
10)  Top bed layer thickness
11)  Shear stress value
12)  Concentrations of sediment and contaminants in water columns
     a) Element elevations
     b) Sand concentration
     c) Silt concentration
     d) Clay concentration
     e) Dissolved contaminant concentration
     f) Concentration of contaminant with sand
     g) Concentration of contaminant with silt
     h) Concentration of contaminant with clay
     i) Average particulate contaminant concentration per unit weight of
        sediment
     j) Total particulate contaminant concentrations per unit volume of
        water
     k) Total contaminant concentration (sum of particulate and dissolved
        contaminant concentrations) per unit volume of water
13)  Concentrations of sediment and contaminants in the river bed
     a) Bed layer elevation
     b) Sand weight fraction
     c) Silt weight fraction
     d) Clay weight fraction
     e) Concentration of particulate contaminant with sand per unit weight
        of sediment
     f) Concentration of particulate contaminant with silt per unit weight
        of sediment
     g) Concentration of particulate contaminant with clay per unit weight
        of sediment
     h) Average particulate contaminant concentration per unit weight of
        sediment

     When SPPR is activated, it announces itself and then interrogates the
user to learn the parameters of the session such as file name, segment
number, and time plane numbers.  The user's responses are underlined.

          *****SERATRA POST PROCESSING*****
          IS THIS TO BE A CHAINED OPERATION (Y OR N) > Y.

The user must respond with an "N" if the processing is to be restricted to
only one river segment.  The program will ask for the complete name
including the river segment number of the result file to be processed.
Otherwise enter "Y".

     ENTER THE NAME OF THE FILE TO BE PROCESSED > MT1:3YEAR0003.RLT
                                     60

-------
     Responding to the previous question with  an  "Y"  indicates  that  the
processing will be performed on two or more river segments  and  SPPR  will
need to know the base file name, beginning segment, ending  segment and the
interval between segment numbers.

     ENTER BASE FILE NAME '> MT1:3YEAR.RLT
     ENTER BEGINNING SEGMENT NUMBER (14) > 2
     ENTER ENDING SEGMENT NUMBER (14) > 10
     ENTER INTERVAL BETWEEN SEGMENTS  (I4~T> 1

The information above tells SPPR to process the following files:
     1) MT1-.3YEAR0002.RLT
     2) MT1:3YEAR0006.RLT
     3) MT1:3YEAR0010.RLT

     The next set of information specifies which  time planes  will be
processed.

     ENTER BEGINNING TIME PLANE NUMBER (110) > 2
     ENTER ENDING TIME PLANE NUMBER (110) > 6
     ENTER INTERVAL BETWEEN TIME PLANES (I10j> 2
     ENTER TIME STEP SIZE (F10.0) > 0.5

SPPR will interpolate the information above and will process  the  second,
fourth and sixth time step written to the file.   Note that  the  time  plane
numbers being asked for are the sequence numbers  of the  data  in the  file
and not the original time plane number used for the simulation.   If  during
the simulation, every fourth time plane was written to the  result file,
the specifications above would cause time plane numbers  8,  16,  and 24 to
be processed.

     The assigned time step size in hours must be the same  as the
simulation time step or the multiplication of the simulation  time step.

     The final input concerns the units of the contaminant  that was
modeled.

     ENTER THE CONCENTRATION UNITS (PC or KG) > KG

If radionuclides are modeled, the proper response would  be  "PC" and  for
pesticides and other chemicals the user should answer "KG".
                                     61

-------
                                 SECTION 4

                                 REFERENCES
Qnishi, Y., P. A. Johanson, R.  G  Baca and E. L. Hilty.  1976.  Studies of
Columbia River Water Quality -  Development of Mathematical Models for
Sediment and Radionuclide Transport Analysis.  BNWL-B-452, Pacific
Northwest Laboratory, Richland, WA.

Onishi, Y.  1977.  Mathematical Simulation of Sediment and Radionuclide
Transport in the Columbia River.  BNWL-2228, Pacific Northwest Laboratory,
Richland, WA.

Onishi, Y., D. L. Schreiber and R.  B.  Codell.  1979a.   "Mathematical
Simulation of Sediment and Radionuclide Transport in the Clinch River,
Tennessee."  Proceedings of ACS/CSJ Chemical Congress, Honolulu, Hawaii,
April 1-6, 1979.  Contaminants  and Sediments.  R. A. Baker (ed,,),
Ann Arbor Science Publishers, Inc., Ann Arbor, MI.

Onishi, Y., S. M. Brown, A. R.  Olsen,  M.  A.  Parkhurst, S.  E.  Wise and
W. H. Walters.  1979b.  Methodology for Overland and Instream Migration
and Risk Assessment of Pesticides.   Battelle, Pacific  Northwest
Laboratories, Richland, WA.

Onishi, Y. and S. E. Wise.  1979.  Mathematical Model. SERATRA, for
Sediment and Contaminant Transport in  Rivers and its Application to
Pesticide Transport in Four Mile and Wolf Creeks in Iowa.   Battelle,
Pacific Northwest Laboratories, Richland, WA.

Smith, J. H., W. R. Mabey, N. Bohonos, B. R. Holt, S.  S. Lee, T. W. Chou,
0. C. Bomberger, and T. Mill.  1977.  Environmental Pathways  of Selected
Chemicals in Freshwater Systems.  EPA-600/7-77-113.

Stanford Research Institute.  1979.  Fate of Selected  Pollutants --
Protocall II.  Photolysis in Water.  Environmental Protection Agency
Contract Number 68-03-2227.
                                     62

-------
                           APPENDIX  -  SERATRA LISTING
(FLECS  VERSION 22.«6)
i3.MAR.3i   i3ii7»S9  PAGE
0 0 0 1) 1
00002
OOOOJ
nooou
00005
OOPOb
00007
OOOOfl
00009
00010
0001 1
00012
00013
00011
00015
OOOlfc
000 1 7
OOP18
00019
00020
00021
00022
00023
0002"
00025
00026
00027
00028
0002<»
00030
00031
00052
00033
OOQ31
00035
00036
0303"
0 00 3"
00039
o o o a o
000"!
000«2
OOOU 5
0 0 0 t HY VERTICALLY •**
, , 00 (Jal,NHfO) R(J,K) = VALUE
. . . F I N
                                        63

-------
(FLECS VERSION 2?,«6)
                       1J|17i59  PACE  00002
00051
00055
00056
00057
00058
00059
00060
00061
00062
00063
0 0 0 b U
00065
00066
00067
00068
00069
00070
00071
00072
0007J
000 7 '4
00075
00076
00077
000/8
000/9
00080
00061
000«3
OOOSJ
00081
OOOfi?
00086
00087
OOOP8
00089
00090
0009!
00092
0009J
0009U

C









C



















C
1
2
J



u
C

                   fcLSE
                      »*» PARAMtTE" VARIES VERTICALLY  •*•
                   .  RtAlMl,!) CB(J,K),J»»,N8£D)
                   ...FIN
                IF (ECHO)
                ,   WRITU6,3)
                ,   00 (J«t,NBED)
                ...FIN
                                 J, NSITY
                      ELSt CELL(I,J) s CELL(J,J-3)*B(I.J)
                      TBED(J) a THEU(J) + CELL(I.J)
                .  ...FIN
                ...FIN
                OU (J s a,MAXCUN-l)
                ,  TBEO(MAXCON) a TBEO (MAXCON)  *  TBEO(J)
                ...FIN
                RETURN
       (6F10.0)
 FClRMATf I5.FIO.O)
 FOPMATf !HO,5JX, ' INITIAL HED
1   J(3X,'«£IGH!  FRACTIONi ,2X
               2  14X,«IN SAND1 , 1 JX, I IN S 1 L T ' , 1 3 X , ' I N  CLAY'
               i  I2X,'IN SAND' , nx, ' IN SILT ' , i Jx, • IN  CLAY'
                FORMATf2x,I2,i(7x,lPI;12.5r2(RX,lpE12,S)))

                END
                                            CONDI T ION3 ' / 1 HO, I LA YEH « ,
                                                IX, (CONTAMINANT  CONC(I',?X)/
          (FLtCS VERSION 22,
                                         64

-------
(FLECS
                I3-MAR.81   13I18H8  PAGE  00001
  00001
  00002
  00003
  0 0 CM' u
  00005
  00006
  00007
  OOOOfl
  OOOU?
  oooio
  0001 1
  ooou
  0001 J
  OOOM
  00015
  000)6
  00017
  00016
  00019
  00080
  00021
  00022
  00023
  00020
  00025
  00026
  00027
      SUBROUTINE 8EDDMB, rj£CAY> DELTO« NBEO)

    THIS KOUTINt CALCULATES THE DECAY OF THE CONTAMINANTS IN THE
    RIVtR BtO.

      FORMAL PAHAMETERSl
        B      • BEO CONCENTRATIONS
        OtCAY  - DECAY VALUES
        OELTO  - TIME STFP IN DAYS
        NHED   - NUMBER OF BED LAYERS

    CALLED BYJ  TRANgP, SF.RATRA

      INCLUDE 'SY|ELHStZ,P»Mt

      DIMENSION B(MAxLEv,N»xCQN-l), DECAY(6)

      IF(DEC*Y(1) .NE. 0.0)
         00 (JJ*«,6)
         .  •«• RAOIONUCLlOE DECAY **«
         .  DO  (jKsl.NBEO)
            .  B(JK,JJ) r B(JK,JJ)*EXP(-OECAY(1)»OELTD)
         .  ...PIN
         ,,.F1N
       ..FIN
      RtTURU
      END

(FLECS VERSION  22,Ub)
                                         65

-------
(FLECS VERSION ^?,}
I 3.
PAGE  oooot
o o n o i
00002
00003
o o o o (i
00005
00008
00007
00008
00009
OOnio
0001 i
00012
0001 3
0001  BED SEDIMENT *tIGHT FRACTIONS, AND
ASSOCIATED CONCENTRATIONS IN THE HED

FORMAL PARAMETEHS:
B - RED CONDITIONS (WEIGHT FRACTION, PC/KG)
BDJv • ST*NPA«(0 HED LAYER THICKNESS (M)
BED - RED IHICKNESS (M)
BEOSO - TRANSFER OF DISSOLVED 10 ABSORPEO (PC/M2/OAY)
COLO . CELL-CENTERED CONCENTRATION ( I\G/M*« J , PC/M*»3 )
UELTD . T IMt SIEP (DAYS)
OELZ - STANDARD ELEMENT THICKNESS (M)
UENS - OtNSllY (KG/M»»3)
DEPu - DEPOSITION RATE (KG [PC J /MS/DAY )
FEKROR - FATA). ERROR FLAG (L*U
ILAYR . NO. OF LAYERS COMPLETELY SCOURED 8Y EACH RESPECTIVE
SEDIMENT, ILAYR(J)=-1 FOR DEPOSITION
NRED • NUMBER UF 8EO LAYERS
NELE* - NUMBER UF ELEMENTS
POR " POROSITY
SCOUR - SCOUH RATE f KG (PC 1 /^/O » Y )
XNT • WEIGHT OF THE BED SEDIMENT LAYER CKG/M2)
XYSO - THICKNESS OF TOP BED LAYER (M)
ZERO • NORMALIZED TRUNCATION ERROR - SIGNIFICANT DIGITS

CALLED HYI TRANSP

INCLUDE !SY jEL^STZ.PRM i

LOGICAL*! FERROH

DIMENSION ALEFT(J), ARAO(3), 8 ( M AXLE V , M AXCON. 1 ) , 82(6),
1 8£DSD(3), COLD (MX£LEM, MAXcON) , OENS(3), D£PO(6),
2 ILA^R(3), SCOUR(b), SUMSD(3), SUMSOC(3), XNT(3)
DATA ZF.hOXl.OE-8/

FERROR * .FALSE.

INr 1LAY«( 1 )
IP=ILAYH(2>
I 0 = I L A Y * ( 3 )

DO (Us! ,3!
S'JMSOt 1 J)sOEPO( IJ)
, SUMROC ( I J) sDEPU ( l J*- 3 )
. IF (HEDSD(U) ,LT , 0,0 ) SUMSDC ( U ) =-BEDSD ( I J ) f SUMSDC ( I .J )
...FIN
A«AD -- A"OUNT OF CHEMICALS LF.FT IN TOP HED LAYER,
ALEFT -- AMOUNT OF SEDI^ENt LEFT IN TOP b£0 LAYER,
                                            66

-------
(FLECS VERSION 22. 
-------
(FLECS  VERSION 22.46)
                        13.MAM.81    I3ll8j32  PAGE   00003
001 10
00111
00112
                                             ANO ARAQ<2) ARE
     IS
    ,1«
     15
     16
     17
     1 A
     19
001
001
001
001
001
001
00]
00120
00121
00122
00123
0012U
00125
0012*.
00127
00129
00129
001 30
00131
00)32
00133
00|3a
OOIJ5
001 36
001 J7

00139
o o i a o
00141
001 02
001US
0 01 
00)51
00152
00)53
0015U
00155
00156
00157
0015S
00159
001 60
00161
00162
00163
0016«
00165
C     THE 3A"t LAYER ... ALEFTC2),
C     COMPLETELY DETERMINED ,.,                          *
C     OTHERWISE INCLUDE ADDITIONAL LAYERS                *

      IF (1N. G T . 1P)
         1PP » IP fl
         IF (IPP.EQ.O) IPP « 1
         DO (IT*IPP,IN)
         .  NB • N8EO • IT
         ,  X^D * ( 1 tO»pOR)X(B(NB,1)/DENS(!
     1    .        */OENS(3))
         .  OtLXNfaXNO*BOIV*B(NB,2)
         .  ALEFT(2)»ALEFT(2) * DELXNT
         ,  AHAO(2)sARAD(2) t OELXNf»B(NB,'
         ...FIN
       ..FIN
C*««*<»t*««*t**««i*.«««***iit**«***i
c     IF CLAY AND SAND EROSION  (DEPOSITION)  AHE  WITHIN
C     THE SAMt LAYER ... ALEFT(3)  ANO  A«AO(3)  ARE
C     COMPLETELY DETERMINED...,
c     OTHERWISE INCLUDE ADDITIONAL LAYERS

      IF(IN.GT.IQ)
         IQO  s K) f 1
         IF (IOQ.EO.O) 100 a 1
         DO fIT«lQQ,lN)
            NB x HRtO . II
            XNO » (t,0-Pf)R)/nfMG/^\\
                      DtLXNTaXND*B01V*fl(N8,3)
                      ALEFT(J) s ALEFT(3) t DELXNT
                      *KAO(J) » ARAO(3) + OELXNT*H(NB, 5)
                 ..FIN
          Ctttntntinti
C
C
c«
270
ESTABLISH THE
BED ELEMENTS
                            S MATRIX VALUES
                                                  THE NEWLY CREATED  *
                Bl * ALEFKD t ALEFH2) t ALEFT(J)
                XM s (ALfcFT(l)/OENS(l)  * ALEFT(2)/OENS(2)  »  ALEFT(3)X
               1      UENS(3))/(1.0 - POR)
                T« s XM/BUIV
                REMAIN *XH - 1W*HI)1V
                IF (R£MAlN,GT ,ZERO) I* «IW tj
                NBED aNbEU - IN • I
                IF (IN.LT.O) NBEO »NPEO»1
                N8EOI a NBED » I
                NHR02 « N«ED + JW
                00 (IXs|,3)
                .  H2( IK) s  AtEFT (IX)/B1
                .  B?( I*+l)  a 0.0
                   IF(B2(1X) .GT.ZERO) R2(IXt3)  *  A«AO( I X ) / *LEF T ( I X )
                , . . F I N
                OU (IVcNBEDt ,NBED2)
                .  DO (lxsl,b)
                                          68

-------
(FIECS VERSION 2?.(16)
  00166
  00167
  00168
  00169
  001 70
  0017)
  00] 7?
  00173
  OOI7U
  00175
  001 76
  001 77
  00178
  001 79
  00180
  00181
 13-MAK-ai    I3ii8i32  PAGE   ooooa

MX)  »  «2(TX)
      NHEO * NBLU » IW
      XYSO * KF.MAJI4
      IF (REMAIN. |_£f ZERO) XYSO s 8DIV
      BED = CNHtO-l) * riOIV + XYSO
      IF (NBEU .GT-.
      .   HRlTt(6,200)
200   .   FOpM4r(2x,'OEPOSUION EXCEEDS
     1.   5X,
-------
(FLECS VERSION 2?.« ,G(«,«, 1 ) /<>0 , , 22U,
DATA Gf 1,2),G(2, 1 ,2),G<3, 1 ,2) ,f,(
-------
(FUCS  VtRSlOH 22. 06)
I3i20i2o   PAGE   00002
00050
00055
00056
00057
0005*
00059
00060
OOObl
00062
00063
00060
00065
00066
00067
00068
00069
00070
00071
00072
0007}
00070
00075
00076
00077
00078
00079
OOOSO
00081
00082
00093
0 0 0 « 'J
00085
00096
00067
00088
00099
00090
00091
00092 C
00093
0 0 0 9 '4
00095
00096
00097
00098
00099
00100
00101
001 02
00)03 C
00100
001 05
00106
00107
00108 C
00109
OA TA
OATA
OATA
DATA
DATA
DATA
DATA
OATA
OATA
DATA
OATA
OATA
DATA
OATA
OATA
OATA
OATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
OATA
DATA
DATA
DATA
DATA
DATA
DATA
OATA
OATA
DATA
DATA
OATA
OATA
DATA

DATA
D»TA
DATA
DATA
OATA
OATA
DATA
OATA
DATA
OATA

OATA
I
2
3

DATA
Gf
r, c
GC
GC
GC
G(
GC
GC
GC
G (
GC
Gf
G(
Gf
GC
GC
GC
Gf
GC
M
G(
G(
Gf
GC
Gf
Gf
Gf
Gf
Gf
G(
Gf
GC
Gf
G (
Gf
5 (
& (
G(

F (
F (
F(
F (
f (
f (
Ft
FC
F f
F(

T




0*
| ,
1,
1,
1 ,
1,
1,
1,
1 ,
1 ,
\,
1,
1,
I,
J,
1,
1 ,
1,
1,
1,
1,
1,
1,
1,
I,
1,
1,
I,
1,
1,
1,
1,
1,
1,
1,
1 ,
1,
1,
1,

1 ,
1,
1 ,

,
,
,
,
,
,

/I
1
0
0

/
3
u
5
6
7
B
1
2
3
4
5
b
7
a
i
2
3
0
5
b
7
B
1
2
3
o
5
b
7
8
I
2
3
0
5
0
1
8

1
2
3

5
b
7
8
t
I

,
.
.
«

0
, £)
,2)
,2)
,2)
,2)
,2)
,3)
,3)
,3)
/ 3 )
,3)
,3)
,3)
,3)
, " )
o 1
0 1
,0)
, 0 )
, 0 )
, 0 )
, 0 )
,5)
,5)
, 5 )
,5)
,5)
,5)
,5)
,5)
,6)
,6)
,6)
, b)
,6)
,6)
,6)
,6)

) , F

) F


) ,F
) , F
) , F
) , F
I) ) ,

2,
!<=,
90,
55/

, 10
,G(?,
f + - t
,5(2,
,5(2,
,6(2,
,G(2,
,G(2,
,G(2,
,6(2,
,5(2,
,6(2,
,6(2,
,5(2,
,6(2,
,6(2,
,5C2,
,5(2,
,6(2,
,5(2,
,6(2,
,5(2,
,6(2,
,6(2,
,6(2,
,6(2,
,6(2,
,5(2,
,5(2,
,5(2,
,5(2,
,6(2,
,5(2,
,5(2,
, G(2,
,6(2,
,5(2,
,5(2,
,6(2,
,5(2,

(1,2)
(2,2)
(2,3)

(2,5)
(2,6)
(2,7)
(2,9)
(2,9)
FC2, 1

1.15,
0.92
0.72


, 0.2
3
U
5
h
7
8
t
S
3
0
5
6
7
8
1
2
3
'4
5
6
7
8
1
?
3
0
5
6
7
8
1
2
3
0
5
6
7
8


,


f
,
,
,
,
0


f
t


0

9
t
9
f
9
t
t
1
f
1
1
9
9
9
9
t
t
9
,
9
t
f
t
f
9
f
f
r
i
t
9
f
r
f
f
*
9


F
F

F
F
F
F
t
)

1




,
2)
2)
2)
2)
2)
2)
3)
1)
3)
3)
3)
? )
3)
3)
u )
U )
a )
Q )
o )
o )
o )
0 )
5)
5)
5)
5)
5)
5)
5)
5)
M
6)
6)
6)
6)
6)
6 )
6)


C3
r 3

(3
(3
(3
f 3
f 3
, F

.1
0.
o.


0

,G(3,o,2),G(0,0,2)/iO., 18,, 30., 52, /
,GC3,5,2),G(0,5,2)/1 7,, 00., 80,, 160, /
,G(3,6,2),G(0,fe,2)/36,, 95,, 230,, 650, /
,G(3,7,2) ,5(0, 7,2)/60, , 150., 015,, 1200,
,GC3,8,2),G(0,fl,2)/81,, 215,, 620,, 1500,
,GCi, 1,3), G(0, 1 , 3)/0, 10, 0,0, 0.0, O.O/
,G(3,2,3),i;(0,2,3)/l,, O.bO, 0,15, O.I)/
,G(3,3,3),G(0,3, 3J/3.30, 3,00, 1,70, 0,50
,G(3,o,3),G(0,o,3)/H., 15,, 17., 10, /
,G(3,5,3),G(0,5,3)/20., 35,, 09,, 70, /
,G(3,6,3;,r.(0,6,3)/oO,, 85,, 150., 250,/
,G(3,7,3),G(0,7,3)/7I., 105,, 290,, 500. /
,G(3,9,3),G(d,8,3)/100,, 202,, 000., 700,
,G(3,l,U),G(0,|,0)/o,o, 0,0, 0,0, O.O/
,G( 3,2,0),G(0,2,Oj/0,70, 0,30, 0.06, O.O/
,G(3,3,0),G(0,3,i<)/2.9, 2,3, 1,0, 0.06/
,G(3,o,0),G
-------
(FLECS VERSION 22, 46)      13-MAR.81    13l20l2U  PAGE  OOOOJ

               1          30,00,  1.E2/

                DATA CF  /9.00,  l.E«,  5,E«,  1.E5,  1.5E5/

                DATA P X0.60,  0.90,  1,0,  1.0,  0.83,  0,6o,  0,«U,  0,25,  0,15,
               1         0.09,  0,05/

                OATA OP  /0.10,  0,15,  0,20,  0,30,  0,40,  0,50,  0,60,  0,70,
               1          0,80,  0,90,  t.OO/

                DATA DC  /0.10,  1,00.  10,0,  100, /

                DATA Vfin.O,  1,5,  2,0,  J.O,  0,0,  6,0,  8.0,  10. /

                OATA 050G/0.10,  0.20,  0,10,  0,40, 0,60, O.»0/

                DATA TEMP/32,,  «0,,  50,,  70,,  8».f 90,, 100, /
                OB50 * l>50 *  1000,0
                FHRAO a  HHAD  *  3,2BOfl3J
                TMPH m tEMPR  *  1,8 *  32,0
                V 3 (UTOT * ALEN/VOL) * 3.7975E-5
                H s VOL/(HRAI)**UEN)  * 5,280833
                »«* FSL....FINE SEDIMENT  (i.e. COHESIVE SEDIMENT OR WASH) LOAD
                    IN MICRO  GRAMS/LITER  **»
                FSL * 0.0
                00 (iXsl.NELEM)
                ,  FSL * FSL  »  o,s*(C(ix,2)  + cdxti.2) » C(ix,3j » c,dx + i,3))
                ...FIN
                FSL » FSL/NELEM * 1000,0

                IF((OB50 ,LT.  050G(1))  ,OR,  (0*50 .GT, D50G(6)))
                .  FEKRUR a .TRUE,
                ,  WRITt(b,l)
                ,  FOHMAT 1//10X, < ***** FATAL EMROH «> SU8HOUTINE COLBY *****•)
                ,  NRlTt(b,2)
                ,  FORMA! l 10X, I *****    DOUT     *****')
                ...FIN
                IF((FH«AO ,LT,  UG(I)
                .  FEHRUR a ,T«*JE.
                ,  WRlTt(6,l)
                ,  HRITt(b,3)
                ,  FDRMAH ) ox, '»»***
                ...FIN
                IF((V ,UT, VG(D) .OR, (V ,GT,
                .  FERRUH » .TRUE.
                ,  MRITb(b,l)
                .  HHJTEtb.t)  V
                ,  FORMATl 10X, ******
                ...FIN
001 10
OOlt 1
001 12
001 13
001JH
00115
00116
00117
001 IB
001 |9
00120
00121
00122
00123
00120
00125
00116
0012T
00129
00129
OOljO
00131
00132
00133
00130
00135
001 36
00137
0013S
00139
00140
00141
00142
00)43
00140
00145
00146
001 47
001 uft
00149
00150
00151
00153
00)53
00155
00156
00157
00)58
00159
00160
00161
00162
00163
00164
00165

C

C


C


C

C

C

C






C
C





C



1

2





3




4








                      ,  (FHRAO ,GT,
                     HUUT
                             »***«')
                             *****', F I 0 ,5 )
IFCTMPK .LT, 32.0 .OR. TMPR ,GT. 100.0)
,  TMPH s 32,0
1D1 a U
102 « 0
00 (1*1,3)
                      72

-------
(FUCS  VERSION 22.«6)
13-MAR-at    I3l20|24   PACE  00004
00166
00167
00168
00169
00170
00171
00172 114
00173
00174
OOJ75
00176
00177
00178
00179
00180
00)81
00182 1(8
001fl3
00184
00185
00166
00187
00188
00189
00190
00191
00192 122
00193
00194
00195
00196
00197
OOJ9*
00199
00200
00201
00202
00203
00204
00205
00206
00207
0020H
00209 123
00210
00211
00212 12"
0051J
00214 126
00215
00216 1
00217 2
00219
00219 127
00220
00221 128
IF <(FHR*0 ,Gt. 06(1)) ,*NO.  JJ(J)
. . mj) « ALOGtO(VG(JI))
. . 00 (Kzl.2)
. . . Kl » KK(K)
. , , ZZ(M « »LOr.lO(OSUG(KD)
. . , If (G(I1,J1,K1)-0.) 123,123,127
. , . CONTINUE
... DO (J)*J1,7)

.... CONTINUE

. . . CONTINUE
. . . X(J,K) , *L()G10(G(I1.J3,K1))UALOG10(VG(J1 )/VG(J3)))»
• • • (ALOG10(G(Il,J3f 1,K1 )/G(llf J3,K) ) ) ) / ( ALOG1 0 ( VG ( J3* I) /
... VG(J3)))
. . . GO TO 12*
. . . CONTINUE
. . . X(J,K) » »LOGIO(G(H,JI,K1))
. . . CONTlwije
                                        73

-------
(FLECS VERSION 22,«6)
       13-MAH-81    13l20|2«  PAGE  00005
00?22
0022J
0022«
00225
00226
00227
00226
002*9
00?30
00231
002J2
00231
00235
00236
00237
00258
00239
00210
002U1
002'J2
002«3
002«5
002«6
0021?
0 0 ? '> ft
002«9
00250
00251
00252
0025J
00250
00255
00256
00257
0025?
00259
00260
002bl
00262
00263
00?fa7
002b«
00269
00270
00?71
00272
00273
0027«
00275
00276
00277
















C
C
C
C
C










1










C
C
C









                      .   ...FIN
                      ...FIN
   XD >
   XM
   XM2
                           ALOG10(OB50)  - ZZ(l)
                          =  X(l|2)  -
                          '  X(2,2)  -
                           x ZZ(2)  -
                      XA(1)  a x(l,l )
                            a X(2. t)
                            XA(2)  -
 XU, 1)
 X(2,l)
 ZZ(U
 t XN1*XO/XOEN
 * XN2«XO/XOEN
XA( 1)
WHEN (TMPR
ELSE
•
t
•
•
t
f
TM
IT2
DO
.
.
,
a
a
u*
IF
.
,
0
0
1
(
1
I
.EQ.


,6)
(TMPR
Tl a I
T2 a J
60.)



,GE.

»)
   XM2)
   XNH 3
   XOY a YY(2) • YYU )
   XG(1) a XA(l) » XNM*XV/XOY
...FIN
XNM a XG(2) - XG(1)
XO s HOGIO(FHHAD) • XX(1)
XOEN » XX(2) • XX(l)
GTUC » XGU) » *NM*XO/XOEN
GTUC s 10,**GTUC

*** ttTUC IS UNCORRECTED GT IN L8/SEC/FT **»

*** '-EXT APPLY FIME SEDIMENT LQAQ ANg TEMPERATURE COnRECTlONg •**

                     CFT « 1,0
                                        TEMP(I)) .AND, (TMPR ,LE, TEMP(Itl)))
                   .   .   .   GO 10 IJb
                   	FIN
                   .   ...FIN
                   .   CONTINUE
                   .   xTii.n * ALOGIOUUTI»IPI »
                   ,   xr(2,l) a AunGlO(TClT2,IDl))
                   .   xr(l,2J * ALOC,10fT(ITl,IL>2))

                   '.   XNT a ALOG10(TMPH/TEMP(iTl))/ALOGlO(TEMPcIT2)/T£MP(lTl))
                   .   XCT(1) a XT(1,I) t XNT*(XT(2,1) - XT(1,1»
                   .   XC!<2) a XT(I,2) * KNT*(XT(2,2) - XT(I,2))
                   .   CFT a XCUt) + (XCTC2) - XC T ( t ) ) "XU/XOEN
                   .   CFT a 10,**CFT
                   ...FIN

                   *«* FINt SEDIMENT L0*0 COHHF.CTION ***

                   WHEN  (FSL ,Lt. 10.) CFFal.o
                   ELSt
                   .   101 a 0
                   .   IU2 s o
                   ,   DU (131,9)
                   .   .   IF((FHK»0 ,GE. DF(I>) .AND, FHRAO ,LE, OF(IfD)
                   .   .   .   101 * I
                   .   .   .   102 r U|
                         .   GO TO 102
                                           74

-------
(FLECS VERSION 22.46)     1J.MAH-8I   13«aOl2'4  PAGE  OQ006
00278
00279
00280 M?
00?8)
00282
00283 5
00?8«
00285
00286
00287
00288
00289
00290
00291
00292
00293
0029«
00295
00?9b
00297 M8
00298
002V9
00300
00301
0030?
00303
0030«
O'SOS
C. jOb
00307
00308
00309
00310
0031 1
00312
00313
0 0 3 1 t
00315
00316
00317
00318
00319
00320
00321
00322 153
00323
0032"
00325
00326
00327
00328
00329
00330
00331
00332 C
00333 C
fl
•
t
•
•
t
t
t
t
•
t
•
t
t


f

•
•
t
t
*
t
f
t
V
t
•
•
«
t
»
t
•
•
•
t
t
•
•
f
•
t
t
•
•
•
•
•
•
f
f
t
•
•
. . ...FIN
. ...flN
, CONTINUE
. WHEN (FSL ,GT, t.E»5)
, , 1RI TE (t>, 5)
, FORMAT(//IOX, »***•* SUBROUTINE COLBY »• FSL WENT > l.Et5«)
. . in m 9
. . IF2 * 5
, , , ,f IN
, ELSE
. . in s o
. . 1F2 » 0
, . oo d»i ,2 ) )
. XF(2,1) a A|_OG10(F (102, 101 ) )
. XNT t (FSL - CF(IFI))/(CF
-------
(FUCS VERSION £?.'J6)     ij.MAK-fll   t3l20i?«  PARE  00007
  003J5         ...FIN
  OOlib         RE.TUHN
  003J7         ENO

          (FLECS VEUS10N
                                          76

-------
(FLECS  VEHSION  2?,U
                                    Iiil9i2b  PAGE  ooool
  00001
  00002
  00003
  0000<(
  00005
  00006
  00007
  00008
  00009
  00010
  00011
  0001?
  0001 3
  DOOM
  00015
  00016
  0001 7
  00018
  000 1 9
  00020
  00021
  00022
  00023
  0 0 0 2 «
  00025
  00027
  0002P
  00029
  00030
  00031
  00032
  00031
  00031
  00035
  00036
  00037
  0003S
  00039
  00011
  000«2
  00043
  OOOU5
  00016
  000«7
  OOOUB
00050
00051
00052
00053
              SUBROUTINE COLLAP(ALfN,AREA,C,OELZ»El»lELM,K,NELEM,
             1                  CELCr*,TMASS,AwlD,VSET,OFZ,CNOUE,XSAREA)
        c     INTERPRETS INITIAL CONDITIONS
        C         CROSS-SECTION
        C         SEDIMENT CONCENTRATIONS KQ/M3
        C         PARTICIPATE CONCfNTRA 1 IONS PC/KG
        C         OJSbOLVED CONCFNTHATIONS PC/M3
        C     ARRIVES At BOTH
        C         NODAL CONCENTMATIONS
        C         ELFMENf AVERAUE VALUES
        C     NOTE (I,-U£LZ**S/EZ) MUST BE » 0
        C
              REAL MSAfl,MSH8,MSAT,MSBT
        C
              INCLUDE 'SYJELMSIZ.PRMI
        c
              DIMENSION AH£A(MX£LEM),C(MXELEM,MAXCON),IELM(MXtLEM),
                       EL(MXELEM),CELCTH(MX£LEM,MAXCON),TMASS(MAXCON),
                       A«IO(MXELEM), VS£T(3),DFZ('»)f CN()DE(MXELEM,MAXCnN),
                       XSAREA(MXELEM)
              BLENst,/ALEN
              ELTOPsnfcLZ
              wisAREAtI)*BLEN
              Wj*AMtAt2)*f5L£N
              D£L6VeFL(2)-ELU)
              C1«C(1|h)
              CJ»C(2,«)
              NELMHTsJ
              MSAHsDELEV«(CJ*«J/3,
              MSSBsO.
              IFfK .Nh, 7)
                 GIsCO,K»;
                 PM6AB«0£L£V»C,25*(WJ*CJ*GJ»WI*cI*GI.
                              "I*CI
                OU( ;
                 ELTP=£L(NELMTP*l
                 ELBTsEL(N£LMTP)
                   CI«C (NELMTP,K)
                   FACls(eLTOP-ElBT)/(ELTP-EL8T)
                                  ')/(ELTP«tL8T)
                                          77

-------
VERSION
13-MAK«81
I3ii9i26  PAGE
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
OOOfaU
00065
00066
00067
00068
000&9
00070
00071
00072
0007S
0007«
00075
00076
00077
00078
00079
00080
00081
00082
0008J
0008U
00085
00086
00087
00088
00089
00090
0 0 0 9 1
00092
0009}
0009U
0009S
00096
00097
0009H
00099
00100 C
00101 C
00102 C
001 0 J
0010"
00105 C
00106 C
00107 C
00108
00109
, CTUPsCJ*F»Cl+CI*FAC2
, NTOP*'*J»FACItWi*FAC2
. MSAT=(ELTP-EUOP)»CCJ*«J/3.+CJ*WTOP/6.»CTOP»wj/6.
1, »CTOP»vUOP/3.)
, MSBT = !/
. . . 1F(K ,Nt, 7)
. . . . GI=C(J,K»3)
.... GJ = C ( J+ 1 ,K + 3)
. PMASSsPMASS»OELEV»(.25*(Wt *CI*GUWJ*CJ*G
1. . . . CON*(«i*Cj*GJ»'<'J»Cl*GJ + ''J*CJ»6l-»
2, ... wj»ci*GI»rfI »CJ*GI + rfl*CI*GJ) )
	 FIN
	 PIN
. ...FIN
, 1MASSrH)rTMASS(K)»CM4SS*ALE'J
, IF(K .NE, 7) TMAS5 ChLCTHf I,KM>=PMASS/X3AP£A( I )
•
, OEVFLOP NODAL VALUES OF CONCENTH AT I ON
f
. HHtMU .Ef). 1)
. . wHENfK ,LE. 3)
                                   78

-------
(FLECS  VERSION  22.«6)      i3.MAP.fll    13»)9j26  PAGE  OOOU3

  00110   C      ...
  00111   C      ...   NOFEi  CMASS IN KG/M
  00112   C      ...
  00115         ,   .   .   COEFsO.
  00114         ,   .   ,   «S*VSET(K)*AR£AU)/(AWID(1)*AL£N)
  00115         ,   .   .   EZsOFZ(K)
  00116         ,   .   .   CNOOEf1,K)S(2.*CMASS/XSAR£A(1}-COEF*DELZ/EZ)/(2,-n£LZ*wS/EZ)
  00117         ,   .   .   CNOD£(2,K)*2.»CMASS/XSAH£A(I)-CN00E(1,K)
  00)18         ,   .   .   CNOOE( 1 ,K»3) = (2,*PMASS/XSAREA(1)-COEF*OELZ/EZ)/(2,-WS*OELZ/EZ)
  00119         ,   ,   .   CNOOE(2,K*3)»2,*PMASS/X9AREA(I).CNOOE(1,K»3)
  00)20         ,   .   ,..MN
  00121         ,   .   ELSt
  00122         .   .   .   CNOOE(1iK)aCHASS/XS*REA( I)
  00123         ,   ,   .   CNOOEC2,K)«CNOOE(1,K)
  00124         	FIN
  00125         .   ...FIN
  00)26         ,   ELSE
  00)27         .   .   CNOUEf Itl,K)«2.*CMA3S/XSAREA(I)-CNOOE(I,K)
  00|2fl         .   .   IF(>\  ,LE,  3)CNOO£(Ifl,Kt3)a2,*PMAss/XS*REA(J)-CNOOE(I,K*3)
  00)29         .   ...FIN
  00130   C
  00131   C      .   OVERWRITE  BOTTOM  ELEMENTAL NODE  INFORMATION
  00132   C
  00133
  00131
  00)35         ,   EL10PrELTOP»DELZ
  00)36         ,   NELMHT»N£LMTP
  00137         .   IF(K  ,N£,  7)
  0013fl         ,   .   PMS*B»PMSAT
  00139         ,   ,   PMSB8*PMSBT
  oouo         ,   .. .FIN
  0014)         ...FIN
  00142         RETURN
  001«3         END

          (FLECS VEHSION 22.46)
                                          79

-------
(FLECS  VERSION 22,«6)
13,MAR.81    t3l22lO<*  PAGE  OQOuI
00001
oooo?
00003
oooou
00005
00006
00007
OOOU8
00009
00010
0001 I
00012
0001)
OOOIU
00015
00016
00017
00018
00019

C
C
C
C
C
C

C

C








SUPHOUTlNt

THIS SUfoPUU
BY THE KNOW

COMB(M,

TINE MlJL
S, 1, R)

TIPLIES THE UNSYMME.TRIC BAND MATRIX (
LOAD VtCTOR  AND ADOS TH£ RESULT TO ,


CALLED BY TRANSP.

INCLUDE 'iL

DIMENSION S

R ( ) ) rH ( 1 ) tS
H(M)»«(M) t$
DO ( I s2 j M« J )
, Y(1)»S(I
. H ( 1 ) SR ( 1
...FIN
RETURN
END



(MXEIEM,

( 1 r 2 ) *Z (

t

31, Rt^XtLEM), Yt"xELEH), Z(MxELEM)

l)fS(l,3)«Z(2)
(M, 1)*Z(M-1)+S(M,2)*Z(M)

,!)*Z(I-
) > Y ( 1 )




l)tS(I,2)*Z(ntS(I,3)*Z(I + l)




          (FLECS VERSION 22,06)
                                         80

-------
(FLECS  VERSION 22,16)
                                    iyio9i3«  PAGE  ooooi
OOOOI
0000?
00003
00000
00005
00006
00007
00008
00009
oooio
00011
00012
00013
OOOH
00015
00016
00017
00018
00019
00020
00021
00022
00023
0002'J
00025
00026
0002?
0002R
00029
00030
00031
00032
00033
                SUBROUTINE OIAG(ECH02,  ECM03(  ECHO'S  ECH05* ECH06, ECHO/,
               1                ECHQ8,  ECHU9,  ECHOIO,  ISEG, JSEG, SAVECH)
                LOGICAL*!  ECH02,  ECH03,  ECHO'4,  ECH05,  ECH06,  ECHO?, ECH08,
               i          ECH09,  ECHOIO,  SAVECH,  WRTSEG
                DIMENSION  JSEG(5),  SAVECH(IO)
                ECHOJ», FALSE.
                ECH04*. FALSE.
                ECH05*. FALSE.
                ECH06=. FALSE,
                ECH07sSAV£CH(6)
                ECHOES. FALSE.
                ECH09a. FALSE,
                ECHOlOs. FALSE,
                WRTSEGs, FALSE,
                WHEN(JSEG(1 ) .EQ.O)  .iRTSEGs , TRUE ,
                ELSE
                   DO  (J=l,5)
                   ,   IMJSEG(J).EO.ISEG)  WR TSEG* , TRUE,
                   ...FIN
                 ..FIN
                 F(WRISEG)
                   ECH02»SAVECH( 1 )
                   ECHOisSAV£CH(2)
                   £CH()«sSAVECH(3)
                   tCH05agAvECH(U)
                   tCH06sSA\/ECH(5)
                   ECHOB=SAvECH(7)
                   £CH09sSAveCH<8)
                   EChOlO«SAV£CH(9)
                 ..FIN
                RETURN
                END
          (FLECS  VERSION  22,
                                        81

-------
(FLECS  VERSION  22.46)
10-APH.ei
PAGE  oooot
00001
o o o o i
0000 J
oooou
00005
00006
00007
OOOOB
00009
00010
oooi i
0001 2
0001 J
0001 0
0001 5
00016
0001 7
0001 8
000 1 9
00020
00021
00023
0002 J
ooo2«
0000.0)SHtAR STRESS COMPUTED USING HOTTO"
                                         82

-------
(FLECS VFHS10N 22,16)
iji<*oiD2  PAGE  oooo?
0005«
00055
00056
00057
00058
00059
00060
00061
00062
00063
OOOo'l
00065
00066
00067
00068
00069
00070
00071
00072
0007J
0007«
00075
00076
00077
00078
00079
0 0 0 fl 0
00081
00082
0008J
0009«
000«5
00086
00087
OOOflfl
00069
0009Q
00091
00092
0 0 0 9 J
0009(1
00095
00096
00097
ooo9e
00099
001 oo
noioi
0010?
0 0 1 0 i
001 ou
001 05
001 06
001 07
00108
001 09
c
c
c
c








c
C
C










C













C
C
C














SLOP, HYDRAULIC RADIUS AND SPECIFIC
"EIGHT OF KAlER (FREE FLOWING
"I V£R)

WHEN (ISEG ,EU, I )
, READd,!) NELEM,NRED,DLZSAV,B01V, BED, ALEN, tLEV,POR, PELEV
. WHEN (PELEV ,EU, 0,0) HIVER a .FALSE,
, ELSE RIVER e .TRUF.
...FIN
ELSE
, REAndii) NELEM, NBEO,DLZSAV,HOIV, BED, ALEN, ELEV, PUR
...FIN

»«. XYSU .- THICKNESS OF THE TOP BED LAYER

XCSO * BEO - (NBED-1) * BOIy
IF (ECHO)
. WRI TE (6, s ) ISEG
. WRITE(6,2) NELEM,N8ED,DLZSAV,BOIV,8ED, ALEN, ELEV, POR, XYSO
, IF (IStG ,EO, I)
. WRIT£(6,6) PELEV
, . WHEN (PELEV ,IQ, 0,0) W«ITE(6,7)
. ELSE *RI1E(6,8)
, , , ,F I N
...FIN

IF (NELL* ,LT, 0 .DM. NEL£*M ,GT. MX£LEM)
, CALL PUTERR( 1 J,NUME»R,HLDERH)
...FIN
IF (NI^EO ,LE, 0) CALL PUTERR(6,NUMERF»,HLO£RR)
IF (NH£U ,GT, MAXLEV) CALL PU I fcHK ( a , NUMERR , HLDEHP )
IF (OL7SAV ,LE, 0,0) CALL PUTERS ( 7 , NUMERR , HUDERR )
jF (HOjv ,LE, 0,0) CALL PUTERRfP, NUMERR, HLOERR)
IF («£0 ,GT. NBEO«BOIV ,OR, BED ,LE. ( ^BEO- 1 ) *BC> I V )
. CALL PUT£SR(9,NUMEHR,HLDE"R)
...FIN
IF (ALfN ,LE, 0.0) CALL PUTEHWtJOf NUME»H , HLDEHR J
IF (ELEV ,LE. 0,0) C«CL PUTERR< i I,NUMERH,HLPEHR)
IF (POR ,GT, 1,0) CALL PU f ERR ( 1 2, NUMERR , HLDERR )

CARD 2 	 AR£A OF EACH ELE^E^r

00 (Is|,MXELEM)
. AREA( I )sO.O
. EL( I )«0,0
...FIN
RtAD(l,9) NAREA, VPAREA, OELEV
WHEN (f4AREA ,EO. U)
ELt so.
D0( Is) , ^XELEM)
. AkEA ( l JSVPAREA
. EL(I)«FLE
. ELEsELEfOELEV
...FIN
..FIN
ELSE
                                         83

-------
(FLECS VERSION 2?,«ti>
          1U-APH-8I    I3»«0|02  PAGE  00003
00) 0
001 1
00| 2
001 3
OOt U
001 5
001 6
00! 7
001 8
001 9
00120
00121
00122
0012}
0012«
00125
00126
0012?
0012*
00129
OOliO
001 Jl
00132
001 JJ
001 ju
001 iS
001 Sh
00137
00158
001 39
001 «0
00141
00142
00143
001 ID
001 «s
001 Ub
00147













C

C
1
2
1
i
3
a
s
b
7
8
S
4
5
6
7
1
8
1
9
10
C

                   KEAD (1,3)  (AREMJ),  I=l,NARtA)
                   «FAn(l,3)  (ELCJ),  I*l,NAH£A)
                   If  (NAkEA.LT .MXELFM)
                   ,   Ou (I  a  NARCA* I ,MXELEM)
                   .   .  A»tA(I)  « VPAHEA
                   .   .  tUl)  «  EKl-M  » OELEV
                   .   ...FIN
IF (ECHO)
   wR!Tt
   ViP]Tt
...FIN

RETURN
                              fj,  »REAfl),
                FORMAT (IHO.IJX, 15, '...NUMPER OF- VEHTICAL ELEMENTS'/
                  l«x, 15, • ...NUMBER nF RED L*vER8'/
                  7X.1PE12.5,
                  7X.1PE12.5,
                  7X,1PE12.5,
                  7X,lPt'2,5,
                  7x,|PE12.5,
                  7X.1PEU.5,
                  7x, 1PE12.5,
                FURMAT(«FIO,0)
                FORMAT(1H0.5PX,
                .STANDARD ELEMENT THICKNESS (METERS)'/
                .STANPAHD BED L*YEH THICKNESS CMETEHS)'/
                .INITIAL BED THICKNESS (METERS)'/
                .LENGTH OF THE SEGMENT (METE«5)'/
                .SEGMENT ELEVATION (METEPS)i/
                .POROSITY' /
                .THICKNESS OF THE TOP BED LAYER  (CALCULATED)1)
                ELEMENT AREAS'/«(27x,5(I3,lpE12.5)/)>
                INPUT DATA FOH SEGMENT 1,13)
FORMAT(7x,1PE12.5,'.. .UPSTREAM ELEVATION (METERS)')
FORMAT(19",'...SHEAR STRESS VALUES COMPUTED USING METHOD1
   FOR RESERVOIR1 )
FORMAT( 1SX,»,..SHEAR STRESS VALUES COMPUTED USING METHOD'
   FOR FREE FLOWING RIVERS')
FORMATtlS, 7F10.0)
FORMAT(1HO,S8X,'NOOAL ELEVATIONS'/4(27X,5(I3,lPEI2,5)/»

END
          (FLECS V6HSION 22.U6)
                                        84

-------
(FLECS VtHSION 22.46)
10123106  PAfJE  00001
00001
00002
00003
oooo'i
00005
00006
00007
OOOOPI
00009
00010
00011
00012
00013
00011
00015
00016
00017
00019
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00031
0003S
00036
00037
00038
00039
00010
0004J
00042
00043
OU044
OOOU5
00046
00047
00048
00049
00050
00051
00052
00053
SUBROUTINE. OISOLV(ABA«, 8, BU1V, C, COIN, COLO, OECAY, DELZ,




C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C

C
1 DELTO, OEMS, r>IAM, I, KAY1, KAY2,
2 NEtEM» NBEO, PCOEF, POK, WHIN, UHOUT, ^v, SQRBK,
3 SETA, veu, vet.2, HETAI, BETA2,
4 OEPO, SCOUR, HEDSD, XYSO, AREA, 090P3)

THI3 SUHHOiJTINE CALCULATES COEPFICIENT3 OF CCHVECTIVE, DECAY

ALFA,




ANO SOURCE/SINK TER^S OF DISSOLVED POLLUTANT CONVECTION-OIFFUSION
EQUATION

INPUT PARAMtTt»Sl
ABAH - AVERAGE AREA
AREA - VERTICAL PROJECTION AREAS ("2)
B . bEO CONCENTRATIONS
BOIV - STANDARD BED LAYER THICKNESS
C • NilDAL CONCENTRATION
COIN • CONCENTRATION OF INFLOW
COLO - CELL-CENTERED CONCENTRATION
'JECAY - OtCAY VALUES
OELTO - TIME STEP IN DAYS
OEMS • DENSITY
OEPO - DEPOSITION RATE ( KG  /M2/OA Y )
OIAM « PARTICLE OIAMETFRS
OELZ • THICKNESS OF THE ELEMENT
I • ELEMENT INDEX
KAYl . LIGHT EXTINCTION COEFFICIENT OF HATER
KAY2 . LIGHT EXTINCTION COEFFICIENT OF SUSPENDED
SEDIMENT IN WATER
NELE*. . NUMBER OF VERTICAL ELEMENTS





















PCOEF - 1ST TERM OF THE PHOTOLYSIS RATE EUlJATION, COMPUTED
IN SUBROUTINE PHQINP.
POP • POROSITY
dHIN « INFLOW DISCHARGE
UHOUT • OUTFLOW DISCHARGE
UV • VkRTICAL DISCHARGE
3COU» - SCHUR BATE (K6<>»C) /M2/OAY)
SORrtK • AOSOR8TION ON SEOTMENT
OSO«« - DESO^PTION FROM SEOI^ENT
XYSO . TOP HEU LAYER THICKNESS
OUTPUT PAflA"EfERSl
ALFA . DECAY TERM
8EDSO • SCnU« OR OEP03ITION OF AHSORPED CONTAHINANT
(PC/^2/DAY) WHEN NO SCOUR IS TAKING PLACE
BETA • Si'UHCE OR SINK TERM
8ETA1 « INFLUENT SOURCE TERM FOR I-TH NODE
BETAS • INFLUENT SOURCE TE*M FOH i+t TH NODE
VELI - FIRST CUNVECUVE TER"
VEL2 • SECOND CONVCCTIVE TERM

CALLED BY TRAIJSP.

INCLUDE 'ELM3l/,PR'i'
























                                          85

-------
(FLEC3  VERSION  22.46)
10|23»06  PAGE  00002
00050
00055
00056
00057
00058
00059
00060
00061
00062
00063
0006«
00065
00066
00067
00068
00069
00070
00071
00072
00073
0 0 0 7 '1
00075
00076
00077
00078
00079
00080
00081
ooo«2
00083
00084
000«5
00066
00087
00088
00089
00090
00091
00093
00095
0009a
00095
00096
00097
00098
00099
00100
0010J
00102
00103
ooioa
00105
00106
00107
00106
00109

C





C

C
C
C




C






C
C


C
C
C
C
C
C
C
C








C












REAL KAY,KAY1,KAY2

DIMENSION ABAR(MXELE"), B ( H A XLE V, *A XCUN- 1 ) , BE03D(3>,
1 CCIki(MXELEM,MAXCON),COLlJ( 1XELEM,HAXCON), DECAYC6)*
2 OHIN(MXELEM), QHUUT(MXF.LEM), UV***************t**ll******»*****l>k»*l>*»k*******l>***
* *
* wAWNINGi THE VALUE OF C3AR SHOULD HE UPDATED BY ITEHATIYELY *
* SOLVI'iG FOR C AT THE ADVANCED TI«E, AND APPROXIMATING *
* C8*» \S THE NEW AVERAGE CQNCENTHAT ION OVEH THE TIME *
* STEP. *
* *
it*********************************************************************
DO (IE « l,MXeUEH)
DO (1C a 1,MAXCON)









1
2
3

1
2
3

1
2
. CHAH{IE,IC) • CCIN(IE,IC)
...FIN
..FIN
0 (J » 1,3)
JP3 « J + 3
IPl « I + 1

IF(CBAF»(!,J).GT,O.O.ANO.CHAH(IPlfJ).ST.O,0)
AOOS1 a (SURHK(J)*30RHK(JPJ)/12.*(3.*CBAR(I, J)*CBAR(J,7)
*CBAR(I,J)*CHAR(IPl,n»CBAH(IPlfJ:i*CI4Arl(U7) +
CBAR(IPt,J)*CHAR(lP! , 7) ) - SORRK f JP3) X6 . * ( 2, *
CBARU.JP3) + CHAR(IP1,JP3)J)
OSA01 a (DSO«B(J)*nsOHH(JPS)/12,*(3,*CBAPi:i,J)*CHAH(l,7)
»CB»R(I,J)*CHAmiPl»7)+CHAH(IPl,J'J*CBAB(I.7)»
CBAH(IP1,J)*CBAR(IP1.7)) - 030«iHJP3)/6.*(2,*
CHAR(I,JP3) + CBAH(IP1, JP3)))
AODS2 a (SORHK(J)*Sn»BK(JP3)/12,*(C(*AH(I, J}*C8AR(I»7)+
CH*H(I»J)*CU»«(ICl»7)+CaAf»(IPl»J)*CH»H(If7)+
3,*C8AR(IP1, J)*CKAR(IP] ,7) ) - 30PWK(JP3)/6.*
                                         86

-------
(FLECS VERSION 22.<
          2Q.jAN.e2    f«f23l06   PAGE   00003
  00110
  00111
  00112
  00113
  001H
  00115
  00116
  00117
  001 18
  00119
  00120
  00121
  00122
  00123
  00121
  .00125
  00126
  00127
  00128
  00129
  00130
  00131
  00132
  00133
  00131
  00135
  10136
  00137
  00136
  00139
  00110
  001«1
  00142
  00113
  00111
  00115
  001«6
  00117
                     St .liT.O.O.UK.ADDSl.EQ.nSAOl )HETA 1»bETA 1-A0031
            IF(U3A01.LT,0.0)9ETAl»HtU1-OSAD1
            IF(*noS2.GT.O.O.OR,ADI}S2.Eg.OSAD2)RETA2aaETA2-APOS2
            IF(l)SAD2.LT,0.0)dETA2*eETA2-l'SA02
          ..FIN

       ..FIN
C****************************************************************4
c     TRANSFER HETWFE-I DISSOLVED  STREAM  CONTAMINANT  ANN ARSORPEO
c     BED CONTAMINANT is  INCLUDED  WHE^EVEW  NU  SCOURING OCCURS FOR
C     » PARTICULAR 3EPIMEMT  SIZE  (EG  SAMO,  SILT,  "«  CLAY)
C**« **•!
      8ETA a 0,0
      If (I.E'J.l)
         00 (J»l,3)  BEnSO(J) • 0.0
               BEr>SO(J) •
   IFINPED.GT.O)
      00 (J«l,3)
         «HEN(SCOU«(JJ,GT,
         ,  HfD30(J)aO.O
         ...FIN
         ELSE
                                 O.O.OR.H(NMEL), J) .LE.ZERO)
         .  0 • OIAM(J)
         .  IFf!),GT.XYSO) 0«XYSO
         .  RATE a SOReK(Jt6)*(SORHK(J)*fCOAH(l,7)+CB*R(2,7))/2,
         .         -B(NBED,J+3))*  D  *  RHOJ
         .  HETA a bETA . RATE  /DEL?
         .  PEDSO(J)a-RATE
         ...FIN
       ..FIN
    ..FIN
 ..FIN
RETIIHN
  00118
  00149
  00150
  00151
  00152
  00153
  00151
  00155
  00156
  00157
  0015?
  00159
  001*0
  00161
  00162
10 COMPUTE-PHnTOLYSIS-RATE-FOR-ELFHEHT-I
   AVGSEU a o.o
   tiiHEN (i ,E(J. NELE*U
   .   00 (IJI«I,3) AVGSED » AVGSEO  t C(Ifl.IJI)
   ...FIN
   ELSE
   .   00 ClKaI+l,NELE*+l)
   .   .  'JO (tJt«l,3) 4VGSEO « AVRSED  * C(IK,IJI)
   .   ...FIN
   .   AVtSSEO a AVG3EO / (NELE^-f 1-1)
   ...FlN
   KAY • KAYl  + K4Y2 * AVGSEO
   "HEN (I ,£iJ, NEI.FM) TE^"1 a 1.0
   ELSE TERM1  a EXP (-KAY*(MEL£M-I)*OFLZ)
         » (1.0 - EXP(-KAY*OELZ) ) / f*»Y*r>ELZ)
                                           87

-------
(FLECS VEHSION 22.<»6)      2fl-JA*-P2   10»?3:06  P»GE  0000«

  0016S         .   PHOTO
                          CROSS-REFERENCE

          OOIA8 CttMPUTt
                00072


          (FLECS VEWS10N 22,
                                        88

-------
IFLIC3 vEKSION  22,06)
20-MAR-8I
10122125   PAGE   0000!
00001
00002 t
0000) C
00000 C
00005 c (
00006 c r
00007 C
00008
00009 1
00010 C
00011 (
00012 1
0001} C
oooia '
00015
00016 t
00017 I
00018 (
00019
00020 C
00021 I
00022
00023
00020
00025
00026
00027
00028
00029
00030
00031
00032
0003J
00030
00035
0003*
00037
00038
00039
00040
0 0 0 ') 1
oon«2
00003
ooooa
00005
00006
00007
ooooe
oooso
00051
00052
00053
SUBROUTINE EQUPCSCPXSAR, UWIO, UEL, XSAREA, NELEM, MELEM,
RATIO, IELP, HEQXS, FERHOR, DELTA)

THIS SUBROUTINE FINDS CROSS-SECTIONAL AREAS AND HEIGHTS WITHIN THE
JPSTREAM CROSS-SECTION WHICH CORRESPONDS TO THE SEGMENT IMMEDIATELY
DOWNSTREAM,

INCLUDE 'ELMSIZ.PRMi
.OGICALM FERROH

DIMENSION pxsAR(MXELEH), uw ID ( MXELEM >, UELCMXELEM),
XSAREA(MXELtM), IEIP(MXELEM)» H£QXS (MXELEM)

•£RROR», FALSE,
[P«l
'XS3PX5AR ( 1 )
I8TMS(JW1D( 1 )
:LBT*sUtL(l )
'EMpxjso .

)0(I»1, NELEM)
XS*»AUO*XSAHEA( I )
UNTILCXS .(.I. PXS ,OR. IP ,EO. MELEM)
. 1P*1P»I
. TtMPxs»PX3
, U8TM«U«(ID(IP)
. ELUTMsUEL(IP)
. PXS*PxStPXSAR(iP)
t t t F J N
IELP(1)«IP
WHEN(X3 ,EO, PXS)
, HtOXS(I)sUELflPtl)
. IFU.EO. NELEM) HEQXSU)* UELUP) * DELTA
ELPTMruELl 1P+1 )
, UBTM«UWID(IP» 1 )
, PxS«0
, TLMPXSrQ
, , ,F IN
ELSE
t *s(UwiD(lPfl).UBTM)/(2t»fUEL(lPfl)»EL8TM))
. RsUBlM
. C«XS-TEMPX5
, WHEN (A ,tu. 0.) HEUXS< n*C/8tELBTM
. ELSE
. . HSUUiC = 8*Bf a . *A*C
, . IF (8SUOAC ,LT. 0.) GO TO 200
, . MEUXSU )«(SORT (BSUOAC )-B)/2,/A+£L8TM
. ...^IN
. ELFHMsHE'JXSU)
, Pxs=°xs-xs
. TtMPXSsO.
, , ,F JN
                                         89

-------
(FLECS VERSION
  ooosa
  00055
  00056
  00057
  0005?
  00059
  00060
  00061
 200
                                      PAGE
...FIN
Rt TURN
CONT]NU£
FERNOhs,IKUE.
WR11E(b»1)
FORMAT ( 1 OX, 'FATAL ERROR
RETURN
END
                              - 8SD«AC IN EIJUPCS SUbROUTINC IS < 0')
(FLECS  VERSION
                               90

-------
(FLECS VERSION
iji2«i3o  PAGE  ooooi
00001
0000? 1
OOOOi C
0000«
00005 C
00006
00007 1
OOOOP C
00009
0001 0
0001 1
00012
0001}
OOOH C
00015
00016
00017
00018
0001 9
00020
00021
00022
00021
00025
00026
00027
0 0 0 1? fl
00029
00030
00031
OOOJ2
OOOJJ
0005'J
OOOJ5
00036
00037
0003S
00039 F
00040 1
3UBHOUTJNE £QUPXS(PX3AR, PW ID, POELZ , XSARE A , NELEM , M£LE M ,
RATIO, IELP, HEUXS)

INCLUDE ' SY lELMSIZ.PRMi

DIMENSION PxSAP(MxELEM), Pw I D( MxELEM) , xSAR£ A ( MxELEM) ,
IELP(MXELEH) , HE(JXS(MXEL£M)

;Pa I
'XSsPXSAHCl )
,JBT, M = pMD( 1 )
•LBTMio,
TEMPXS«0 .

J0( let ,N£UEM)
XS=KATIO*XSAHEA(I )
UNTUtXS ,LE. PXS .OR, IP .EO, M£LEM)
. IPeJPf 1
, T£MPxgsPXS
, wBTMxpMlO(lP)
, EL8 TMsPDELZ» ( IP-1 )
. P*SSPXS»PXSAR < IP)
lELP(I)«IP
wH£N(xs ,ew, PXS)
. HEQXS(I)aPDELZ • IP
, PXS=0,
, rEMPxsso.
, EL8 fMa (P*PO£L I
, wBiM»PwID{ IP* 1 )
, , ,F IN
ELSE
, HtUXS(I)s(XS.IFMPXS)/W8TM+ELBTM
, Pf 3*PX3-X3
TEMpXSsO,
. Et6TMSHEOX3( I )
...FIN
..FIN
!ETURN
NO
                 VERSION ^^,Ht>)
                                        91

-------
(FLECS VERSION
13!24|
-------
(FLECS  VERSION 22.46)
                                                PMiE
0005«
00055
00056
00057
00058
00059
00060
0006 t
0006?
0006J
0006
-------
(FLECS  VERSION  22.46)      13-MAR-ei    IJ|2'J|«1   PAGE   OOOOi

  00)10    C
  oont    c      •**  iNstwi  NULL  CHARACTER  ***
  00112          FNAM£( ICA«)s()
  0011J          RETURN
  0011«          END

          (FLECS VERSION  22, (16)
                                           94

-------
(FLECS
J.MAR.
PAGE
00001
00002
00003
o o o o a
00005
00006
00007
00008
00009
00010
0001 1
0001?
00013
0001 U
00015
000 \ 6
0001 7
00019
00019
00020
00021
0002?
00023
0002«
00025
00026
00027
0002^
00029
00030
00031
0003?
00033
ooo 51
00035
00036
00037
00039
00039
00040
000«1
0001?
00013
Q 0 Q 4 11
00015
00016
OOOU7
oooan
00019
00050
00051
0005?
00053

C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C


C






C
C
C
C
C
C
C
C
C
C
















SUBROUTINE FDC ODE (F N»ME, 8ASE, NHRTP.F TYPE rDEV, UIC 1, UIC?)

THIS ROUTINE SPEHATES FNAM£ INTO 6 COMPONENTS

RASE - 5 CHARACTER HASE FILE NAME (BYTE ARRAY)
WHRfP . TIM£ PLANE NUH8ER THAT IS THE LAST « CHARACTERS OF THE
9 CHARACTER FILE NAME (INTEGER)
FTYPE . FILE EXIENSION (BrTE ARBAY)
OEV . PHICAL DEVICE SPECIFICATION (BYTE ARRAY)
UIC1 - 1ST UIC
U1C2 • 2ND UIC

THE OPTIONAL PARAMETERS OEV, UtCl, AND ulC2 WILL BE SET
TO BLANKS IF NOT PRESENT IN THE ORIGINAL FILE SPECIFICATION.

CALLED BYl STHTUP

BYTE F NAME (27,, BASE (5) ,FTYPE<3) , OEV (3), UIC 1 (3) ,UIC2(3) ,
1 LHRAK,RBRAK, COMMA, PERIOD, COL ON, BLANK

DATA LBRAH/ i ( t /
DATA RBKAK/ * ] ' '
DATA COMMA/' , >/
DATA PEMUO/','/
DA TA C'JLON/ ' : » /
DATA BLANK,/ i 1 /

*** FILE SPECIFICATION HAVE FOUR POSSIBLE FORMS ***
(1 ) FILENAME. EXT
(2) DEViFILENAMt.EXT
C3> (UIC1,UIC2IFILENAME,£XT
(«) DEvi (UIC1,UIC2)FUENAME. ExT

TMF FORM CAN BE DETERMINED B* COUNTING THE FOUR SPECIAL
CHARACTERS [l.i

Nso
DU ( Ts| ,27)
. SELECT (FNAME(l))
, . (COLON) NsMt)
(LBRAK) NaNH
. . 
-------
(FLECS VERSION
                      mzsiio  PAGE  00002
  OU05«
  00055
  00056
  00057
  OOOS8
  00059   C
   (2) DECOOE-FORM?
   {}) OECODE-FORM3
   (U) UECODE-FORMil
RETURN
  00060
  OOObl
  00062
  0006J   C
TO DECOOE-FORMl
.   DECODE-nUNAME-EXTENSlON
  OOOb"
  00065
  00066
  00067
  00068
TO OPCODE-FORM?
,   DECODE-OEVICE
...FIN
  00069
  00070
  00071
  00072
  0007J
TO DECOUE-FOBH3
.   OFCOUE-UIC
                   EXTENSION
...FIN
  0007a
  00075
  00076
  00077
  00078
  00079   C
TO DECODE-*ORM
-------
(FLECS VERSION 22.06)
                 13.MAR-8i    i3i25tio  PAGE  00003
00095
00096
00097
00098
00099
00100
00101
00102
00103 C
ootou
0010S
00106
00107
00108
00109
001 10
00111 C
00112
00113
001 Id C
001 15
00116 C
00117
001 IS
00119
00120
00121
00122
00123
0012« C
00125
00126
00127
00128
00129
00130
00131
00132 C
001 33
0013«
00135 E
t ]C*R*IC*R*1
, NBRTP»0
...FIN
DO (I«l,3)
, FTrP£(I)«FNAME(ICAR)
IC»R»ICARH
• • .FIN
..FIN

TO OECOUE-OEVICE
1*1
REPEAT *HILE (FN»ME(ICARJ ,NE, COLONJ
, l)EV(I )sFNAM£( 1CAR)
, ICA«*ICAR»1
, I»I » 1
...FIN
»*• SKIP OVER COLON ***
jCAR«ICARfl
..FIN

ro DECOUE-UIC
*** S«IP OVER LEFT BRACKET ***
ICAPBlCAH+l
1 = 1
REPEAT rtHILE (FNAME(ICAR) ,NE. COMMA)
. U1C1 ( l)*FNAME(ICAR)
. 1C AR»ICAR+1
, I * I » 1
...FIN
»** S"«IP OVER COMMA **•
I CAP* iC AR» i
1:1
REPF.AT *HILE (FN»ME(JCARJ ,NE. RBRAK)
, U1C2( I)t'FNAME( 1CAR)
. 1C A&«KAflf 1
. 1*1 t 1
...FIN
«** SKIP OVER RIGHT BRACKET **«
ICARsICARt 1
. , F I N
.NO
      PROCEDUHE

00060 DECOO
      0005J

no<>6« DECClOt-F
                                          TABLE
                                        97

-------
(FLECS VERSION 22,16)      13.MAN.81    I3I25HO  PAGE  00001

                0005«

          00115 OECODE-UIC
                00070   00076

          OOOfjP DECODE-FOKM3
                00055

          0007« PECOOi
                00056

          00080 OECOOE-f
                00061   00066  00071   00077

          OOlOU OECOOE-UEVICE
                00065   00075


          (FLECS VERSION  25.«6)
                                         98

-------
(FLECS VEKSJON
13132:1,?  PAG£  OOOUl
00001
ooon?
0 0 0 0 J
ooooo
00005
00006
000(17
00008
00009
00010
0001 1
00012
0001 3
00014
00015
00016
0001 7
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00050
00031
00032
00033
00031
00035
00036
00037
0003B
00039
oooao
000
-------
(FLECS  VERSION 22,
                .   .   .   tNDTIM«(ENDTIM/IOELTH*l)*IOELTH
                	FIN
                   If  (fcNOTIM .NE.  -9999) PflEUM *
                   UNLESS (ENOTIM ,EO.  -9999}
                              DEPTH FLAG TO DIVERT FROM FURTHER CALCULATION
               I.
                      VUL«0.
                      VtL'O.
                      D0( 1»1
.   AHAR(I)sO.
.   l£LM(I)aO.
,   XSAREA(I)»0,
...FIN
IF  (OEPTH ,GT,  OEPMIN)

',   *«* COMPUTE!  NELEM,,..NUMBEH OF ELEMENTS CONTAINED WITHIN DEPTH
                ABAR(I),.AVERAGE AREA OF ELEMENTS I AND 1+1
.                AWID(I ) ..WIDTH OF F.LEMENT
,                VOL	TOTAL VOLUME OF TH£ SEGMENT
.   VUL=0.
.   NELEMrDEPTH/DLZSAV
.   uELZ«OEPTH/NEL£M
.   WHEN(NELEM  ,LE.  I  .OR.  NELEM+1 ,GT. MXELEM)
   .   CALL  PUTERR U«,  NUMERR, HLDEHR)
   .   WRIIE(6,6)
.   ...FIN
.   fcLSE
   ,   CALL  TRNPOStABAR,AREA,AWID.ALEN,8WIO,OELZ,EL»IELM,
.   ,   XSAPEA,VOL)
   .   CALL  RADIUS (ALEN,  AREA, C»OSEC, DEPTH, EL, HRAO)
.   ...FIN

*   IT IS IMPLICITLY ASSUMED THAT A DOWNSTREAM COURANT
.   NUMBER AT OR NEAR  UNITY HAS BEEN EMPLOYED IN THIS
,   ANALYSIS

           t «o)/2. * ALEN/VOL

            TIH,NEL£MrOELZ,oI,gC
            DEPTH,H*ID,AHAR,  HRAO, CHuSEC
                      ...FIN
                      WHl 1E(«
                      X5AHEA,
                      IF (ECHO)
                         ««IT£(6,2) ENOTIM.NELEM,TEMPH.yI,QO,DEPTH


                      ',  00 (|sl,NEL£M)
                      .  ,  WRnE(6,y)I,A«IO(I),ABAH(I),AKEA{I),EL(I)
                      .  ...FIN
                                           100

-------
CFLECS  VERSION  2?.«6)
                18-MAH-81   13U2I12  PAGE  00003
  00110
  001 1 I
  00112
  001 13
  001M
  001 IS
  00116
  00117
  001 IS
  00119
  00120
  00121
  00122
  00185
  0012"
  00125
  00126
  00127
  0012ft
  00129
  00130
  00131
  00132
	FIN
.   ...FIN
...FIN
IF (PREIIM .LT,
REMIND «

RETURN
                              CALL PUTERH<25. NUM£RR, HLDERH)
      FURMATJ MO,IF 10,0)
      FORMAT!!Ho,5eX,'HYDROLOGY DATA'/
        9x,no, '...DATA su ENDING
        MX,15, ' ...NUMBER OF ELEMENTS WITHIN THE FLOW DEPTH'/
        7x,IPf12.5,'...WATER TEMPERATURE'/
        7X,1PE12.5,'...TOTAL DISCHAHGE OF THIS SEGMENT'/
        7x,lP£12.5,'...TOTAL DISCHARGE OUT OF THIS SEGMENT1/
        7x,lPE12,5,!,,,FLOW OEPTHi)
 3    FORMAT(I HO,'ELEMENT',«*,'SEGMENT',1«X,'AVERAGE'/12X,'NODE VP-AR£A' ,
     1   I1X,'NOUE  ELEV'/IX,'NUMBER',6X,iWIOTHl,12X,'ELEMENT AREA')
 a    F(jRMAr(3x, !2,'(X,lPEl?,5,l?X,lPei2,5,10x,lPE12.5,10x,lPEI2.«)
 6    FORMAT(//50x,'DEPTH TOO GREAT FOR  THE MAXIMUM NUMBER OF'
     1               '  ELEMENTS'//)
C
      END

(FLECS  VERSION 22,16)
                                        101

-------
(FLECS  VERSION  22.U6)
28-MAK.Hl    03127108  PAGE  OOOOt
00001
0000?
00003
ooooa
00005
00006
00007
0 0 0 0 B
00009
00010
0001 t
00012
00015
OOOt <4
00015
00016
00017
00018
00019
00020
00021
00022
0002i
0 0 0 2 U
00025
00026
00027
0002B
00029
OOOJO
00031
OOOJ2
00033
00030
00035
00 Oib
00037
0003K
00039
oooon
0 0 0 1 1
000^2
OOnu j
0001411
000(45
00050,
1 ELFV, ENOHYO, ETIME, FERROH, HRAD, Nfc'LEM,
2 NF.WUI, PELEV, QHIN, QHOUT, ov, HTVEH. SLOPE,
3 STRESS, TE*PH, VEL, VOL, OEPMlN,
1 XSAREA, Hwlf), ABAR, 01, CROSEC)

THIS suppouriNE rs CALLED EACH TIME STEP TO READ ANY NEW HYDROLOGY
DATA THAT WAS WRITTEN TO LUN « a* SUBROUTINE HYDDAT,

FORMAI PAKAMflEHS:
ALEN - LENGTH OF TH£ SEGMENT
A)7fcA - AREA OF fcACH ELEMENT
AW10 - tLErt£NT wJOTHS
"ELZ - STANOAHO FLEw£NT THICKNESS
DEP1H • FLOW DEPTH
DSO - MEDIAN BCD SEDIMENT DIAMETER CMETER)
ELEV • SEGMENT ELEVATION
ENOHYD - ENDING TIME OF THE CURRENT HYDROLOGY DATA u*«)
ETIME - ELAPSED TIME OF THE SIMULATION (IM)
FERHOR • FATAL ERROR FLAG CL*I)
HHAD • HYDHAUuIC RADIUS
NELEM - MUMSER OF ELEMENTS
NE^QT - N£« 01 DATA FLAG 
-------
(FLECS VFHSJON 22,«6)

  0005U         F£RHl)R
  00055
  OOOS6
  00057
  00058
  00059
  00060        1
  OOObt
  00062
  00063
  00060
  00065
  00066
  00067
  00068
  00069
  00070
  00071        1
  00072
  00073        1
  0007«   C
  00075
  00076
  00077
  00078
  00079   C
  00080   C
  00081
  00082
  00083
  0008«
  00065
  00086
  OOOfl?
  0008B   C
  0008"?    200
  00090
  00091
  00092   1
  00093
  ooo9a   3oo
  00095
  00096
  00097
  0009B   3
  00099   2
  00100
  00101   C
  00102
 28.MAH-SI

.FALSE.
                            03l27»0fl  PAGE   00002
      IF (ETI*E ,GT, ENOHYO)
         NEWQJ a .THUE,
         REPEAT UNTIL  (ETIME ,LE, ENDHYD)
                            ENDHYO,NELEM,DELZ,QI,UOrV(JL,VEL»i
           IF (DEPTH ,GE. DEPMIN)
            *H£N (RIVER)
            .  C*LL SHEARSfALEN,ELEV,HHAD,PElEV,SLOPE,STRESS,USTAR)

            F.LSt.
            .  CALL SH£ARH(DgPTH,050,STRESS,U3TAR,VEL)
                            ' (RHO*HRAD)
         ,   CALL PROFIL(ALF.N, AWID, DELZ,   DEPTH,  NELEM,  QI,  UST*RI
         ,               VULf QHlN,DUMMY,o,OELZ)
         .   CALL PROFIL(*LEN, AWID, DELZ,   DEPTH,  NELEM,  00,  USfAR,
         ,               VOL, OHOUT,DUMMY,0,OEuZ)
         .   «** CONVERT UNITS TU M**3/OAY  **•
         .   DO (Js1,NtLEM)
               QHIN(J) « (JHIN(J) * SECDAY
         .   .  UHOUl(J) e QHQUT(J) » SECDAY
         .   ...FIN

         [   *.* COMPUTE VERTICAL FLOWS ***
         ,   (3V ( 1) «  0.0
         ,   00 (J*l,NELEM)
            .  OV(JtJ) a UHINCJ) - QHOUT(J) » QV(J)
         .   ...FIN
         ...FIN
       ..FIN
      CONTINUE
      FERROft * ,TRUfc,
      WHITE(6» 1 )
      FO«M4f(]OX, 'FATAL ERROfl » HYDROLOGY DATA EXHAUSTED')
      RETURN
      CON!INUE
      FERROR«,TRUE.


      FORMAT(10X,'FATAL ERROR » VERTICAL FLUX COMPUTATION')
      FORMAT(15X,I5,1PE]2.'J)
      RETURN
      END

(FCECS VEKSION 22,«6)
                              103

-------
(FLECS VERSION 22,46)
2P.JAN.R2   10121121   PAGE  00001
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00015
00014
00015
00016
00017
00018
OOOTJ
00020
00021
00022
0002J
00024
00025
00026
00027
0002«
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
000<40
ooo«t
00042
f>00«3
00044
00035
00046
OOOU7
00048
00049
00050
00051
00052
00053





C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C

C

C

C







C


C




SUBROUTINE ICFLU(CCIN,OEPTHf DELZ,r>50,KNOIC,ETIME,FERFl'nK,
1 TNFLO, ISEG, NELEM, NEWIC,
2 UHIN,OI,OEPMIN,ALEN,
3 HEL, UWID, XSAHEA, AR£», A«(IO, i)FZ, V3ET,
4 ELfELEV.PELEVfRIvER^twuifNEwTRB)



THIS ROUTINE 13 CALLED EACH TIME STEP TO READ THE INITIAL
CONDITIONS TO THE FIRST SEGMENT OR THE INFLOWS
FRO* THE PREVIOUS SEGMENT.

FORMAL PARAMETERSI
CCIN CONCENTRATION OF INFLOWS- CELL. CENTERED
DEPTH FLO* OEPTH OF THE CURHENT SEGMF.NT















OELZ STAMOARO ELEMENT THICKNESS OF THE CURRENT SEGMENT
ENOIC ENDING TIME OF THE CURRENT INITIAL CONDITIONS DATA
ETIME ELAPSEO TIME OF THE SIMULATION (1*4)
FEHHOH FATAL ERROR FLAG (L*l)
INFLO LOGICAL UNIT NUMBER FOR DATA FROM PREVIOUS
ISEG CURRENT SEGMENT NUMBER
NELEM NUMBER OF ELEMENTS IN THE CURRENT SEGMENT
NELEMH NUM&EH °p ELEMENTS IN THE PREVIOUS SEGMF.NT
NEWIC INITIAL CONDITIONS FLAG a*i)
POELZ STANDARD ELEMENT THICH^ESS OF THE PREVIOUS
POEPTH FLO« OEPTH OF THE PREVIOUS SEKMfcNT
UHl^t INFLOW DISCHARGE


SEGMENT




SEGMENT


UHQLD DISCHARGE INTO THE SEGMENT FROM THE PREVIOUS ONE

CALLED fln SERATRA
CALLS! EOUPCS, fcQUPXS, PROFIL, RADIUS

INCLUDE 'ELMSIZ.PRH'

INTEGER*a EMOIC,ETIME

LOGICAL*! NEWIC,Nfc»QI,NEwTRa,FERROH,RI VtH

DIMENSION CCI'-t'^XELEM.MAXCON), CNOOE(MXEL£M, MAXCON) ,
1 QHINMXELF H)» (4HOLD(M)(ELEM)» XSAREA(MXtLEM) ,
2 PxSAt!(MxELliMj,ieLP(MXELEM),Ui«ir)(MX£LEM},uxOAVG(MXELEM),
3 HEUXS(MXFLE^) , H£L(MXELeM),TMA3S(^AXCON),Pi»ID(MxeLEM)f
U OCNDOE(MxELEM,MAXCON) ,
5 ARE»(^XELEM), AWID(MXELEM), MFZ(a), VSET(3)»
t> FL(MXELEM), UAHEA(MXELEM)

DATA RHO/1000.X
DATA SECoAY/BbUOO./

FEPROR » .FALSE.
NE"IC * .FALSF..
iniM3Mj(ELEM
JOIMaMAKC"M

























                                         104

-------
(TIECS VERSION 22.«6)
10I2H21   PACE
0005"
00055 C
00056 C
00057 C
00058 C
00059 C
00060 C
00061
00062
00063
00061 C
00065
00066
00067
00068
00069
00070
00071
00072
00073
ooo/a
00075
00076
00077
00078
00079
00080
00081
00082
00083
0008'!
00085
00086 10
00087
00088
00089
0009Q 1
00091
00092
00093
0009'4
00095
00096
00097 C
00098
00099
00100
00101
P0102
00103
00100 C
00105
00106
00107
00108
00109 1
»HE























































t (ISEG , E'v, 1)
DISTRIBUTES INITIAL CONDITIONS UPSTHEAM OF INITIAL SEGMENT IY
CONSERVING RELATIVE CROSS-SECTIONAL AREAS AM[) QISCM&kuES---
ASSUMES LINEAR PROFILE OF MOTH 3EUIMEWT AND PAWTIC'/LATE, AND
NI|iIO{I) + l.il<(IO(Itl))/2.
U'
-------
(FLECS VERSION
           28-JAN-H8   10I2H.J1   P4GE   00003
  00110
  om 11
  00112
  00113
  001 1'4
  00115
  00116
  00117
  0011B
  00119
  00120
  00121
  00122
  00123
  00124
  00125
  oni2b
  00127
  0012H
  00129
  00130
  001 H
  00132
  00153
  00134
  00135
  00136
  OM37
  00138
  00139
  00140
  00141
  001«2
  001 43
  OOlaa
  001'45
  00146
  00147
  00148
  00149
  00150
  00151
  00152
  00153
  00154
  00155
  0015*>
  00157
  00156
  00159
  00160
  00161
  00162
  00163
  00164
  00165
       UU
          iJHOL'>(l)»«ttOLO(I)*SECDAV/{UwO*VGCB*WTOP/6,+C8*wB/3. )
1 .....  *UPS'JO
 .....  IF(K.NE,7)
 ......  GTsCNOOECNELMTPtUK + S)
 ......  GB«CMUOE(NELMTP,K+3)
 ......  r,TOP»GT»F»Cl»GH*F»C2
 .....  .  PMS*l3(ET-HEL)*( .25*(*T*CT*GT+WTOP*rTnp»GTaP)
1 .....  ,  +CON»(rtT*CTPP*GTOP + ^ IOP*C r*6Tr)P + «iTOP*CTOP*GT +
2.  .....  xT"P*CT*GT + wT*CTO"*r,T + rtT*CT*GTOH) )*UI'SOO
                                                     TOP + i'<8*
                                                     *GTOP +
2.  .....  wH*CTOP*GT00+«TnP*C»*fiTuP*«TOP*CTOP*Gn) )*t)PSQO
 ........ fin
 .....  IMDIC«NE
 .....  CM4SS»0,
                                          106

-------
(FLECS VERSION
10i?H21
  00166         	PMASSaO.
  00167         	IMTNOIC  ,£'J.  0)
  001^6         ......   CMASSaCMS3T-
  00169         	   IF(K.NE,7)
  00170         	FIN
  00171         	JFdNOK.GE.U
  00172         	C"t*SSsCM9HT
  00173         ......   IF(K.NE.7)
  00170         	FIN
  00175         .....   IFUNDIC.GE.2)
  00176         	(>r)(JsNELM>
  00177	  OELauEL(J*n-UtL(J)
  00178         	CTaCNOOECJ-H.K)
  00179	  CtJaCMOr>E( J,K)
  00180         .......  UP3QOar3HOLO(J)
  001*1         	
  00182         	
  00193         .......
  00181	  IFCK.NE.7)
  •90M5         	STaCNODf (J+l,Kf 3}
  00186
  00187
  00188        1
  001P9        £	*UP500
  00190         	FIN
  00191         	.FIN
  00192         	FIN
  00193         ...
  00194
  00195         	CM3AB«CM3»T
  00196         	CMSHHaCMSBT
  00197         .....   NELM8TSNEIMTP
  00198         	IF(K,NE.7)
  00199         ......   P1SABaPM9*T
  00200         ...
  00201
  00202         ...
  00203         	FIN
  00504   C     .....
  "0205   C     	NQTtj CMASS  IS  IN  (KG/M**3)
  00206   C     	
  00207         .....   COMPUTE-P^nFILE-VALUF.S
  00208         	FIN
  00209         .   .  .  ...FIN
  00210         	FIN
  00211         .   ...FIM
  00212         ...Fin
  00213   C     DISTRIBUTES INITIAL  CI'NOITIHNS UPSTWEAM OF  SUWSF.UUENT SEGMENTS HY
  00210   C     CONSE^VlMG MASS FLUX —  ASSUMES LINEAR  UPSTHfAM 01S TRI *»KT IO'
-------
(FLECS
                                      10I2H21  PAGF  00005
  00222
  00223
  00224
  00225
  00226
  00227
  00228
  00229
  00230
  00231
  00232
  00233
  00234
  00235
  00236
  00237
  00238
  002J9
  00240
  002U1
  00202
  002«3
  002«5
  002«6
  002«7
  002<»8
  00250
  00251
  00252
  002SS
  00250
  00255
  00256
  00257
  00258
  00259
  00260
  00261
  00262
  00263
  0026U
  00265
  00266
  00267
  00268
  00269
  00270
  00271
  00272
  00273
  00274
  00275
  00276
  00277
XS»0,
PX3«0.
00 {1»1,NELEM) X3*<3+XS4REA{I)
00 (JaljMELErt) FXSaPXS + PXSARd)
RATIUaPxS/XS
CALL
ALLOCATES HASS
no
                  CONSERVING RELATIVE CROSS-SECTKU AL  AREAS
      upsuo»uHOLO(:
      CT»(C*tE(I'I8,K) + OCNODE(N8,K))/2.
         HEL«Ht'JX9(I)
         F*C2«(E1-MEL)/PDELZ
         CTOPoCT*FAClfCB*FAC2
         OSAT«FAC2*(CT+CTOP)*UPSJi>/2.
         CMShT»FACl*(CTOPfCB) /2.* UPS 'JO
            GT»(OQOE(NT,K3) * OC'TJOE (MT, K3 ) 1/2.
            G8»(CNOOE(H8,K3) + OCNOOECMR, K3) ) /2.
            GTtiPaGT*FACl*G»*FAC?
            IF(K.,ME,7)
                                         108

-------
(FLECS VERSION
                2fl-JAN.«2   10I2H21  PAGfc  00006
  00276
  00279
  00290
  00261
  00202
  002*5
  00284
  002«5
  00296
  00287
  00268
  002P9
  00290
  00291
  00292
  00293
  00294
  00295
  00296
  00297
  0029P
  00299
  00300
  00301
  00302
  00303
  00304
  00305
  00306
  00307
  00300
  00309
  00310
  00311
  00312
  00313
  00314
  00315
  00316
  00317
  00316
  00319
  00320
  00321
      .  ,  .  .  ifciNoic.Gfc.2)
                                     ,K) * >JCNOO£(J»l,K)}/2,
                        C8«
-------
(FLECS VERSION 22.46)
28. JAN, 82   10J2U21  PARE  00007
00331
00332
00333
0033<*
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346 I
. "«(SsVSET(K)*AREA( J ) /( AHJO(
. EZ«DpZ(K)
. CCIN( 1 ,K )«(2,*CH*S8»COEF*
CCIN(2,K)B2,*CMASS-CCIN(1
. CCINO rKK)»(2,*PM*S8»COEF
. CCIN(2.KK)«2.*PMASS-CCrU
..FIN
...MN
ELSE
. CCIN(I+1,K)«2.*CMASS-CCIN(1,
. IF (K.NE.7)
. . CCIN( 1+1 t K+ 3)"2,*PHA35-CC
. ...FIN
...FIN
..FIN
:NO
i)*4L

DELZ/
»K)
»ntLZ
1,KK)



K)

n(I>




                PROCEDURE  CHOSS-HEFERENCE  TABLE

          00322 COMPUTE-PHOFIIE-VALUES
                00207  00304
          (FLECS VERSION 22,46)
                                        110

-------
(FLECS VERSION SS,06)
IJ.MAH-61
I3J27M2  PAGE  00001
00001
00002
00003
0000')
00005
00006
00007
0000*
00009
00010
00011
•00012
00013
0001U
00015
00016
0001 7
OOOlfl
00019
00020
00021
00022
0002J
00n2<"
00(125
0002b
00027
0002P
00029
00030
00031
OOOJ?
OOOJ3
00034
00035
00036
00037
0003R
00039
00040
OOOU1
00042
OOOU J
00001
OOOM5
OOOUb
000«7
OOOafl
00019
00050
00051
00052
00053


C
C
C
C
C
C
C
c
C
c
c
c
c
c
c
c
c
c
c
c

c

c

c

c


c
c



c
c
c


c
c
c
c
c
c
c
c
c
c
c
SUBROUTINE IN1DAT (ANALMT, ANALYS. OEITH, ECHOr HLDERR. ITPRT,
1 NSEG, N3TEPS, NUMEKR, SlMlEN, DEPMIN)

THIS ROUTINE READS THE INITIAL DATA COMMON TO ALL SEGMENTS AND IS
ONl.r CALLtO FOR SEGMENT NUMBER 1,

FORMAL PARAMETERS!
ANALMT ANALYSIS CONCENTRATION LIMIT
ANALYS TIME SERIES ANALYSIS CONTROL VARIABLE (L*l)
UELTH TIME STEP LENGTH (SECONDS)
ECHO LINE PRINTER ECHO CONTROL VARIABLE (L*l)
HLDEHR HOLDING ARRAY FOR ERROR NUMBERS (BYTE)
ITPRI PRINT FREQUENCY
NSEG NUMBEH OF SEGMENTS
NSTEPS NUMBER OF TIME STEPS TO BE TAKEN (I*«)
NUMERR NUMBER OF INPUT ERRORS DETECTED
SIMLEN SIMULATION LENGTH (SECONDS - I»«)
DfcPMIN • MINIMUM (CUTOFF) FLOW DEPTH (METE«S)

CALLED BYI SERATRA
CALLESl PUTERR

BYTE HLDENR(IOO)

INTtGEfl*« SIMLEN, NSTEPS

LOGICAL*! ECHQ.ANALYS

DIMENSION TjrLE(«0)

DATA M»xsE(i /35/
If (ECHU)
ff
, *»» PRINT HEADING •**
. WRIU(6,1)
, »(RlTE(b|2)
,..F1N

CARDS 1 AND 2. ....SIMULATION IDENTIFICATION TITLE

READ(1,3) (TITLE (I ) , ls| ,i|0)
IF (ECHO) WRITE16.U) ( Tl TLE( I) , I* 1 , -45. .ANALMT, . ,.LO«ER Ll*iT OF AVERAGE DISSOLVED
CONCENTRATION, BFFOKE THE RESULTS OF A
TIME STEP AHE SAVED, THE AVERAGE
                                          111

-------
(FLECS VERSION 22.06)
           1 3,MAR.61
                       I3i27ji2  PAGE  00002
00051
00055
00056
00057
00058
00059
00060
OOflbl
00062
00063
0006U
00065
00066
00067
00066
00069
00070
00071
00072
00073
0007
00077
00078
00079
00080
00061
00082
00081
0008U
00065
00066
00067
00068
                         DISSOLVED CONC, MUST BE >
    06-55. ..DEPM1N... .MINIMUM (CUTOFF)  FLOW DEPTH BELOW WHICH
                  THE  CHANNEL is CONSIDERED DRIED,

 READ (1,5)  NST EPS, NSHG, I TPRT, ANAL YS, DEL TH, ANALMT, DEPM IN

 ttt  COMPUTE  SIMULATION  LENGTH (SECONDS) »**
 SIMLEN « DELTH
 S1MLEN « SIMLEN »  N3TEPS
 IF  (ECHU)
 ,   WRITE (6, 6)  NSTEPS,NSEG, ITPRT,ANALY3»DELTH,ANALMT,!3IMLEN,DEPMIN
 ...FIN

 IF  (NSTtPS ,LE. 0)  CALL  PUTERR ( 1 , NUMERR, HLDERR)
 IF  (NSEU.LE.O  .OR.  NSEG , G T , MAXSEG) CALL PUTERR (2, NUM|=RR, HLOERR)
 IF  UTPHT  ,LE, 0)  C*LL  PUTERR(3, NUMERR, HLDERR)
 IF  (OtUfH  ,LE, 0.0)  CALL PUTERR (5, NuM£HR, HLOtRR )

 RETURN
 FORMAT dHOrjox, 'SEDIMENT AND CONTAMINANT  TRANSPORT SIMULATION',
|   I  PROGRAM  .  StRATRA')
 FORMAT ( lHo,5qx, iPROKLEM  SPECIFICATIONS')
            )
            25X>20AU/?6X,20AU)
            2I5,L5,2F10.o,E10.3)
            6X, I 10, '. ..NijMBEH OF TIME STEPS TO BE
            ..NUMBER  OF  SEGMENTS'/
            . , PRINT  FREQUENCY <* OF TIME STEPS)'/
              TIME  SERIES ANALYSIS CONTROL1/
               ,,. TIME STEP  LENGTH (SECONDS)"/
 FORMATf IMO
 FORMAT(110
 FORMAT f IHO
1   1«X, Ib, »
   i «x, is, '
   I 8X,L 1, '
   7x, IPt 12
   7X, JPE12
   9X, I 10, '
   9x,E10.i

 END
                           ..
                           5, '
                           5, » ...TIME SERIES CONCENTRATION LIMIT'/
                           . .COMPUTED SIMULATION LENGTH (SECONDS)'/
                           ' ...MINIMUM (CUTOFF) FLOW DEPTH (
          (FLECS VERSION 22, U6)
                                         112

-------
(FLECS  VERSION 22,«6)
                                     PARE  opoo)
OOQOi
00002
00001
oooou
00005
00006
00007
0 0 0 0 8
00009
00010
0001 1
00012
00013
00014
ooois
00016
0001 7
oooie
00019
00020
00021
00022
00023
0002«
00026
00027
00028
00029
00030
00031
00032
00033
00030
00035
00036
00037
OOOjfl
00039
000«0
000«l
00002
00003
oooaa
c
c
c
c
c
c
c
c
c
c
c

c




c









1








c




c

           200
                              (106,IJMSGENT.FLX

                THIS UTILITY PROGRAM IS USED TO ENT£R TEXT INTO THE ERROR  MESSAGE
                FILE USED BY SEKATRA, EACH ERROK MESSAGE IS Two RECORDS  (160  BYTES)
                LONG,  MAOfc UP Of  J PAHfS.
                (I)  FATAL OR WARNING TAG (BYTE 1)
                (2)  ERROR IDENTIFICATION NUMBER (BYTES 2-«)
                (3)  MESSAGE TEXT  (BYTES 5-t60>

                THE  oiwtcr ACCESS FILE WILL CURRENTLY HOLD 100 SEPARATE  ERRORS.

                BYTE «tiFF
               1  MAxRtC*200,RECORDS IZE»80,FORMS'FQRMAT TED',
               2 ASSOCIATEVARlABLEslII,INITlALSlZ£s25)
                                                    ( 1 , 1 ) , I s?, 77 } ,
                                  (BUFFU,

     WHITE(2'NREC,3)(BUFF(1,2),1*\,60)
     GO TO 1UO
     CONT INIIE
     00 (INO«1«NM5G)
     ,   NRtCa( IND-1 ) *2»-l
     .   REA()(2lNREC»3)CBUFF(l,l),Ial,Bo)
     ,   NRECsNRECtl
     ,   l'EAO(2'NRECt3) {RUrF{I,e), 1*1 ,60)
     ,   hlRI TE(3,a)8UFF
     ...FIN
     STOP
             I   FoRM«TC>l , I3.76AI/80A1 )
             2   FORMATfA),I3.76A))
             3   FORMAT(80A1)
             «   FORMAT( IX,80AJ/lX,flOAl)
100  CONTINUE
     READU , I ,ENDs200)BUFF (1,1),
                NHEC»( IND-1 ) *2»1
          (FLECS  VERSION  22.U6)
                                        113

-------
(FLEC3 VERSION 23.
SB-JAM-82   10118131  PAGE  00001
OOOOL
00002
00003
00004
00005
00006
00007
OOOOfl
00009
00010
0001 1
00012
00013
00014
00015
00016
00017
OOOlfl
00019
00020
00021
00022
00023
00024
0002S
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
0003P
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
SUBROUTINE PAMTICtABAH, ALE*, 8, C, CCIN, COLD, DECAY, OCLTD,



C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C

C






C
C



C
C
1 DFZ, lt J» N8ED, NELEM, UHOUT, C3HIN, QV, 80«BK,
2 30, SH, ALFA, BETA, VEL1» VEL2, VSET,
3 OELZ. DEPTH, 8*10, AHIO, BETA1, BETA2, DSO*B)

THIS SUHROHTINE CALCULATES COEFFICIENTS OF CONVECTIVE, DECAY




AND
SOURCE TERMS FOH TRANSPORT OF POLLUTANT ATTACHED TO SEDIMENT.

INPUT PAHAMETF.RSI
ABAR - AVERAGE ELEMENT AREAS
H • BED CONDITIONS
C - WATER CONDITIONS
CCIN . CONCENTRATION OF INFLOW
COLO - Cf LL-CENTERFO CONCENTRATION
OfCAY . FIRST UP.DER DECAY
OELTO - TIME STEP (DAYS)
DFZ . DIFFUSION COEFFICIENT
OELZ - ELEMENT THICKNESS
I . ELEMENT INPEX
j . PARAMETER INDEX
NBED • NUMWER OF BED LAYERS
NELEM - NU^ER OF ELEMENTS
IJHIN - I*oFLO^ DISCHARGE
UV - VtRTICAL DISCHARGE
SORBK . AOSORHTION ON SEDIMENT, (1-3) ***J/KG, (M-91 1

















/UAY
DSORB - OESOHPTIUN FRU"« SEDI^E^T. (1-3) M*»3/KR, (4-9) I/DAY
5H - EROSION RATE, KG
-------
(FLFCS
                                     10116131  PAGE  00002
0005U
00055
00056
00057
00059
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00071
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
10087
00088
00089
00090
00091
00092
00093
0009«
00095
00096
00097
00098
00099
00100
D0101
00102
00103
00104
00105
00106
00107
00108
00109
C


AIJ a iJV(I)
VF.LI »(A>4»VSET(JMJ)»HwIO(I)*ALENl/ABAH(I)
C


A (J • T V (I P 1 )

C
VeL?a(AiJ-VSET(JM3)*ewir>(I-H)*ALEN)/AHAR(

I )

C *** DECAY TERM •** (EFFLUENT)
C

C

»LFAadHUUT(I)/(ABAH(I)*OELZ) + OECAr(l)




C «** SOURCE UR SINK TEBM *** (INFLUENT)
C


HETAl«UHlN(i)/(ABAR(l)*nELZ)*(CCIN(I,J)/3,tCCIN(I*l,J)/6,)
BErA2«aHIN(i)/(ABAW(I)*OELZ1*(CCIN(I,J)/6,+CCKUI*l,J)/3.)
C ****
C
C «
C
C
C
C
C
C
C *
****************************************

A*******************

IfMINUi CCIN IS w«tTTEM IMTO CHAR AS A FIRST
APPROXIMATION TO THE EVENTUAL AVERAGE
CONCENTRATION. THE ONLY MEANS 9Y WHICH
TO ASSURE THE ACCURACY OF THIS
ASSUMPTION IS TO ITERATE TO THE

CORRECT
SOLUTION, AND USE NEW ITERATES TO BETTER
APPROXIMATE CHAR,



C A***************************************************************
C


c *** ABSORPTION / DESORPTION ***
c


DO (IE « l,MXF.LEM>
, DO (1C • 1,MAXCON)

. . CBAKUE.IC) « CCIN(IE,IC)

. ...FIN

C
C
...FIN


IF(CBAR(I,J*3).GT,0.0,ANO.CBAR(I+1,JM3).

I
2
3

j
2
3

1
2
3

1
?
3



AOnSl» SOHHK(J)*SORBK(JM3)/ia.*(
+ CfA»?(I»JM3)*CHAR(I + tj7)fCRAR(I*l/JM3
CBAR(H.l,Jl3)*CRARU + l,7))-SOR8K(J)/6
CBAUdtl, J))



GT.0,0)
3.*C8A«(I,JM3)*CBARd,7)
)*C8AI?(I»7)t
.*(2.»C8ARd,J)»

OSA01» DSOHB(J)*DSOR8(JM3)/12,*(3,*CBAR(I, JM3)*CBAR(I/7)
»CBAH(l>JM3)*CHA»(Itl«7)+CHAH(I + l»JMJ5
CBAW(!-M,JM3)*CHAR(Itl,7))»OSOR8(J)/6
t BAR (I+l»J))
AOi'52* 30r(Hn(J)*30RBK(J13)/l2,*(
+CBAP(I,JMJ)*CH4W(I+1,7)*CHA»(I+1»JM3
*}.*CHAR(I + 1,JM3)»CB43(J»1,7))-S()RHK(
*2. "C^AR ( I* 1 , J ) )
)*CBAR( 1,7)*
.*(2.*CBAR(I,,n +

C3AR(I,JM3)*C»Ai?(l,7)
) *CSAf<( 1,7)
J) /6,* (CUArtd, J)

OSA02" OSn»8(J)*DSOP8CJ«3)/12,*(C"AR( I, JMJ) *C8AR( I, 7)
*CHAR(I»JM3)*CHAU(I+l»7)*C"AH(I+lfJHJ
) *CHAK ( [ . 7 )
+ 3.*CrtAR(I*l,Jr*3)*CBAR(I»l,7))«O.SORLUJ)/6,*(CaAR(I,.))
*2.*C8AR(i+i,J) )
IF(AOOSl,GT.O,O.Oa.AODSl.EJ,riS1iitl^ET
IF(US*LH.LT.O.O)8ET»l»nET»l*oSAl)i
IF(ADOS2,GT,0,O.OW.ADOS2,E'3,PSA02)'iET

A 1«HET 4 1 + 400S1

A2SHE TA?tAOr)$2
                                          115

-------
tFLECS VERSION ?3.(I6)     28-.UN-83   lOliejJl  PAGE  OOOOJ
  OOtlO         .  IF(OSA02,LT.O.O)BETA2«8ETA;?tDSAD2
  OOlil         ...FIN
  00112   C
  0011J   C
  00110   C   *** SCOUR OR DEV031TinN *«*
  00115   C
  00116         BETA • SR(J) • SO(I,J)
  00117         RETURN
  00119         END

          (FLECS VE«3ION 22.06)
                                         116

-------
(FLECS  VERSION  22,
1j.MAR.81
m27i«a   PAGE   oooui
00001
00002
0000)
00004
00005
00006
00007
OOOOB
00009
00010
00011
00012
00013
00011
00015
00016
00017
00019
00019
00020
00021
00022
0002J
00021
00025
00026
00027
00026
00029
000)0
000)1
000)2
000))
000) | s o.O
KAY? « 0.0
IF (ECHO) WRITEf6,2)
,.FIN
ELSE
*
                                        117

-------
(FLECS  VERSION 22.46)
13.MAR.81    I3I27«42  PAGE   00002
00054
00055
00056
00057
00058
00059
00060
OU061
00062
00063
00064
OOObS
00066
00067
0006B
00069
00070
0007 J
00072
0007^
00074
00075
00076
00077
00078
00079
oooeo
00061
000«2
00063
0008U
00085
00066
00087
OOOflft
00069
00090
0009»
00092
00093
0009"
00095
00096
011097
00098
00099
00100
00101
001 0?
0 0 10 S
ool ya
ootos
001 06
00107
00108
00109
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c

c
c
c
c
c
£
c
c
r
c
c
c
c
c

c








c
c
, ...SECOND DATA SET - ADSORHTION COEFFICIENTS TABU:
THIS IS THE. TABLE OF AOSURTION COEFFICIENTS FOR |8
DIFFERENT WAVELENGTHS THAT ARE A MEASURE OF THE CHEMICAL'S
ABILITY TO ADSORB LIGHT AT THE DIFFERENT WAVELENGTHS,
WAVELENGTH UNITS ARE NANO METERS.
... .RECORD 1
COL, 1-10. ,.E( 1J...COEF, FOR WAVELENGTH OF 300.00
1I-?«,..E( 2). ,.CO£F. FOR WAVELENGTH OF JO}, 75
21-30, ..EC 3),,,COEF, FOR WAVELENGTH OF 306.75
31-40. ..EC i).,,COEF. FOR WAVELENGTH OF 313,75
01-50, ..£( 5). ..COEF, FOR WAVELENGTH OF 318.75
51-60, ..£( 6),,.COEF. FOR WAVELENGTH OF 323.10
61-70. ..£( 7),.,CUEF. FOR WAVELENGTH OF 346,00
71-«0.,,E( 8),,,COEF. FUR WAVELENGTH OF 370.00

....RECORD 2
COL. 1-10. ,.£( 9)...COEF, FOR WAVELENGTH OF 400.00
1 1-20. ,,f( 10) .. .COEF. FOR WAVELENGTH OF «30,00
21-30. ,.E( 11) .. .COEF. FOR WAVELENGTH OF «60,00
31-40. ,,£(12).., COEF. FOR WAVELENGTH OF 490,00
"1-50, ..£(13), ..COEF. FOR WAVELENGTH OF 536,25
51-60. ,,£(!«). ..COEF. FOR WAVELENGTH OF 537.50
61-70, .,£(15) ,, .COEF, FOR WAVELENGTH OF 637.50
71-80.. .£( 16) ,,,C06F. FOR WAVELENGTH OF 687.50

....RECORD 3
tUL, 1-10, . ,E(17> ...COEF, FOR WAVELENGTH OF 756,00
11-20, ,.E(16),,, COEF. FOR WAVELENGTH OF 800,00

REAOil,4) (E(L),Lel,|8j

....THIRD DATA SET - SoLAR INTENSITY TABLE
THIS TABLE CONSISTS OF FOUR SETS OF is VALUES. THE
FOUR SETS CORRESPOND TO SPRING, SUMMER, FALL* AND WINTER,
RESPECTIVELY, THE l *J VALUES CORRESPOND TO THE 18 WAVELENGTHS
AS DESCRIBED ABOVE IN TH£ ADSORPTION COEFFICIENT TABLE,
THE INCLUSIVE DATES FOR EACH SEASON ARE GIVEN BELOWI
CALENDER DATES JULIAN DATES

SPRING MARCH 1 . MAY 31 60-151
SUMMER JUNE 1 - AUG. Jl 152-243
FALL SEP. 1 - NOv, JO 244. JS4
"INTER U€C. 1 - FEB. 28 ii5"365> 1-59

HE AD (1,4) ((SI(L,I),Lsl,18),Isl,4)

IF (fcCH(j)
N K I T E ( 6 f 3 )
«HITE(6»7) JULIAN,PHI,KAn.KAY2
«HI 1E(6,5)
HO (Let, 1«)
, wfiiTE<6,&) WL(L),ECL),(SI(L/D, I = l,«)
...MN
..FIN

*»* THE JULIAN DATE is ADJUSTED TO MAKE THE FIRST DAY OF
                                        118

-------
(FLECS  VERSION 22,06)
           ij.M4H.et   i3i27i'J2  PAGE  00003
  00110
  001 II
  001 12
  00113
  001 1 U
  00115
  001 16
  001 1 1
  00118
  00119
  00120
  00121
  00122
  00123
  0012V
  00125
  00126
  00127
  00128
  00129
  00130
  00131
  00132
  00133
  0013"
  00135
  00136
  00137
  00138
  00139
        SPRING JULIAN DAY 1 ***
         (JULIAN ,GE. 60) JULIAN
    ELSE JULIAN « JULIAN + 30«>
               JULIAN - 59
                    FIRST TERM OF THE RATE.
                    THE FOUR SEASONS ***
                       OF CHANGE EQUATION
    *»* COMPUTE THE
        FOK EACH OF
    00 (Isl.U)
    .   PCOEF(I) » 0.0
    .   00 (Lst,ia> PCOEF(I) « PCOEF(I) * E(L) * Sl(L>I)
       PC,Otf(I) a PHI * PCOEF(I) * (2. 303/6,02E2U) * SECDAY
    ...FIN
  ..FIN
 RETURN

 FORMAT(15,3FIO.O)
 FURMATfIHu,13X,'NO PHOTOLYSIS DEGRADATION WJLL BE COMPUTED')
 FORMAI{iHO»i8Xi'PHOTOLYSIS TABLES AND COEFFICIENTS')
 FORMAT(PF10tO/3FlU,Q/2FlO.O)
 FORMATdHU,56X,'PHOTOLYSIS TABLES•/39x»'ADSQRBTION',
1  23x,'SOLAR  INTENSITIES'/23x, H.AMDA CENTER',
2  2X,'COtFFlCIENTS',5X,'SPRlNG',8X,iSUMMERS9X,'FALL',
3  9X,'WINTERI/23X,6(12(1-'),2X1)
 FORMATf26X,F6,2,3X,5(2X,lPEl2,«))
                 ..JULIAN STARTING DATE'/
                 .REACTION QUANTUM YIELD'/
                 .LIGHT EXTINCTION COEFFICIENT OF HATER'/
                 .LIGHT EXTINCTION COEFFICIENT OF SUSPENDED',
 FORMA] (26X, 15,
1  |«X, 1PE12.5, >.
2  1UX, 1PE12.5, '.
3  Mx,)PEI2,5, ',
t>
SOLIDS IN WATER')
 END
          (FLECS  VERSION  22,16)
                                       119

-------
(FLECS  VEHSION ?2.U6)
2fl.jAN.92   10H7I41  PAGF.  00001
00001
00002
00003
00004
00005
00006
00007
00008
00009
U0010
00011
00012
ooois
ooo t a
00015
00016
00017
00010
00019
00020
00021
00022
00023
00024
00025
00026
10027
00028
00029
00030
00031
OOOJ2
00033
00034
00035
00036
00037
00038
00039
oooao
oooai
00042
00043
00044
00005
00006
00047
oooae
000tt9
00050
00051
00052
00053


c
c
c
c
c
c
c
c
C
C
C
C
C
C
c
c
c
c

c




c




c
c
















c
c

c
SUBROUTINE PRQFILCALEN, AWID, DE.LZ, DEPTH, NELEM, Q,
1 USTAR, VOL* OH, EL, IFLAG, DELTA)

THIS ROUTIME ASSIGNS A LOGARITHMIC OR UNIFORM PROFILE FOR THE
BULK VOLUMETRIC FLO*S.

INPUT PARAMtTERSi
ALEN SEGMENT LENGTH
AHIO SEGMtNT rtlUTH
DELZ STANDARD ELEHENT THICKNESS
OEPTH FLO* DEPTH
NELErf NUMHER OF VERTICAL ELEMENTS IN THE SEGMENT
'i FLOW TO BE OIST»IHUTEO
USTAR SHEAR VELOCITY
VOL SEGMENT VOLUME
OUTPUT PARAMETERS!
Urt . DISTRIBUTED FLOW

CALLED BYI HYDFLO, ICFLO

INCLUDE "ELMSiz.pRM"

DIMENSION HH(MXELEH), Z(«XEL£M), Zl(MXELEM), A^IO(rtXELEM) ,
1 tL(MXELEH)
DATA XK/O.U/
DATA G/9.S1/

CO (I • l.MXELE*!)
. OH(I) • 0.0
...FIN
uBA««fj / VOL * ALEN
Zn»OEPTH/(10.**(URAR*XK/(2.3*USTAR) t 1./2.3))

ICOUNTaO
Z0«0.001
Cl«uaAR*XK/USTARtl.O
C ON«OEPTH*(C 1-2. 303 *ALOG10 (OEPTH) )
REPEAT UNTIL (»BS( EPS ).LT,O.OI. OR. ICOUNT.GT.IO)
ICfJUNT»ICOUNT+l
FZO«CON-ZO«Cl+2,303*nEPTH*ALOG10(ZO)
FPZO«DEPTH/ZU"C)
ZP«ZO«FZO/FPZO
EP5"(*P«ZO)//P
;.C»ZP
IF(ZO.LT.O.O)
. ZO»i)EPTM/(lo.«*(U8AR»XK/(2.30i*USTA9)+l./2.303) )
, ICOUNT«tl
...FIM
..FIN


WHEN (ZO ,GT. DELZ/'l,O.OR.NELEM,EQ.l)
*
                                         120

-------
LtCij VtKSJON 2
00051 C
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068 C
00069
00070
00071
00072
00073 C
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
OOU9J C
0009« C
00095
00096
00097 C
00098 C
00099 C
00100 C
00101 C
00102 C
00103 C
00104 C
00105 C
00106 C
00107
00108
00109
>,46) ?«-.)AlJ.S£ 10U7l«l PAiJE 00002
*«* DISTRl^UTF VELOCITY UNIFORMLY ***
XH£N( if\. AG.EU.O)
, DO (J«l ,NELEM)
. . >JH(I)silHAK*nELZ*A*iIO( I )
. . . *f IN
. . «F I"1
ELSE
, 00 ( 1*1 , ^ELE*- 1 )
. . ;JH ( I } «UH *** (EL ( I + 1 ) "EL ( 1 ) ) *Ax Jo ( 1 )
. . . .Flfo
, ljlH(N£LE1>O»IJ»AH*OfLT**AWJD(NELEM)
...FIN
..FIN
LSE
*** niSTtfllUTE VEL'ICITV INTO A LOGARITHMIC PROFILE ***
MUM»»'JELEhtl
Z( 1 )*Z'>
Z(NtJM8)BO£MTH
Zl (N|JMH)«0.

JX a 1
JaNUMB
REPEAT UNTIL (JX ,FU. NgLEH ,0«. Z(J) ,LE, ZO)
. Jt m JX + t
, JsMELE* • JX * 2
. *HEN (IFLAG.EU.O) zi (.n«zi t J+D+OELZ
. ELSE
. . "HEN (J.EU.NELEM) Z1(J)»Z1(J+1)+OELTA
. . ELSE zi(j)»zifjti)*£L(j+i)-eL(j)
. ...FIN
. Z(J)«OE»TH . ZHJ)
. . . F I rt
"
-------
(FltCS VERSION
00110
00111
00112
00113
ooim c
00115
00116
00117
00118
00119 f
00120 f
. T2«
. 9H(
» SUM
...FIN

DO (I
•
• t *
..FIN
RETURN
INO
    28-JAN.H2   10il7l'41  PAGE  00003



T2«A*(Z(IPl)*ALOG10(7(lPl))-Z(n*ALOG10(Z(I)n
                          UH(I)BIJH(I)/SUM * Q
                 VERSION tz.nt,i
                                       122

-------
(FLECS  VEHSION 22.46)      IJ.MAH-ei    13«28ll<4  PAGE  OQ001
  00001          SUBROUTINE  PUTEKR(If),  NUMERR,
  00002    C
  00003    C      WHEN  AN  EKROR  IS  DETECTED  IN  THE  INPUT  STREAM ,
  OOOOU    C      THIS  SUBROUTINE  IS  CALLED  TO  PLACE  THE  E»ROR IDENTIFICATION
  00005    C      CODE  (ID)  INTO  THE  HOLDING ARRAY  (HLDE«H)  AND INCREMENTS
  00006    C      TH£ NUM8EK  UF  EKRORS  
-------
(FIECS  VERSION  22,
19.MAR-81    13141102  PACE  00001
ooooi
00002
00003
00004
00005
00006
00007
00008
00009
00010
0001 1
00012
00013
oooi u
OOOI 5
00016
00017
OOOlfl
00019
00020
00021
00022
00023
00024
00025
00026
00027
0002R
00029
00030
00031
00032
00033
00034
00035
0 0 0 S 6
OU037
00038
00039
OOOuO
OOOUl
00042
00043
00044
00045
00046
00047

C
C
C
C
C
C
c
c
c
c
c
c
c
c


c





c











I



10




20


SUBROUTINE RADIUS ( ALEN, AREA, CROSEC, DEPTH, EL, HRAD)

THIS ROUTINE CALCULATES THE HYDRAULIC RADIUS OF A CROSS. SECT ION.

INPUT PARAMETERSI
ALIN . SEGMENT LENGTH
AREA - SURFACE AREA AT NODAL DEPTHS
DEPTH . DEPTH QF CROSS-SECTION
EL . ELEVATION OF NODAL AREAS
OUTPUT PARAMETERS!
CRUStC - TOTAL CROSS-SECTIONAL AREA
HRAD - HYDRAULIC RADIUS

CALLED bYt HYODAT, KFLO

INCLUDE 'ELMSIZ.PR*'
DIMENSION AREA(MXELEM) , EL(MXELE^)

CROSEC » U,
BLEN x 1,/ALEN
WETPER s AR£A(U*f»LEN
ELBTM = EL( 1)
WBTM s AREA ( 1 ) «bLEN

DO  ERRO« IN SUBROUTINE RADIUS'/
1 "0 CROSEC s ', E12,«,'M**3'/
2 '0 wETTF.O PERIMETER a i, E 1 2, 1 , ' M * *2 ' )
GO TO 20
MOP » WHTM f (wrrjp - WHTM) * (DEPTH - ELBTM)/ (ELTOP - ELBTM)
ELTOP * DEPTH
CROSEC * CROSEC » (EL^OP - ELBTM) t (WTuP f WBTM)/2,
WtTPER « SORT ((ELTOP - ELBTM)**2 » «WTOP -«BTM) /3 , ) * *2) * 2,0
t t WETPER
HR*D = CROSEC / WETPFR
RETURN
END
          (FLECS VERSION 22,
                                         124

-------
(FLECS  VERSION  22.46)
6.APR.
17121109   PAGE   00001
00001
00002
00003
00004
00005
00006
00007
OOOOfl
00009
00010
0001 1
00012
0001 3
00014
00015
00016
0001 7
0001P
00019
00020
00021
00022
00023
00024
00025
00026
00027
00026
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
oooao
00041
00042
00043
00044
OOOU5
OOOU6
00047
00048
00050
00051
00052
0005S


C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C

C



C


C



















SUBROUTINE RDSFLOIALEN, AREA, AWID,C, OELZ, OFZ, NELEM, NELEMP,
1 PDELZ, P"1D, PXSAR, VSET, XSAREA)

THIS SUBROUTINE IS CALLED EACH TIME STEP (EXCEPT THE FIRST) WHEN
DEPTH WITHIN THE S>E«MENT HAS CHANGED. ITS TASK is To REDISTRIBUTE
THE CONCENTRATIONS.

FORMAL PAHAMETERSI
A*IO • "IOTH P CURRENT TIME STEP
C • THE NELMpTti NODAL CONCENTRATIONS THAT ARC TO BE
REDISTRIBUTED



THE







OELZ • THE STANDARD ELEMENT THICKNESS FOR THE CURRENT TIMf ST£P
DFZ • DIFFUSION. DISPERSION COEFFICIENT
NELEM • THE NUMBER OF ELEMENTS FOR THE CURRENT TIME STEP
NELEMP - THE NUMBER OF ELEMENTS DURING THE PREVIOUS TIME STEP



PDELZ • THE STANDARD ELEM£NT THlCKNESS USED DURING THE PREVIOUS
TIME STEP
PXSAR • PRESS SECTION f PREVIOUS TIME STEP
PWIO • WIDTH » PREVIOUS TIME STEP
XSAREA • CROSS SECTION # CURRENT TIME STEP
VSET " SETTLING VELOCITY OF SEDIMENT

CALLED BVI SERATRA

INCLUDE 'ELMSIZ.PRM'

DIMENSION AREA(MxELEM), AwIO (MXEL£M) , C (MXEL£Mf MAxCON) ,
KP(MXlLtM,MAXCON), OFZ((f), PW ID ( MX ELEM ) , P XSAR ( MXELEM) ,
2VSEH3), XSARE*(MxELEM), JELP (MxELEM) , HEQXS (MXELEM) „ TMASS(7)

PXS « 0,
XS * 0,

00 (Isj, NELEM) XS » XS t XSAHEA(I)
00 U*i«NtLEMP) PXS 3 PXS » PxSAR(I)
DO ( ISI,NCLEMP+D
. DO (J«1,MAXCON)
, . CP(1,J) - C(I,J)
, , , ,F IN
...FIN
RATIO * PXS/XS
CALL t(iupxs(pxSAR, PWIO, POELZ, XSAREA, NELEM, NELEMP, RATIO,
HELP, HtUXS)
00 (Ksl,MAxCON)
T"ASS(MSO,
CT«CP(2,K)
CHsCPt 1 .K)
NELMBTsI
CMAS^QeO ,
DO ( i * i , NELEM i
. N£LMTP*lELP(I)
, NbsNELMTP




































                                         125

-------
(FLECS  VERSION  32,06)
6-APn-oi
ooosa
00055
00056
00057
00058
00059
00060
00061
00062
0006J
0 0 0 fc »
00065
00066
00067
00068
00069
00070
00071
00072
0007}
00071
00075
00076
0 0 (1 7 7 C
00078
000/9
00080 C
00081 C
0003? C
OOOH J
ooonu
OOOP5
OOOflfr
00087
00088 C
00089 C
00090 C
00091
0009?
0009J
00094
00095
00096 C
00097 C
00098 C
00099
001 00
00101
00102 C
0010J C
ooioa c
00105
00106
00107
0010M
00109
. . N 1 * N (U 1
. . F 1 5N8«PDELZ
, , FH=t!«POELZ
, , C I *CP ( NT , K )
, . CBsCP (NB,K )
. , HfcL = HEf)XS( I)
, , f AC 1 » (HEL-EH) /POELZ
, , F AC?,s ( E T »HEL > /POELZ
, , c TOP=C T *FAC t « CP»F AC
-------
(FLECS VERSION 22.«6)

  00110   C
  00111
  00112
  0011}
  00114
  00115
  00116          .,FIN
  00117         RETURN
  00118         END
     6-APH-ei   I7l21|09  PAGE  00003

NUOAl, VALUES ABOVE BOTTOM ELEMENT
ELSE CfI*l,K) * 2,*CMA3S'XS»REA(I).CU,K)
          (FLECS  VERSION  21,Ub)
                                      127

-------
(FlECb VERSION 22.U6)
Onoyl
00001
00002
00003
QQ004
00005
00006
00007
OOOOfl
00009
o o o i n
0001 I
00012
0001 3
00010
00015
oooi*
0001 7
00018
000 19
00020
00021
00022
00023
00021
00025
00026
00027
0002S
00029
00010
00031
QOOS2
0003$
0003U
00015
00016
00017
OOOjfl
00019
00040

C
C
C
c
c
c

c

c
c
c



c
















c




c

SUBROUTINE tfPTE*R(NUMERH, HLOERR, FERKOfO

THIS KouTiNt is RESPONSIBLE POR REPORTING ANY INPUT ERRORS
UNCOVEHEO BY THE INPUT HOUTIN£S AND DETERMINING THEIR SEVERITY,

CALLED bYt SEHATRA, STRTUP

BYTE HLDEKROOO) ,BiiFF(so,2)

LOGICAL*! FERHOH

CALLED BY: SERATRA

OPENfUNl T«)0, NAME »<5EH*TE'"'.^S6I, TYPE"' OLD',ACCESS='PI"ECT',
1 FONMt'FOHMATTEO' , ^AXREC«200 , RECORDS UEsftO ,
2 ASSOCIATE VARIABLES 1 1 1, READONLY)

NUHflsO
NUMfsO
WHI T£<6. a)
DO ( 1 s 1 i NU^ERR)
lNOs(HLOtRR( l)-l )*2»1
KEAD( 1 0' IND, 1 ) (HIJFFCK, 1 ),Kel ,80)
IN|")slNL>+l
WEAnilU'lNl>,l)(RUFF(K,2)fK3l,80)
IFfRUFF ( 1 , 1 ) ,EQ, 'W ' )NUMW»N(JMH+t
IF(«UFF ( 1 , 1 ) ,EQ, 'F ' )NUMF=NUMF*1
wRITt(0,2)((BUFF(K,J),K*l,80),J»l,2)
..FIN
WKITE(6,3)NUMW,NUMF
CLOSE(UNIT«10)
If (HWf .ST. 0) FERROR » ,T"UE.
RETURN

1 FURMA1(80A1)
2 FQRMAT(lHg.Al,2X,lA\,Jx,7bA|/loX,BOAl)
3 FORM*T
-------
(FLECS  VfRSION
lO-APR-81    I3I5H37   PAGE   00001
oonoi
00002
00003
00000
00005
00006
00007
00006
00009
00010
0001 1
00012
00013
0001"
00015
00016
00017
00018
00019
00020
00021
00022
00023
00020
00025
00026
00027
00028
00029
00030
OOOJI
00032
00033
00031
00035
00036
oooj;
00039
00039
00000
00041
00002
00043
00040
OOooS
00006
00007
00008
00009
00050
00051
00052
00053





C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C

SUBROUTINE SANDUBAR, ALEN, AREA, 8, BOIV, CCIN, OELTO, Of.L
1 DENS, D50, HRAD, N0ED, NELEM, POR, QHIN,
2 GHOUT, SCSHR, SLOPE, SM£TM, STRESS, T£MPR,
3 VSET, vou xrsn, OEPQ, ILAYR, su, SR,
« XNT, COLO, C, CROSEC, BwIO, ECH07, SCOUR)

THIS SUBROUTINE COMPUTES THE SOURCE/SINK TERMS REQUIRED FOR
SCOUH/PEPOSITION OF SAND. TRANSPORT CAPACITY IS CALCULATED
ONCE PF> SEGMENT,

INPUT PARAMETERS:
ABA« . AVERAGE VERTICAL PROJECTION AREA
ALEN . SEGMENT LENGTH
ARtA - ELEMENT (REAL) VERTICAL PROJECTION AREA » DATA
B • 6tO CONDITIONS
BDIV - STANDARD REO L*YER THICKNESS
BWJD . Rt*L HIOTH AT CROSS-SECTION BREAK POINTS
C . WATER CONDITIONS
CC1N . CONCENTRATION OF INFLOW
CROSfcC - TOTAL CROSS-SECTIONAL AREA, M*»2
OEL'L) - TIME STEP (DAIS)
DELZ - STANDARD ELEMENT THICKNESS
DfLZT - THICKNESS OF THE TOP ELEMENT
OENS . DtNgiiY
050 . MEDIAN BED SEDIMENT DIAMETER (METER)
HRAD - HYDRAULIC RADIUS
NBED . NUMBER OF BED LAYERS
NELEM - NUMBER OF ELEMENTS
POH - POROSITY
OHIN . INFLOW DISCHARGE
OHOUI « OUTFLOW DISCHARGE
SCSHH . CRITICAL SHEAR STRESS FOR SCOUR
SI UPE - ENEHfiY OR RIV£R 8EO SLOPE
SMETH . METHOD TO HE USED WHEN COMPUTING SAND CAPACITY
sTl TOFFALETTI'3 METHOD
sc» COLBY'S METHOD
STRESS - BED SHEAR STRESS
TEMPR . WATER TEMPERATURE
VSET . PARTICLE SETTLING VELOCI^y
VOL - VOLUME
XYJO . THICKNESS "r TOP BED LAYER
OUTFUI PARAMETERS!
ILAYR . NO, OF BED LAYERS AFFECTED BY SED, DEPOSITION
SO - DEPOSITION RATE, (KGtPC)/M**3/r>AY)
SR - EROSloN f»ATE» (KG (PC! /M**3/UAy)
xNt . WEIGHT OF TOP BED SEDIMENT LAYER, (KG/M**a)
OEPO • BED DEPOSITION RATE ( KG (PC J /M2/DA Y )
SCOUR - BED SCOUR RATE (KG (PC 1 /Ma/pA Y )

CALLED BY: TRANSP,
CALLS: fOFML, COLBY

INCLUDE 'ELMSIZ,PRM<
l,












NOOES



















(BYTE








AND ER










                                        129

-------
(FLECS VERSION
0005«
00055
00056
00057
00058
00059
00060
00061
00062
00063
0006«
00065
00066
00067
00069
00069
00070
0007 1
00072
00073
0007«
00075
00076
00077
00078
00079
00080
OOOS1
00082
0006 J
0009"
00095
00096
00087
OOOBS
00089
00090
00091
00092
00093
0009U
00095
00096
00097
00098
00099
00100
00101
00102
'00103
001 0«
001 05
00106
00107
00)06
00109
C

C

C
C






C
C
C

























C
C
C
C
C
C
C





C
C
C
C
22. «6)

BYTE !

LOGIC/


D1HEN!
1
2
3
u
5


i N r T 1 1
ILAYH
RSsO.i
CSsO.l
OEPO (
DEPOO
SHC s
G5I *
QTOT '
SR(1 ):
SR(« ) :
scou«
SCOUR
RATE '•
VPCROi
VOLU^I
DO (K
. 80
, SO
...Ml
XNTO
IF (NP1

1 ,
...M
IF (E
,
. CA
t
9
•
ff
f
. oo
* •
1. .
• •
• 1 ff
§
. IT
, AT
t
          1Q.APR-81   13I5UJ7  PAGE  00002
LOGICAL*! FERROR, ECHO?
DIMENSION ABAR(MXELfM), AREA(MXELEM), 0(MAXLEV,MAXCON-l),

          COLD(MXELEM,MAXCON),CC1N(MXELEM,MAXCON), OEMS(3),
          OHIN(MXELKM), OHOUT(HXELEM), SCSHRO),
                    6), SR(6), VSET(3)» XNT(3).
                    C(MXELEM,MAXCON),
          OEPO(6), SCOUP(6)
INITIALIZE SCALAR AND ARRAY VARIABLES
         « o
VPCROS * ALEN * ewiod)
         CROSEC * ALEN
        NELEM)
   80(K. 1 )*0,0
   SD(K,4)30,0

         0.
        Nt.O)
        )»(! ,0-POH)/(8(N8£0,1)/OENS(1)•
   (ECH07)

   CALCULATE ACTUAL SANO  IRANSPOHT WITHIN  THE RIVER
                                                        SRC (KG/DAY)
       NOTEi cci'J is A TI^E AVERAGED QUANTITY, COLO  is NOT,    AN
             ITERATIVE LOOP IS CALLED FOR ''HERE  SRC  IS UPDATED  UNTIL
             RESULTS ARE UNCHANGED.
00 fix*!,NELEM)
   3MC*SHC*(JHIN(IX)*(CCIN
-------
(FLECS VERSION 22.
to-ApR-81    msiiJT  PAGE  oooos
ooj jo
00)11
00112
001)1
001 1U
00115
00|16
001 17
00118
00119
00120
00121
00122
00123
00121
00125
00126
00127
00)28
0012"»
00130
00)31
00132
00133
0 0 1 3 'i
00)35
00116
00137
0013"
001 39
001 10
/% n t it f
o o i y i
001«2
00113
001 14
00105
00116
00|U7
00 1 18
00119
00150
00151
00152
00153
00151
00155
00)56
00157
001 5fi
00159
00) 60
00161
00162
00163
00161
00)65
C
C


C
c
c
c

1



1


1





c
c
c


c
e
c
50
1
1
1
f
,
\
<

1
1
«
1
c
c
c
100 ,
c
c
c
c
c
c .
150
•
t
I
, c
, s
1 •
k •
I •
* •
i «
k •
k •
k •
k t
k t
k t
4
k •
i •
\ «
•
t •
k t
G

0

0
I

s

0
.
I
D
*





*
•
R

C

n

c


D

I
I
I
                   CALCULATIONS OF STREAM CAPACITY FOR 3ANO
                   SELECT (SMETH)
                      ( • T « )

                      *  THE TOFFALETI TECHNIQUE MAr NOT BE w£LU  SUITED  FOR  CHANNEL
                      .  CROSS-SECTIONS WHICH DIFFER MARKEDLY FROM  RECTANGULAR,

                      '.  CALL TOFFALfALEN, 050, GSI, HRAD, QTOT,  SLOPE,  T£MpR,  VOL,  VSET,
                                    GSU, GSM, GSL, GSB, YU, YM, YL)
                      { 'C' )
                      .   CALL COLBY(ALEN, C, DELZ, 050, HHAD, NELtM,  OTQT,  TEMPR,
                      .              VOL, SSI, FERROR)
                      .   IF(FERROH)
                      .   ,   CALL TOFFAL(*LEN, D50, GSI, HRAD, QTOT,  SLOPE,  TEHPR,  VOL,  VSET,
                         .              GSU, GSM, G5L, 558, YU,  YM,  YL)
                      .   ,   FERHOH s .FALSE.
                      .   ...FIN
                      ...FIN
                    ..FIN
                   GSI  »  liSI » 8wiO(NELEM t 1)

                   OETF:HHINE JF DEPOSITION, SCOUR, OR NEITHER OCCURS,

                       f  G3I • 3PC
                   IF  (OIF)  50, 100, 150

                   SAND  HITHIN THE WATER COLUMN EXCEEDS CAPACITY .  DEPOSITION  OCCURS

                   OEPO(l)  « -OIF/ AREA(l)
                   RA1E  » -DIF/VOLUME
                       hf t)  x -1
                   DO  fK*l,NEL£M)
                      3D(K,1 ) s RATE
                      VULK  a A8AR(K)*DELZ
                      StOsQHIN(K)»(cCIN(K,l)fCCIN(K*l, 1 ) ) /« . t CJHOUT (K ) »COLD ( K , l>/2.
                      CONIsQHIN(K),(CCIN(K,a)»CCIN(K*l,«))/q.tQHOUT(K)*COLD(K,a)/2,
                      RATtK  » RAT£ * VOLK
                      SU(K,a) * RATEK * CONT/SED/VOLK
                      DtPO(i() « DEPO(
-------
     VERSION 22,«6)
       io-APn-81    instil?   PAGE  oooo<»
00166
00167
00168
00169
001 70
001 71
00172
00173
00171
00175
001 76
00177
001 78
001 7<>
00180
00181
00162
OOtBJ
0018'4
001B5
00)86
00187
001*9
001B9
00190
001V1
00192
00193
Q019«
00195
00 (K«I,NBEO)
   NB * NBEO - K » 1
   luENS s (1,0 . POR)  /  (B(NB, 1 )/DENS(l )  +  B (NBf ?. ) /OEN8 (Z J
                         »  8(NB,3)/OEN3(3))
   DtL s BOIV
   IF (NB.EO.NBED) DEL  «  XYSO
   TJNBED « TOENS * DEL » B(NB,1)  *  VPCROS
   WHEN (TRJOSP.GI: .TINBED)
   .   ftS « RS  «• tINBEO
   ,   C3 « CS  + TIN8EO  *  8(NB,a)
   .   f«SUSP « TPSUSP • UN8ED
   .   IINBEO » 0,0
                           GO TO 175
   ELSE
   ,  ft$
   .  C3
                  »  RS  t  TPSUSP
                  »  CS  *  TRSUSP  *  8(NB,«I)
               HNBEO  « UNUEO  - TRSUSP
            1   GO TO 175
            ...FIN
          ..FIN
175      SCOUH(l) »  »3  /  DELTD/  AREAC1)
         SCOIJR(t) *  CS  /  OElTD/  AREA(l)
         XNT(l) « TINBEO  /  VPCR03
         SR(1)  » RS   /OELTO /  VOLUME
         SRt«)  * cs  /  DELTO /  VOLUME
       ..MM
200   RtTURN
      END

(FLECS VEHS10N  22.U6)
                                      132

-------
(FLECS VERSION 22,ut.)
2fe.MAH.81   12l27|03  PAGE  00001
00001
00002
00003
00004
00005
00006
00007
00009
00009
oonio
0001 1
00012
000)3
oooiu
00015
00016
0001 7
00018
00019
00020
00021
00022
0002J
00021
00025
00026
00027
00029
00029
00030
000}1
OOOJ2
OOOJ3
00034
OOOJ5
00016
OOOJ7
OOOJfl
00039
00010
00041
00092
0004)
00044
00045
00046
00047
00048
00049
00050
00051
00052
0005)




C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C

C

C













C
C
C









SUBROUTINE SAVEIT(R, BDIV, BED, ELEV, C, OELZ, NBED,
1 NtLEM, NX£<5, R£sELN» STRESS, XYSO,OLDC,
2 ALEN,QHIN,QHOUT,CCIN,QV,AwiD,BWlD,VSET,OENs,D£LTO,DFi,
i PUR, TBEO)

THIS ROUTINE WHITES THE SIMULATION RESUUS TO THE RESULT FILE
(IOH 5) THAI HAS BEEN OPENED BY SERATHA

FORMAL PARAMETERS:
8 BED CONCENTRATIONS
BUIV ST*NOAH(> BED LAYER THICKNESS
BED BED THICKNESS
C WATER CONCENTRATIONS
OELZ STANDARD ELEMENT THICKNESS
ELEV SEGMENT ELEVATION (DATUM ELEVATION)
NBED NUMBER Of BED L*YERS
NELtM NUM9ER OF ELCMENTS
NXEO CURRENT TIME STEP (I*'i)
REStLN WATER SURFACE ELEVATION
STRESb SHEAR STHES3
XYSO THICKNESS OF THE TOP BED L**ER

CALLED 8Y| SER*TRA.

INCLUDE 'ELMslZ.PRMi

INTEGERS NXEQ

DIMENSION 8(MAXLEV,MAXCON-1 j ,8AVG(MAXLEV) , BEL(MAXLEV),
1 C(MXELEM,MAXCON), CMASS(MXELEM), CVOLM(MXELEM),
2 CTOTL(MXELEM), wELEV (MXELEM) , D (MXELEM, MAXCON)
3 ,QHIN(MXtLEM),OHOUT fMXtLEM),CCIN (MXELEM, MAXC UN),
« UV (MXELEM), AW 10 (MXELEM) , tJi*ID (MXELEM) , VSE t ( 3) ,
5 OE NS (3J,'JClN(MxELEM,MAxC ON ),QCUlJT (MXELEM, MAXCON),
6 CEL*V(MXEL£M, MAXCOff),OVC£L( MXELEM, MAXCON),
7 ULDC(MXELEM,M*xCON), DF?(4), OVD I F (MXELEn, MAXCON) ,
8 0 TBED ( MAXCON ), TREO ( MA XCON),BAL( MAXCON), OIF (MAXCON),
9 OCELAV(MAXCON), TO f 02 F {MAXCON )
DATA EPS1/1 .OE-30/
NELMPlzNELEM»i
NBEDP1 * NHED » 1

*** WATER CONCENTRATIONS ***

J * NELtM » l
WRITE(5) NX En,J,Nbeu,ELEV,OtLZr BO IV, XYSO, STRESS
REPEAT UNTIL (J .EH. U)
CMASb(J) s C(J,«) + C(J,S) » C(J,6j
SUM = C(J, 1 ) » C(J,2) » C( J,3)
WHEN (SUM ,GT. 0.0) CVOLM(J) s CMASS(J) / 3IJM
ELSE CVOLM(J) s 0,0
CTOTL(J) a CMASS(J) + C(J,7)
SELECT (J)
                                        133

-------
(FLEC3  VERSION  2?.06)
iai27:oj  PAGE   00002
0005U
00055
00056
00057
00058
00059
00060
00061
, , (NELEM+l) WELE.V (NELEMt 1 ) s HES£LN
. . (UMtRWISfc) WELEV(J) a «ELEV(J+1) • UtL2
,
, ,r IN
, J 3 J - 1
...F
IN
DO(KTl , HAXCON)
. ood*if NEUEM+I )
. . WH£N (K .LE. J ,OH. K ,EO, 7} D(I,K)SCd,K)
00062 . . ELSE
0006}
0006«
00065
00066
00067
00068
00069
00070
00071 C
00072 C
0007} C
0007«
00075
00076
00077
00078
00079
00080
00081
00082
0008J
0008U
00085
00086 C
00087
00088
00089
00090
00091
00092
0009 J
00090
00095
00096
00097
00098
00099
00100
001 01
001 0?
0010 J
001 0«
OU1 05
001 06
00107
00108
00109
f
•
, 0(I,K)=0.
. IF (CU,X-S) ,GT, l.OE-10) 0(I,K)sc(I,K)/c(I,K.JJ
	 FIN
,
. , ,F
UN I
1
wttl

* * *

..FIN
IN
Et5) (WELEV(J), (C(JfK)rK*i,MAXCON),cMASS(J),CVOLk'(JJf
CTOTL(J)>J*NELEMtl,l,«l)
E(5) dD(J,K),KsU,6),J«NELEM»l,l,«l)

BED CONCENTHAT IONS ***

BELEV s (NBED-1) * BOIV » XYSO + ELEV
J s
RtPl
NHEO
.AT UNTIL (J .E'J. 0)
BAvO(j) * B(J,l)*fl(j,«) t 8(J,2)*B(J,5) + 8 ( J, } ) *R (J , 6)
SELEC1 (J)

(NH&D) BEL(NHto) a BELEV
, (N9ED-1) SEL(NBEO-I) x BELEv - XYSO
fUTH£RWlSE) BEL(J) » 8EL(J»l) - BDIV
...FIN
J * J-l
..FIN
WW J
fE(5) (BEU(J)»(B(J,K),K«l,MAXCON.i),t)AVG(J),JsNHEO/l,-l
*** ELEMENT MASS »N0 rONvECTEO MASS ***
00 (J»1,MAXCON)
. OC£l_AV(J) s 0,

• '
,EL A v ( NELMH 1 i J ) = 0
;C I N (NtLMP 1 • J ) sO
. WCOUI (NELMP1, J)«o
. 00(1 al,N£LE«)
f
.
.
•
.
.
.
.
.
.
.
•
.
.
.
.
.
vULs*wlO(l)*riE.LZ*ALEN
XS=AW jo( I ) *OELZ
VPX&*AwiO( I ) * ALEN
ULMtAN s (OLOCd,J) + OLOC ( I + 1 , J ) ) /2 ,
CMEANa(CdiJ)tC(I + l»J))/2,
CEL*^(IfJ)»VOU*CMEAfj
'3CIN(I,J)aQHIn(l)»(CClN(IfJ)+CCIN(I»l,J))/2t*OELTD
WCOUT(T(J)=QH()ilT(i)»OELTf)*(CMEANt(OLfC(IfJ)»OLOC(I*l
CtLAV(NfcLMPl,J)sCEUAV(lMtLMP|,J)+CELAV(l,J)
ULlN(NELMPl»J)srJClN(NELMPl,J)+QClN(l»J)
f)CUUl(NELMPl,J)BQcOUT(NELHPt,J)fOcOUr(l,J)
ULEIAV(J) r OCELAV(J) » OCM£4N*VOL
K Ij
IMJ ,GT, 3) KsJ.J
WHEN (K ,£Q, H 1 w$30.
ELSE wgeVSE! (K)
w"EN(I ,EU, t) QVQBTMrQV ( 1 ) • (C f 1 i J) ^OU^C ( 1 , J ) ) /2,
                                         134

-------
(FLECS  VEKSION 22.46)      26-MAH.8]    12127103  PAGE  OflOOS
  001 10
  00111
  00112
  OOt 1 J
  ooi ia
  001 15
  00116
  001 17
  00118
  00119
  00120
  00121
  00122
  00123
  0012"
  00125
  00)26
  00127
  00)28
  00129
  001 30
  00131
  00132
  00133
  OOj 34
  00135
  00] 36
  00137
  00138
  00139
  001 UO
  ooi/2,
         .  WHEN (I ,EO.
      ,  .  .  ClVCTOP»OV(NfLEM»l )*(C(NELEM*l»J)+0(.DC(NfLEMtlf)J))/2.
      .....
            ,  UVCTOPa(UV(I+l)-wS*8Wll)(I+l)*»UEN)*(C(I+l»J)+ULDC(l»l
               FIN
                   , J)a(OVC8TM-UVCTOP)*DELTD
1.   .   (Cf U
 .   ...PIN
 ...FIN
»«4**t»««»«*
 CHANGE 3/26/81
                         , J)tOLOC(I»t,J)-OLOC(I,J) J/(Z,»OELZ)
      00 { Jsl
      WHITE (5) VOLUME
      DO (J=t,MAXCON)
      .   SALfJ) s GC1N(NELMP| ,J)-(1CUUT(NELMPI, J)+OCEUAV(J)
      .   DIF(J) « CELAV(NELMPJ,J)-BAL(J)
      ...FIN
      TBALsO.
      TOIF»0.
      DO (jB4iMAXCON)
      .   TH*U « TBAL t BALfJ)
      .   TOIF « TOIF t OIF(J)
      ...FIN
            ,) (BAL(J),J»l,M4XCON),T8AL
      t» BED SEDIMENT AND CONTAMINANT  (KG, PC)/EL£MENr  *»»
 DO
 .
 ,
 ...
 VP
 DU
         (Jst,M»xCON)
         oTBtU(J) * TBEO(J)
         IBEP(J) a 0,
         FIN
               t | )»AUF.N
         00 (l=l,N8EO)
            WHEN (J ,UI, » )
            .   UNSlTY'd ,(I-POR)/(B( I, 1 )/OEN3d) »B ( I , 2) /DENS r 2) *B ( l.3)/D£N3(3) )
            .   OELxBDIV
               IFtI.ElJ. NBFO) DELsXYSO
               VOLsOEL*VPXS
            .   CELAV(I,J)»P(I, J)*VOL*ON8ITY
            ...FIN
            ELSE CEUAVU, J)»CELAV(I,J-3)*8(1.J)
                                        135

-------
(FLECS VERSION 22. U6)
00166
00tb7
00168
00170
00171
0017Z
00173
0017"
00175
00176
00177
00178
00179
00180
, , TBED(J) s T8EO{J) » CEUAV(1,J)
, ...FIN
...FIN
no 
-------
(FLEC3 VERSION 22.46)
2B-JAN.f)2   10124130  PAGE  00001
00001
00002
00003
0000/4
00005
00006
00007
00006
00009
00010
00011
00012
00013
00014
00015
00016
00017
00019
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
000<47
OOOifl
00049
00050
00051
00052
00053



c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c

c

c


c
c
c
c
c
c
c





c
c
c
c
c
c
c


SUBROUTINE 8E'JDAT(UECAY, DENS, DFZ, OIAM, OSHR, 050, ECHO,
1 ErtODE, HLDEUK, MUMEHft, SCSHR, 30RBK, VSET,
2 OSORB)

THIS SUHROUTME 13 RESPONSIBLE FOB REAOING ANU PROCESSING THE
SEDIMENT CHARACTERISTICS.

FORMAL PAMAMETE^Sl
1>EC»Y ntCAY PARAM£!E«S
OENS SPECIFIC WEIGHT
DFZ VERTICAL DIFFUSION COEFFICIENTS
DIAM PARTICLE DIAMETERS
OSHR CRITICAL SHEAR STRESS VALUE FOR DEPOSITION
D50 MEDIAN »EO SEDIMENT DIAMETER
ECHO LHE PRINTER ECHO CONTROL VARIABLE (1*1)
ERODE ERuDABILITY
HLDEHR HOLDING ARRAY FOR ERROR NUMBERS (BYTE)
NUhERH NU»'HER OF INPUT ERRORS
SCSHK CRITICAL SHEAR STRESS VALUE FOR SCOUR
SORBK AOSOHBTION VALUES
DSORH • I;ESO»PTJOM VALUES
VSET - VERTICAL SETTLING VELOCITIES

CALLED BYlSERATRA
CALLESl PUffcRH

BYTE MLOERR(IOO)

LOGICAL*! ECHO

DIMENSION DECAY(6),I>FNS(3),OFZ(«),DIAM(3),03H«(3),EROPE(3),
t SCSHH(3),SOR6K(9),DSORR(9),V8ET(3)

....PARTICLE SETTLINE VELOCITY (M/SEC)

COL. 1-10.. ..VSET(l)... .SANQ SETTLING VELOCITY
n-20....V3ET(2)....SlLT SETTLIMP, VELOCITY
21-30. ...VSET(3),,. .CLAY SETTLING VELOCITY

f?EAO(l,l) (VSET(I),Ial,3)
IF(ECHO)
. WRITE(6,2)
. V.RITE(6,12) (VSET(I),I»1,3)
...FIN

....DENSITY (KS/M**3)

COL. 1-10, ...D£NS(t J... .DENSITY OF SAWD
n-20....ieNS<2)... ."Easily OF SILT
21-30. ...r-ENSO).,. .DENSITY OF CLAY

9EAD(1,1) (D£NS(I),I«1,3)
IF(ECHO)
                                        137

-------
CFLECS VERSION 22,a<>)
10»2«l3«  PAGE  00002
ooo5u
00055
0005»>
00057
00058
00059
00060
OOObl
00062
00063
00064
00065
00066
00067
00060
00069
00070
00071
00072
00073
00070
00075
00076
00077
00078
00079
00080
000«t
00092
00063
0006*1
00095
00086
ouoer
000«9
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
0010U
0010S
00106
00107
00106
00109






C
C
C
C
C
C
C
C









C
C
C
C
C
C
C








C
C
C
C
C
C
C








C
C
C
. »RITE(6,3)
. *RITE{6,12) (OENS(I),I*1,3)
...FIN
IF(0£NS(1) ,LE. 0.0) CAUL PUTERRt \ 7,NUMERR,HLDERH)
IFCOEN8(2) ,LE. 0.0) CALL PUT6 RR(ie,NIJMER*, HLOE«R)
IF(I)EN3(3) ,LE. 0.0) CALL PUTE««( 19, MJMEPR, HLOERR)

....DIAMETEH (METERS)

COL. 1-10. ...OlAM(l)... .DIAMETER OF SAND
11-20. ...DIAM(2)..,,01AMETE* OF 3ILT
21-30. ...OIAiMJ).., .DIAMETER OF CLAY
31-«O....D50.,.,...,MEr>IAM OEO SEDIMENT DIAMETER

READ(l.l) (DIAM(I),I«1,3),D50
IF(ECHO)
. «RlTE«>i'J)
. ^BItE«>,125 (r»IAMH),I»lr3)
. *«ITE(6,13) D50
...FIN
IF(DIAM(U t|.E, o.O) CALL PUTEHe(20,NUMEHR,HLDE«R)
IF(D1AM(2) ,LE. 0.0) CALL PUTESR (21 , NUMERR,HLDERH)
IF(OIA«(3) .Lfc. 0.0) CALL PUTERR(22,NUME«B,Hl_OERR)

....CRITICAL SHEAR STRESS FOR SCOUR (KG/M**2)

COL. 1-10. ., .SCSHRd) ,.,. CRITICAL SHEAR STRESS FOR SAND
11-20. ...scsn«(2) ,ti. CRITICAL SHEAR STRESS FOR SILT
21-30.. ,,SCSHK(3) ....CRITICAL SHEAR STRESS FOR CLAY

REAO(1,1) (3CSHH(I),I»1.3>
IF(ECMO)
. WHITE (0,5)
. ^RITE(6,12) (SC3HR(I),I«1,3)
...FIN
IF(SCSHRd) .LE. 0.0) CALL PJTERR (26. NUME«R,HLDE*K)
IF(SCSH«(2) .LE. 0.0) CALL "UTERR (27,NUMER»,HLOE«R)
IF(SC3H«(i) ,LE. 0,0) CALL PUTERR (26,NUME^» ,HLOERR)

....CRITICAL SHEAR STRESS FOR DEPOSITION («G/M**2)

CQL. l-lo.,..oSH«n).., .CRITICAL SHEAR STRESS FOH SAHO
11-20... ,osMR(2) . ...CRITICAL SHEAR STRESS FOR SILT
21-30. ,..OSHK(3)... .CRITICAL SHEAR STRESS FOR CL»Y

REAH(1»1) (DSHB(I),I»1»3)
IF(ECHQ)
. WRITE(6,6)
. *HITE(6,12) (DSHR(I), I»l,3)
...FI^
IF(OSHR(t) ,LP. 0,0) CALL PUTEH«(29,NUMERR,HL«E«R)
IF(n3HR(2) .LE. 0.0) CALL PUTEW
-------
          2H.jAM.rt?
                                  PAGE  noOD3
oot to
OOltl
00112
00113
00114
00115
00116
00117
oolis
00119
001'CH'fc(2)....ERur>AHILITY UF SILT
       21-30.,..EkiODt (3) ....EHijnAHILITY Of CLAY
IF(ECMO)
.   wRITF_(6,7)
.   WRI TE(<>, 12)
...FIN
IF(EHOOEd) .LE.
IF(EROi>E(2) ,LE.
IF(EKOOE(3) .Lfc.
                   0)
                   0)
                 0.0)
                        CALL
                        CALL
                        CALL
....VERTICAL  DIFFUSION COEFFICIENTS (M**2/SF:C)

  COL.
        l-10....0F2(n..,.COEFFICIENT
       11-20....0FZ(2)....COEFFICIENT
       2 1-30.... OFZ( 3)..,, COEFFICIENT
       3 1 -40.,.. PFZC 4)..., COEFFICIENT
                                    FOH
                                    FUR
                                    FOR
                                    FOH
                                        SAND
                                        SILT
                                        CLAY
                                        DISSOLVED
                                                    CONTAMINANT
READd»l) (DFZ
IF(F.CHO)
.   w«ITE(6,8)
.   WHITEC6,12)
  ...FIN

... .ADSOSBTION VALUES C2 CARDS)
                 IDFZCI>,I«1,3)
CARD *1
COL. 1-10.
11-20.
21-30,
31-40.
41-50,
51-60.
61-70.
71-80.
CARD «2
COL. 1-10..

.SORBKd).
.SORBK(2).
.S'JHHM 3) .
,30RBK(4) ,
.SORUM5) .
,SORBK(6) .
.SnKHK(7),
,SflRHK(8) .

,.SORBK(9),.

.KD VALUE
.HO VALUE
,KD VALUE
.SUSPENDED
.SUSPENDED
.SUSPENDED
.BED SAND
.BED SILT

,.BEO CLAY
                                       WITH SAND (M**3/KG)
                                       WITH SILT (M**3/KG)
                                       WITH CLAY (M**3/KG)
                                        SAND MASS TRANSFER RATE
                                        SILT MASS TRANSFER RATE
                                                               (1/S
                                                               u/s
                                        CLAY MASS TRANSFER RATE  (1/S
                                       MASS TRANSFER RATE (I/SEC)
                                       MASS TRANSFER RATE (I/SEC)

                                       MASS TRANSFER RATE tl/SEC)
  READd,!)  (SORHKI
                       r9)
....DESORPTION VALUES (2 CARDS)
CARD *
COL.







CAPO *<
COL.
1
1-10.
11-20.
21-30.
31-40.
41-50.
51-60.
61-70.
71-80,
>
1-10..

.OSORfld),
.nSOR8(2).
.DS'lPH(3).
.DSOWB(4).
.OSORH(5).
,OSOR8(6) ,
,OSOPB(7) .
.D30RHC8).

,.DSnRH(9),.,
                             ,KO VALUE WITH SAND CM**3/Km
                             ,KD VALUE wITH SILT CM**3/*G)
                             ,KD VALUE «ITH CLAY (M**3/KS)
                             .SUSPENDED SAND MASS TRANSFER RATE (1/S
                             .SUSPENDED SILT MASS THANSFE" RATE (1/S
                             .SUSPEMOEO CLAY MASS TRANSFER RATE (1/S
                             ,HED SAND MASS TRANSFER RATE (I/SEC)
                             ,8ED SILT MASS TRANSFER «AT£ (I/SEC)

                             ,8ED CLAY MASS TRANSFER HATE (1/SEO-
                           139

-------
(FLECS VERSION 28,06)
iQ|2Y EXCEPT
FOR RAOIOMJCLIOE DECAY, IF GIVEN, THE
REMAINING PARAMETERS ARE NOT TO BE
SUPPLIED, PESTICIDE ONLY ci/'sea
21-30.. ,.OF.CAY(6)..,.VOLATIZATION DEGRADATION RATE,
PESTICIDE ONLY (I/SEC)
31-40. ...PH... 	 .DEGREE OF ACIDITY OF ALKALINITY
41-50.... AM. ........ SECOND OROER ACID RATE CONSTANT
FOR HYDROLYSIS
51-60....AKU 	 SECOND OROER BASE R»TE CONSTANT
FOR HYDROLYSIS
61-70, ...AKN.,. 	 SECOND OROER HATE CONSTANT OF NEUTROL
REACTION *ITH WATER

RADICAL OXYGEN FOR OXIOAUUW
CARD #2
COL 1-10,.,.R»2.... 	 CONCENTRATION OP FREE RAPIC'L OXYGEN
U-20,.,.AKBIO,,,,,,,SECONO OHOER RATE CONSTANT
8100EGRAOAUON
21-30. ...8IOMAS..,,,.8IOHASS PEH U*IT VOLUME

RE AD (1,1) DEC4Y(l),nECAY(2),DECAY(6),PH,AKA,AKB,AKN,AKOK,R02,
1 AKBt(*,BIOMA9
DO (I«3,5) DEC»Y(I) * 0,0
wH£N COECAY(2) .NE. 0.0)
, IFCECHO) wr
-------
     22.46)
28-,IAN.«2   10(24134  PAGF  00005
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00239
00239
00240
00241
00242
00243
00244
00245
00246
00247
0024*
00219
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00260
C
1
2
3
4
5
6
7
e
9
10
1
2
11
1
2
3
4
5
6
7
fl
9
1
2
3
4
5
6
7
a
9
12
1
2
13
14
15
1
2
3
4
5
6
16
C

FORMATOF10
FORMATC 1HO|
FORMAT( 1HO,
FORMATdHo,
FORMATC 1HO,
FOMMATUHO,
FOHMAT( 1HO,
FORMATUHO,
FORMAT
14X,
l«X,
(1HO,
1PE12
1PE12
.0)
13X,
13x,
I3v,
13*.'
13x,
13X,
13x,
13X,
•
•
5
,'
5, '
'PARTICLE SETTLING VELOCITY (rt/SEC)')
'DENSITY (KG/M**3)')
'DIAMETER (METEKS)')
"CRITICAL SHEAR STRESS FOR SCOMR (KG/M**2)')
'CRITICAL SHEA* STRESS FOR DEPOSITION (KG/M*»2)')
'ERPOARIHTr (KG/M**2/SEO ' )
'VENTICAL DIFFUSION COEFFICIENTS (M«*2/8EC)')
'ADSORPTION KO VALUES')
'DECAY PARAMETERS'/
•
•
9
•
9
•
HADIONIJCLIOE DECAY (I/SEC)'/
TOTAL »EC*Y (EXCEPT RAuIONUCLDE) - (I/SEC)')
FORMA T(l HO, 13X, 'DECAY PARAMETERS'/
14X,
14X,
14X,

14X,

14X,

14X,
14X,

14X,
14X.
1 4X,

14X,
14X,
14X,
1PE12
1PE12
1PE12

1PE12

1PE12

1PE12
IPE12

1PE12
1PE12
1PE12

1PE12
IPE12
1PE12
•
•
•

•

t

•
•

t
,
.

*
*
*
5
5
5

5

5

5
5

5
5
5

5
5
5
,'
,'
,'

,'

,'

.'
,'

,'
, '
, '

* '
> '
,'
•
•
•

«

•

•
«

•
»
.

0
.
•
FORMAT{ 14X, 1PE12
14X,
14X,
FORMAT
FORMAT
F.ORMAT
14X,
14*.
14X,
14X,
14X,
14X,
FORMAT

END
1PE12
1PE12
( 1 IX,
(14X,
(1HO,
1PE12
1PE12
IPE 12
1PE12
1PE12
1PE12
(1HO,


•
•
1
5
5
P
,'
,'
El
•
*
2
1PE12
13X,
*
•
;
*
•
t
i


5
5
5
5
5
5
r
»
,
r
r
f
3*,




»
•
•

•

•

»
«

•
*
•

,
,
•
t
*
•
*
•
9
•
9

9

9

9
9

•
9
t

,
,
9
KAOIONUCLIOE DECAY (I/SEC)'/
PH . DEGREE OF ACIDITY OR ALKALINITY (PH)'/
SECOND ORDER ACID HATE CONSTANT FOR HYDROLYSIS"
' (AKA)'/
3FCOMD O^DEh QASE RATE CONSTANT FOR HYDROLYSIS'
' (AK8)'/
SECOND ORDER RATE CONSTANT OF NEUTROC REACTION'
I WITH WATER (AKN)'/
CHEMICAL DEGRADATION DUE TO HYDROLYSIS'/
SECOND OWOEW RATE CONSTANT OF FREE RADICAL'
' OXYGEN (AKOX)i/
CONCENTRATION OF FREE RADICAL OXYGEN (B02)1/
CHEMICAL DEGKAIM TION DUE fO OXIWATION'/
SECOND ORDER "ATE CONSTANT FOR 4IODEGPADATION '
' (AKBIO)'/
HI01ASS PER UNIT VOLUME (^IDHAS)'/
^lODEGRAOATION' /
VOLATILIZATION' )
C t O A XI fl 1 J
J t 999^ '•U •
•
9
5
5
SILT'/
CLAY')
.'...MEDIAN RED SEDIMENT DIAMETER')
.'...DISSOLVED CONTAMINANT')
•MASS TRANSFER HATES (I/SEC)1/






•
•
•
•
•
•
•
.
.
.
.
.
SUSPENDED SAND'/
SUSPENDED SILT'/
SUSPENDED CLAY'/
SAND ATTACHED TO THE BED'/
SILT ATTACHED TO THE BED'/
CLAY ATTACHED TO THE ^EO')
•OEStJHPTIOM KO VALUES1)








(FLECS VERSION
                               141

-------
(FLECS  VERSION  22.16)
13-MAR.ai
PACE  ooooi
oonoi
00002
ooooi
o o o o H
00005
OOOD6
00007
00006
0000"'
00010
0001 1
00012
0001 3
0001U
00015
00016
00017
00018
00019
00020
00021
00022
00025
00021
00025
00026
00027
0002B
00029
00030
OOPil
OOOJ2
OOOJJ
ooo3«
000 J5
OOnib
00037
00039
OOOJ9
000*40
OOOt 1
OOC«2
OOOUJ
000««
00015
OOOIh
OOOfT
OOOIfl
00019
00050
00051
00052
0005J




c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c

c



c
c
c




c
c
c

c
c
c


SUBROUTINE SEDIMEUB4R, ALEN, CCIN, DELTO. If J» MELE'S
1 QHIM, QHOUT, OVf SO, SH, *LFA, BETA, V£L 1 ,
2 VEL2, V3ET, OELZ, BWlO, A^IO, DEPTH,
i 8ETAI, BtTA2)

THIS ROUTINE CALCULATES COEFFICIENTS OF CONVECTION, DIFFUSION,
DECAY AND SOURCE TERMS IN THE SEDIMENT TRANSPORT CONVECTION
-DIFFUSION EQUATION

INPUT PARAMETERSl
A8AR • AVERAGE AREA
CCIN • CONCENTRATION OF INFLOrt
OEITD • TIME STEP IN DAYS
DEPTH - DEPTH ()F RlVEP SEGMENT
I - ELEMENT INDEX
J • PARAMETER INDEX
NELEM • NUMBER OF ELEMtNTS
OHIN - INFLOW DISCHARGE
QHOUT • OUTFLOW DISCHARGE
0V • VERTICAL DISCHARGE
SO - SEDIMENT DEPOSITION RATE, ( KG/M* *3/D A Y )
SR - SEDIMENT fRQSIUN RATE, ( K G/M* *3/DA Y )
OUTPUT PAHAMETERSl
ALFA - DECAY TERM, (I/DAY)
BETA - SOURCE OR SINK TERM, (KG/M* *J/OAy )
PtTAl • INFLUENT SOURCE TERM FOR THE I-TH NODE, ( KG/M* * J/DA Y )
PETA2 - INFLUENT SOURCE TERM FOR THE Itl-TH NODE* (KG/M**J/D
VEL1 • FIRST CONVECTIVE T£RM, (M/OAY)
VEL2 - SECOND CONVECTIVE TERM, (M/DAY)

CALLED BY TRANSP.

INCLUDE 'SYiELMsU.PRMi

DIMENSION ABAR(MXELEM) , AREA (MXELEM ) , CC IN (MXELEM, MAXCON) ,
| OHIN(MXELEM), QHOUT(MAELEM), QV ( MXF.LEM) , SO ( MXELE* , 6 ) ,
2 SR(6), VSET(3), 8^ ID ( MX£L£M ) , A»UO( MXELEM)

CONVECTIVE IERM WITH CORRECTION FOR A CONTINUOUS SETTLING FLUX

AQ = QVU }
VELla(A(J-VSET(J)*0WIO(I)*ALEN)/ABARtI)
A U s 0 V ( 1 t 1)
VEL2»(AO-VSET(J)»flWiO(Itl)*ALENj/AHAR(I)

DECAY TERM

ALFA s UHoUT(I) / (ABAR(I) * DELZ)

SOURCE OR SINK TEHM

BETA=SR( J) - SD(I, J)
8£TAlsQHINU)/(AeAR(I)*OELZ}»(CCTN(I,J)/3.*CClN(I+l,J)/6.)
                                        142

-------
CFUECS  VERSION 2J.U6)      1J-M4««61    13U9JS8  PiGE  00002
  00059
  00055          R6TURN
  00056          END
          (TLECS  VERSION 22,
-------
(FLECS VERSION 22.Ob)
2».JA'4«fl2   10J16I11  PAGE  00001
QQOOt
00002
00003
00004
00005
00006
00007
ooona
00009
oooio
00011
0001?
00013
00014
00015
00016
00017
oooia
00019
00020
00021
00022
00023
00024
00025
00026
00027
0002*
00029
00030
00031
OD032
00033
0003'!
nooi5
00036
00037
0003S
00039
00010
ooo«l
OOOU2
00043
r> 0 0 1 '»
00045
000'J6
000«7
00018
000«9
00050
00051
00052
00053
C
C**<
C
C
C
c**<
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
c»*
C 1
C
C
C
C
C**
C 2
C
C
C
C**
C 3
C
C
C**
C a
C
C
C
C
C**
C 5
C
C
C
C**
C 6
C
C
tm,n$E«ATRA.FLX

VE«SION| DRIED CHANNEL OPTION
WITH SELECTION FOR IMPLICIT SETTLING VELOCITY SCHEME
o» SUPFHPOSITION OF SETTLING VELOCITY SCHEME
r*******t****«********************************+***»***»**************


THI3 COMPUTER PWQGPAM, SERATRA, IS AN UNSTEADY, TWO-
DIMENSIONAL (LO»G1TUDINAL ANO VERTICAL) M(lt>EL TO SIMULATE
SEDIMENT-CONTAMINANT TRANSPORT IN RIVF.HS AMD RIVER-RU"
RfcSF.WVOIRS.

THE MODEL MAS GENERAL CONVECTION. DIFFUSION EUUATION3
«ITH DECAY ANO SINK/SOURCE TERMS *ITH AHPROPRIATE 80IJNOARY
cnNr>nifj'4S.

SERATWA UTILIZES THE FINITE ELEMENT COMPUTATION METHOD KITH
THE GALER*!^ WEIGHTED RFSIOUAI. TECHNMUE.

THE FOLLOWING WPPflHTS OESCHI8F. 3E«ATHA MODEL FORMULATION, IJSEH'3
MANUAL AMD giME MUOEL HESULTSi



"STUDIES OF COL"HHI* RIVE» WATER OUALITf-OEVELOPMENT OF
MATHEMATICAL MOnfLS FOH SEDIMENT ANO HAuIONUCLIOE TRANSPORT
ANALYSIS." BNwL-3-1'52. HATTELLEr PACIFIC NOHTH^EST
UAHOHATOHIES, P1CHL»"">. 'tA.

OMtSHI,r. 1977, "FINITE ELEMENT MODELS FOB SEDIMENT A^O CHNfAHlNANT
T«AM3POPT IN SURFACE WATE^S-'TRANSPORT OF SEDIMENT ANO RAOJ ONUCLI.IES
IN THE CLINCH WIVEW," HN»L-2227. HATTELLE, PACIFIC NORT"xFST
LAtJOHATURlES, PICtUAHO, *A.

ONISHI,Y. 1977, "MATttEMATICAL SIMDLATinr) UF SEDIMENT \NO RAOIH.
NUCLIOE TRANSPORT JM THE COLU^UIA RIVFH." 8NWL-2229, HATTFLLF,
PACIFIC NOKFHwEST L»HOPATnRIE3, HIGHLAND, WA,

ONI3HT,Y.. n.L. SCHkeiHEK AND R.8. CUOEIL. 19f9. -M » THEM » T I C *L
SIMULATION UF SEDtMEMT ANiJ RAO IINHCLIOE TRANSPORT IN THE CLINCH
RIVE^, TENNESSEE," ^HOCEEDTNGS OF ACS/CSJ CHEMICAL CONGRESS,
HONOLULU, H»K»H» A"«IL 1-6. 1979, "CONTAMINANTS *N° •>En IMENT 3" ,
k,4. MAKER (F.D.), ANN ARIOrf SCIENCE PllHLl5HE»S, piC,, k^N ARBOR, MI,

ONISHI,Y,, 3,*, BW01N, A.H, OLSEN» M.A, PARKHURST, S,E, '''ISEi ANO
H.H. WALTERS, 1979. "HETHUDDLOGY FOR OVERLAND AND INSTREA* ••IISRATIOM
ANU RISK »SSESS-«ef
-------
(FLECS VERSION 22.16)
19114(11  PAGE  00002
0005"
00055
00056
00057
0005f
00059
00060
00061
00062
OOCo3
00061
00065
00066
00067
00060
000b9
00070
00071
00072
00073
00071
00075
00076
00077
00079
OOP79
00080
00081
000«2
00083
OOOU4
000«5
00006
000*7
00096
00089
00090
00091
00092
00093
00094
00095
00096
P0097
00098
00099
00100
nomi
00102
00103
00101
00105
OOJ06
00117
ooioe
OOinq
c
c**
C 7
C
C
C
C
c
c
c
c

c


c



c

c


c
c







c

c







c






c
c

c
c
c
PA

ON
SF,
NO


CA






1


1
2




1



1
2
3
a
5
6



i
1
1
1
1
1
I



i
1
2
3


1



              PACIFIC NORTHWEST LABORATORIES, RICHLANO,  HA,

          C 7 ONISHI,Y. ANO 3.E. wISE. 1979, "USER'S MANUAL  FOR  THE  I*
              SEDIMENT-CONTAMINANT TRANSPORT MODEL, SERATRA,"  BATTELLE,  PACIFIC
              WORTHIEST LA80R*T'lHTtS, RICHLANU, rt»,


              CALLSl HEDOAT, COLAPS, OIMOAT, FCOOE, HYOOAT,  MYDFLO,  1CFLO,  1NIPAT,
                     ROSFLO, aOO./
                DATA SECYR /31536000/
                OATA tCHO/.FALSF,/
                DATA FERK'IR/, F»L8E./
                DATA ZE*0/t.O*-tO/
                DATA SAVECH/, FALSE, » .FALSE ., .FAl SE ., .FALSE ,. .FALSE ,,. FALSE ., .FALSR
               1... FALSE.,. FALSE.,. FALSE./
                CALL SrPTUPCBASE, OEV, ECHO, FNAME, FTYPE, GUIC,  JNFLO,  ISTRT,
                            MFUST, OUTFLO, SMETH, UUIC,  SAVEChf  J3EG,
                      NSTF,PS,"SEG, ITP»T, ANALY3,n£LTH, AN»L^T,DEP1I
                      PELEV)

                *** BEAD INPUT DATA FDR BEGINNING SEGMENT ***
                NUMFRR • 0

                THIS IS THE Rt'STAWT OPTION.
                                         145

-------
(FLECS VERSION 23.46)
00005
00110 >
00111 C
"0112 e
00113
00114 1
00115
00116
00117
00118
00119
00120
OQU1 1
00122 2
00123
00121 1
00125
00126
00127 C
00128 C
00129 C
00130
00131 C
00132 C
00133 C
00131
00135
00136 1
00137
00138 1
00139 C
001 '10
001 '41
001U2
001«3
OOlttiJ C
001 '15
00146 C
00147
001«8
001UAT(ANALMT, ANALYS, OELTH, ECHO, HLOER«, ITPRT,
•'SF.G, NSTEPS, NUMERR, SIMLEN, OEPMIN)
PELTO»OELTH/SEC»AY
IF(ECHO)
. CALL TiME(NOfc)
. *RITE(6,3) ISTRT, NO*
. . «F I ^
CALL OIMDAT( ALE"-*, AREA, ROIV, dEO, OLZSAV, ECHO, ELEV, HLDERR,
ISTMT, N«Ei>, NELEM, NUMERR, PELEV, FOR, RIVER,
XYSO, EL)
CALL SEOOAT(UEC*Y, DENS, OF?, 01AM, OSHR, 050, ECHO, EHOOE,
HLOEP.R, NUMERR, SCSHK, SORCK, VSET, oso^e)
CALL PH01NPCECHO, JULIAN,KAY1,KAY2,PCOEF)
CALL BtooATCti, ECHO, NBEP>, AREA, »OIV,OENS,POR, XYSO, TBEO)

READS INITIAL CONDITIONS FOH SEDIMENT AND CONTAMINANT

CALL »****************************
SEGMENT LOOP *
t*** *************************
)0 ( I SEG»ISTH1 , >tSEG)
CALL OIAG(F.CM02, ECHP3, iCHO'J, ECH05, ECHOfe, ECHO?, F.CHOH,
ECHH9, ECH010, ISEG, JSEG, SAVECH)
FOBMATCMSIOO*, 'SEGMENT NO.',I3,l«,flAt)
HESET-l'ATA-1 I M6 -CONTROLS
CAVGMxaO.O
JULSEC « JULIAN * stcn*y

UNLESS (IStG .E'J. 1)
, IF JECHO)
. . CALL TIME(MO-)
. -IHITF (6,3) ISEG, NO*
                                          146

-------
(FLECS VERSION 22,<46)
2H.JAN.-J?    10J16I11
0000«
00166
00167
00168
001
r
f

f

]























...FIN
FFRHQP. o .FAtSE.
NUMtRH * 0
CALL OI^OATULEN, AREA, Bi'iv, BED, "U/SAy, ECHO, ELEv, HIDEPft,
ISEG, NHEO, NfLE*, MUhEHR, PPLEV, POR, «IVE9,
XVSO, Ft)
C»LL SEDDAKDF.CAY, OENS, OFZ, 01AM, DSHR, 050, ECHO, ERODE,
HLDERR, MUMER^, SCSHR, SOHBK, VSET, OSOR«)
CALL flenOaTO, £CHO, N8EU, ARE*. HOI V, DENS, P0», XYSO, THED)

REAUS INITIAL CONDITIONS FOR SEOIMgMT AND CONTAMINANT

CALL wT^DATfC, ECHO, NELEM)
CALL TRBOAT(ECHO, MLOERR, NELEM, NTRI9S, NUMEPR,
SIMLE*, TBBOPn
CALL HYOOAT
DO (K«1,MAXCON)
*** NELEM VALUES OF CL*ST MUST RE CALUCLATED FROH NELEH+l
VALUES OF C **»
IF (K .LE. 3 ,OR. K .60, 7)

PROVIDES A CONSISTENT INITIAL CONDITION FOR THE DELZ DEFINED
IN HynpAT - 80TH ^OOAL VALUES (CNOOEsC), A^n ELEMENT
AV£HA«ES (CLAST»CULO)

CALL COLLAP(ALEN,AREA,C,DELZ,EL,IELM,K,N(iLEM,CLA8T»TMASS,AWID,
V3GT,OFZ,CNOOE, XSA«EA)
..^1N
..FIN

DIAGNOSTIC «PI TES

IF (ECM05)
wRiref6, isou)
WRITE (6, 1510)
"RITE (6, 1520) (1, AREA(I),ELCI), AHAR( 1), A*ID(I), 8*10(1),
XSAREA(/),TMASS(J), 1*1, NELEM*!)
f»RlTE(6, 1530)
•«niH(6,is20) (i, (Cd.J), J»i, MA XCON ),i»i, MXELEM)
                                           147

-------
(FLEC3  VERSION 22.46)
23-JAN.82   10116111  PAGE  00005
00222
00223
00224
00225
00226 1500
00227 1510
00226 1
00229 1520
00230 1530
00231 1540
00232 1550
00233
00234
00235
00236
00237
00239
00239
00240
002"!
00242
00243
00244







































WRITE (6, 1540)
*RITE(6»1S2U) lit (CNODE (I» J) ,J«l,MAXCON),I»l,NF:LEilOX,|l-HA3S')
FORMAT(2X,I5,3X,1P7E15.4)
FORMATC'ONQDAL CONCENTRATIONS PRIOR TO COLLAP')
FORMATCONOOAL CONCENTRATIONS KOLLOKING COLLAP*)
FORHATCOELEHENT AVERAGE CONCENTRATION FOLLOWING COLLAP')
..FIN
0 (I«l,NELEM)
00 (J»1,MAXCON)
. COLO(I,J)»CLAST(I,J)
. C(I,J)BCNOOE(I,J)
...FIN
..FIN
DO (jBl,MAXCON) C(NELEM+l, j)»CNODE(NELEMti , J)
00 (jBl,MAXCON) COLO(NELEM»1»J)BO.O
IF(NELEM*1.LT,MXELEM)
. DO (I*NELE*+2,MXELEM)
. . DO (J»1,MAXCON)



• . , COLD(I.J) • 0.0
• . . C(I,J) • 0.0
	 FIN
00246 	 FIN
00249 . . ...FIN
00250 . ...FIN
00251 . CALL FCODE(FNAME, BASE, ISEG, FTYPE, OEV, GUIC, UUIC)
00252 . OPE
•<( UN IT»5, NAME »F NAME, TYPE" 'NE»',FOrt MB 'UNFORMATTEU'!!
00253 . OPE N ( UNI T»9, MAMF» 'R5TRT.F I L',TYPE»'NE*', FORM* i UNFORMATTED' )
00254 . WRI
00255 C
00256 C . ***
fE(5) ISfcG

CONVERT INPUT VALUES TO THOSE UNITS USED HY MODEL ***
00257 , 00 (J»l,3) VSETtJ)ovSET(J) * SECDAY
00258 . 00 (J«l,4) CFZCJ)BOFZ(J) * SECOAY
00259 . DO
00260 . DO
00261 . DO
00262 C***********
00263 C .
(I»l,6) DECAYCI) ' OECAY(I) * SECDAY
(184,9) SORHKCI) » SORBK(I) * SECOAY
(I»4,9) OSORH(I) • OSORB(I) * SECOAY
**********************************
THE STEP LOOP *
00264 C*********************************************
00265 C

00266 . NXE8 • NFRST
00267 . IF
(f'XEQ.E'J. 1 )
00266 , . PTOPTH » <>EPTH
00269 . . PTOELZ » I'ELZ
00270 . ,
^EL^PT B NELF.1
00271 . ...FIN
00272 . ETI
00273 . ETI
IE B NX£U - 1
^E » ETi^t * DELTH
00274 . UNTIL (NXE'J .GT, NSTEPS)
00275 . . IF (IS1 ,E'J. 1) xRITEUl.'J) ISEG.^XEO
00276 4 . . FORMATC SEGMENT »',I3.' TI*E STtP',110)
00277 . .
ETIME * ET1MF. + OELTH
                                          148

-------
(FLECS VERSION 22,46)
2R.JAN.82   10116111  PAGE  00006
00278 C
00279
00280 1
00261 2
00282 3
00293 C
00284
00285 C
00286
002*7
00296 1
002«9
00290
00291 1100
00292
00293 1110
00294 1
00295 2
00296 3
00297
00298
00299
00300
00301 C
00302
00303 1
00304 2
00305 3
00306
00307 9999
00308
00309
00310
00311 1000
0031?
00313 1010
00314 1
00315 2
00316 3
00317 4
00313
H0319
00320
00321 1020
00322
00323
00324
00325
00326
00327
00328
00329
00330 1560
00331 1
00332 2
00333 1570
























































*** UPDATE THE FLOW AND CONCENTRATION ARRAYS ***
CALL HYrFLOfALEN, ARE», AK-II), OELZ, DEPTH, 050, EI.EV,
ENDHYO, ETIrtE, FERROR, HR*D, Nf.LEM, K5"*«I, PELEv»
IJHIN, aHouT, 'iv, RIVER, SLOPE» STRF.SS, TE*PR»
VEL, VOL, DEPMIN, XSAREA, 8*10, AIM", <)lr CROSEc)

IF (FERHOH) HEPORT-FATAL-ER90R-ANn.STOP

IF (NTR18S ,r,T, 0)
CALL TRBFLO(CTR8, CTHIH, ENOTfll, ETIM£, FERROR, DEPTH, NF.LEM,
NE»i'JI» NE*THH, QHIN, TWBOPT, DEP*IN)
IFfECH03)
WHIT£(6, 1 100)
FnRMATCOAFTER TRHFLO, MASS FLUX VALUES OF CTRB')
NKITE«>, 1110)
F(i«*»AT( IOELE^ENT NO, ' , 2X, 3(3X, 'CO^C. OF • , 4X) , 3( 1 X, 'CONC, •
'A3SOC.',3X),2X,'CONC*MINANf '/1 3X,' SUSPENDED SANOMx*
•SUSPENDED SILT', u, 'SUSPENDED CLAY', 3x,'*iTH SAND», &x,
'WITH SILT', 6X,'WITH CLAY', ttX, '01 SSOLVEU CONC,1)
wwtTE(6,1020)(I,(CTRH(I,K),Kat,MAXCON),lal,NELEH)
..FIN
IF (FEftROR) REPORT-FATAL-E3ROR- AND- STOP
..FIN

CALL ICFICKCCIN, DEPTH, DELZ, 050, ENOIC, ETIME, FERROW, INFtO,
ISEt'jNELC'^jNE^ICj'lHlN, 01, PEPSIN, ALEN,
UEL, UWIO, XSAREA, A^EA, ASID, OFZ, VSET,
ELfELEV.PELEVjRlVEWji'lE^OIj^EwTHB)
IF (ECHO?) XRITE (6,9999)
FO»HAT( '********»** IN SE»ATRA TIME LOOP **»******•)
IF(fcCHO,») WffUE (6,4) ISEG, NXEU
IF (ECH03)
. WRITE (6,1000)
. FORMATCOAFTER ICFLO, CCIN')
. "RJTF (6,1010)
. FQPMJT('0',2X, ''JOOE ND,',2X,3(3X,'CONC. OF ' , 4X) ,3(,1 X, 'CONC, '
. ' AS30C, ',2X),?X, 'CONTAMINANT'/lX, 'FKOrt BOTTHM'.IX,
. 'SUSPENDED SAND', IX, 'SUSPENDED SILT ', 1 X ,' SUSPENDED CLAY',
. 3X,'"tirH SAND', 6*, 'WITH SILT' >6K, 'WITH CLAY ' , 4X, ' OlSSOLVFO ' ,
. ' CO.'C1)
. NKlTF(6,1020)(J,(CCIN(J,K),Ksl,MAXCON),J»l,NF.LEH*l)
. IF (FE^wnH) REPORT-FATAL-ERPOK-ANO.STOP
...FIN
FORMAT(2X,15,2X,1P7E15,5)
IF (EC*06I
, ''»l">ELZ
, ^PJTE (6, 1570)
. «")ITE(6,101(J)
. "IBITIE (6, 1020) ( J, (C ( J,K) ,Ksl ,fi*XCO.^) , J» 1 ,NELMPT+1 )
. "WJTE(6, 15«0)
. "iRi TE (6, 1 1 1 o )
. "*RITE(6, 1020) ( J, (COLD(J,K) ,KS1,-UXCON) , J»l ,NELMPT)
. FOHHMC '01MMEOIATELY P"IiJR TO ROSFLO, FOLLO^IMG ICFLO'X
•OPTOPTH a',E12.4,» 'JEL^PT «'»IS,' PTPELZ *',E12,4/
' OFPTH «',E12.4,' N6LEM "',15,' OELZ 3',E12.<«)
, FOR! AT( IONOUAL CONCEMTMAT10NS PRIOR TO R'JSFL"')
                                        149

-------
(FIECS VERSION 22.46)

  00334    15PO .  .
  00335         .  .
  00356         .  .
  00337         ,  .
  00339         .  .
  00359         .  ,
  003'tO        1.  .
10116111  PAGE  00007

            CONCEMTHATIONS PRIOR  TO  H03FL.O')
                       FORMATt
                     IF  (DEPTH  ,GT.
                     .   T  «
                     .   IF  r-XEJ  ,GT.  1  .AND. T .ST. ZERO)
                     .   .   CAUL
              ....   00(J«1,
003«2         .....
003a3         	
oosua         	FIN
003u5         	UN
00346         ....   IF (ECH06)
003<»7         .....  "PITE(6,
00348         	  WRITEC6.1010)
00349         .....  *RITE(6,1020)  ( J, (C ( J, K ) , K*l , MAXCON) , .
00350         	

00352         II..!  >»aire(6.1020)
00353    1590 .....  FOR*AT('ONDOAL CONCE'XTHATIONS FOLLOWING
0035U    1600 .....  FOWMAT('OELEM£NT AVF.M4GE CONCENTRATIONS FUCL'JuIUG  S05FLU1)
00355         	FIN
00356         ,  .   .   ...FIN
00357         .  .   .   COMPIiTE-BEP-ANO.WATEM-SlJRPACf-EUEVATIONS
00358         	FIH
00359   C     .  .
00360   C     .  .   *** AVERAGE  THE  INFtO*  CONCENTRATI0't8 I'^TU THE SEGMENT  HY
00361   C     .  .        INTO  ACCOUNT  THE T»IHUTA»Y INPUT,
00362   C     .  ,
00363         .  .   IF  (DEPTH  ,GT, HEPMIN)
00364         .  .   .   «MEN  (NTRIBS  ,f3T.  0)
00365         ....   IF (NE*TR3  .OH. NEwlC .OR. '4F.s
00366         .....  DO  (K«1,1AXCON)
00367         	DO  (Jsl,NELEMtn
003r>S	,  COlJfiiY(J) a CCIM(JfK)
00369         ......   ..,'
00370         	DO
00371         .......
00372         	
00373   C     	
0037U   C     .......  NQTEJ  C^ASS 13 IN (KG/n*»3)
00375   C     	
00376         .......  "HEN (J.F.U.I)
00377         .	WHEN  (K.E-1.7)
00378         	CCINU,K)aCMASS

ooseo         .  I   ......   I..FIN
00361         	EL"5E
003«2         .........  KKSK
003B3         	   ...  IF(K.£T.3) KKaKK-3
003«4         .........  COEFaO,
003«5         .	"SaVSET(KK)*AKEA(1)/(AwIO( 1 )*AL£N)
003«6         .....
00387         	
003»*         .....
                                          150

-------
(FLECS  VERSION  22.
10116111   PAGE   OOOOR
0039t)
00391
00392
00393
00394
00395
00396
00397
00 J9B
00399
00400
00401
00402
00403
04404
00405
00406
00007
oo4oa
oo
-------
IFUECS VERSION 22.46)
28-JAN.62   10116111  PMJE  00009
00446
00447
00448
00449
00450
00451
00452
00453
00454
00455
00456
00457
0045B
00459
00460
00461
00462
O0'<63
00464
00465
00466
00467
00468
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483
004A4
004H5
00486
00487
00468
00489
00490
00491
00492
00493
00494
00495
00496
00497
0049«
00499
00500
00501
,
1.
1700 .
1710 .
1.
1720 .
,
,
1.
C*******
C
C
*
2000 .
C
c*******
C
*
C
.
C
*
C
C
C
,
i.
2.
C
C*******
C
C
,
1.
2,
C
c*******
C
C
,
C
,
C

r.
2.
3.
.
C
.
s
•
,
,
%
,
. . WHITE(6.1720) (l,ARF«(t),ABAR(I)rA«CD(I),H(ilII)(I)f :JV(t),«HIN
. . OHOUT(I),1«1,NELEH*1)
, . FORMATCOGEOMETRY AND DISCHARGE INFfJ PRIOR TO TRANSP')
, . FOH*AT( ' OELEMENT/SOOE1 »6X» ' AREA' ,9X, ' ASAH' , 1 \X, ' A^IO* , I IX, '
, . 12X| '0V ' , 12X, 'QHIN* | 1 IX, 'UHOUT ' )
. . FC'««AT(2X,15,3X,1P7E15.4)
. . . ,F IN
. . CALL TRAN9P(FERROR,PCOEFF,BVIID,AWIP,AHAR, DEPTH, OLDC,CCHO«,
. . CROSEC,ECHQ7, ECH08, ECH09)
**********************************************************
. . CHANGE 4/2/81
, ,
. . IFIECH05}*HITE(6,2000)UC(I,J),J«1,MAXCON),I»1,NELE1M)
. . FQPMAU'OAFTER IRANSP'/50(U,IP7E15.5/))
, ,
***************************************************************
. .
. . IF (FERROR) REPORT-FATAL-ERROH-AND-STOP
, ,
. . COMPtJTE-BEO-AMO-WATER-SURFACE-EUEVATIONS
• f
. ...FIN
,
. *** SAVE THE RESULTS OF THIS TIME STEP, IT WILL BECOME INPUT TO
. THE NEXT SEGMENT ***
. WRITE(OUTFLO) OEPTH,OELZ,NELEH» (OHOUT (K) , XSARE A(K) , AWIO(K) ,
, K»l,NELEM),((C(L,K),K«l,MAXC'JN),L»l ,NEUE*+1) ,
, ((QLOC(l.»K),K»l,rtAXCQN)fL«l,'sIELEH+l)
,
A***-*****************************************************
. CHANGE 7/27/81
,
, WRITEC9) OEHTH,nELZ,N£l.EM,(':>HO(.IT(K),XSAHEA(K),AWIO(K),
. K«l,NELE^),((C(L,K),K«l,MAXCON),L»1»NELEM+t),
. ((OLr)C(L;K),K»lrMAXCON),L"l»N|ELEM*l)
.
A*******************************************************
,
,
. IF (ANALYS) SAVE-THE-RESULTS-FOR-TIME-SERTES-ANALYSIS
,
. IF (MOP(NXE'5, I1PRT) .EU. 0)
, *** SAVE THE RESULTS FOR PRINTING AND QTHER POST PROCESSING **
CALL SAVEIT(«, HOIV, BED, ELF.V, C. OCLZ, NPEO, NELE'i,
. NXEQ, RESELN, STRESS, XYSO, OLDC,
. ALE^j'^HINjUHUOT jCClN.UVjAXIDjBwlD.VSETjOENSjOELTDfDFZ,
. POH.TBEO)
..FIN
.
, NELMPT"*'ELEM
, PTOPTH«"E^TH
. PTHELZ«')ELZ
, 00 (iBlfHELEM)
. , PxSAR( I )«XSAREA( I)
. , Ptolt) ( I )aAi*Il)( I )
, ...FIN
                                           152

-------
(FLECS VEKSION 22,46)
          2H-.JAN-H2    10116111   PAljF.   00010
  00502
  0050J
  00504
  00505
  00506
  0050T
  00508
  00509
  00510
  00511
  00512
  00513
  00514
  00515
  00516
  00517
  00519
  00519
  00520
  00521
  00522
  00523
  00524
  00525
  00526
  00527
  0052B
  00529
*** CHECK SENSE SWITCH #2 Tf) SEE IF TwE HUN IS TO C
IF (IS2.EW.1)
   CLf»SF.-THE-OPEN-FIL£S
                                                            STQPPEO ***
         FORMATC//21X,'***** SE»ATH*  *****'/
          5X,'TERMINATED BY OPE«AT£H  AFTER  TIME  PUANE  tf',110/
          5X,'IN SEGMENT «',I5)
         STOP
       ..FIN
                     END OF TIME 3TEP LOOP
            i NXEO i 1
                   END OF SEGMENT LOOP
   PELEV « ELEV
   NFVST « i
   LUNTMP«INFLO
   INFLOSOUTFLO
   OUTFLOSLUN1MP
          OUTFLO
   CLOSE(UNIT«5)
   CLOSE(UNIT»9)
 ..FIN
CLOSE" THE-OPF.N.FIUE3
STOP
  00530
  00551
  00532
  00533
TO COMPUTE-BEO«AN|J.HATE«-SU»FACE-ELEVAT10NS
.  BELEV • ELEV * HED
.  RESELN • DEPTH + 8ELEV
  00534
  00535
  00536
  00537
  00538
  00539
  oosao
  OOSal
  00542
TO CLOSE-THE-dPEN-FILES
   CLOSE(UNIT»U
  00544
   CLOSE(UNIT»3)
   CLOSE(UMiTn4)
   CLOSE(UNIT«5)
   CLOSE(UNIT»9J
   CL"5E(UN!T»6)
   CLOSE(UN1T«7)
 ^0545
 00546
 00547
 0054S
10 P-EPOHT-FATAL-ERMOR-AND-STOP
.   cuiSE-rnE-oPEN. FILES
.   OPEN fUNlT«l,NA«Ea'TTI')
                                         153

-------
(PLECS VERSION 22.46) SB-JAN. «2 10U6U1 PAGE 00011
005^9 1 . FOR*AT(//10X, ***** SEHATRA — FATAL ERROR *****'/
00550 1, ' PRINT "SEU.LST" FOR DETAILS')
005S1 C . *** THE IF STATEMENT BELOW 13 A CONCESSION TO THE
00552 . IF(FE«ROR) STOP
00553 ...FIN
00550 TO RESET-OATA. TIME-CONTROLS
00555 . FNDIC « 0
00556 . ENOHYD a o
00557 . ENDTHB a o
00556 ...FI^
00559 TO 3AVE-THE-RESULTS-FOR-TIME-3ERIES-ANALY3IS
00560 C
00561 C
00562 C
00563 C
00564
00565
00566
00567
0056S
00569 C
00570 C
00571
00572
00573
OOS7'»
00575 C
00576 C
00577
00578
00579
005PO 1
00561
005*2
005*3 C
005*'* C
00585
005B6
00587
005B8 1
005*9
00590
00591 C
00592 C
00595
0059*4 C
00595
00596 C
00597
0059B



COMPILER









*** COMPUTE THE VOLUME OF EACH ELEMENT AND TH£ TOTAL VOLUME
OF THE KATEK COLUMN ***

AVOL«0.
00 (Iml,NELE-"<)
, EL^IVlJUn) a OELZ*ABAK( I)
. AVOL»AVOL+EL«VOL(I)
• • • • * **

*** AVERAGE UI3SOLVEO (Kli/H**J) ***
AVGUIS • 0.0
DO(I*lf NELF.W) AVGDIS«AVGOTSt(C(I, 7)+C(I + l,7))*ELMV
AVGOIS • AVfiDIS / AVOL
IF (AVGOIS ,C,T. ANAL^T)
























*** AVERAGE SEOIMgNT (KG/M»*3) **»
AVG5ED » 0.0
00( I»l , NfcLE*1)
. AV6SF.O*AVGSEO+(C(I,1)+C(I*1»1)+C(I,Z)*C(I + 1
C(I.i)+C(I+l, 3)1/2,
...FIN
AVG3EO « AVGSEO / AVOL











OL(I)/2.






,21 +




**** AVERAGE (PARTICULATE (PC/KG)*SEOI«ENT (KG/*1**3n
PA«PCM * O.o
00 (I«1,NELE*)
. PARPCM « PARPCM *-ELMVOL(I)*(C(I,«)+C(I,5)+C
+CtI*l»«)+Ca»lf5)+C(I»lffc))/2.
...FIN
PAHPC^ a PAHJJCM / AVOL

*** AVERAGE PART1CULATE (PC/KG) ***
PARPCK • PAHPCM / AVGSEO

TOTKG « ( PAWPCM + AVGOIS 1*AVOL

CAVliMX a '1AX(CAVU,-1X, AVCOIS)
tFLU* a 0.0


(1,6)











154

-------
(FLEC8  VERSION 22.46)      2fl-JAN.d2   10H6|11  PAGE  00012
  0059"?
  00600
  00601
  00602
  00603
  00604   C
  00605
.   00 Usl,NFL£M) TFLOw a TFLOW +
   IFL'JW 8 TFtU" / SECDAY

I..F1N
                PBOCEUUHE CROSS-«EFE«ENCE TABLE

          00550 «E3ET"OATA-TI^E"CONTflOL3
                00158

          00559 S A VE-THE-HF.SULTS-FOK-T I ME-SEHIES- ANALYSIS
                904B5

          0053fl CLOSE-THE-OPEN.FILES
                0050S  00527  00516

          00530 COHPUTE-8EO-ANO-rtArER-SURFACE-ELEVAT IONS
                00357  00165

          00515 REPORT-FATAL-EHHOH-ANO-3TOP
                0014?  00186  00284  00299  00319  00'463
          (FLECS VE«SION
                                            155

-------
CFLECS VERSION 22,
                      13129143  PAGE,  ooooi
  oonot
  oooo?
  00005
  ooooo
  00005
  00006
  00007
  00008
  0000<>
  oooio
  00011
  00012
  0001)
  00010
  00015
  00016
  0001 7
  00018
  00019
  00020
  00021
  00022
  000*5
  00020
  00025
  00026
  00027
  00029
  00029
  OOOJO
  OOOJI
  00052
  00055
  OOOJ5
  00056
  OOOJ7
  00058
  OOOJ9
  00010
  00041
  00042
  00043
  0004(1
  000
                                                    S(fXELEM,3),
P£L(I
PEL(1
PEH2
PEL(2
SEL(I
SEL(1
StLt2
SEL(2
           ,1)
           ,2)
           .1)
           ,2)
           ,1)»
           ,2)«
           ,U»
           ,?)»
00
         00  (J«l,2)
         ,   PfcL(I,J)
         ,   8tL(l,J)
           1./3.
           l./b.
           I,/*.
           l,/3.
          UD(1) t 00(3) * OD(7)/3.
          -00(1) » D0(«) t DO(7)/6,
          -00(1) - 00(5) » 00(7)/6.
          00(1) + 00(6) + 00(7)/5.
          ) SEL(l,I)sSEL(l,l)tveL
                9EL(2,2)*SEL(2,2)+VEL
                      fJ) * WIDTH
                 SCL(I,J) * WIDTH
oo (i«p,io,i) com < ood) * WIDTH
002=OU(8)/2,0
DO (Jsl,2)
,  NR*1 1 t J • 1
,  00 (*sli2)
.  .  MC«2»(I1 » K - 1) « NR
,  ,  P(NR,MC)» P(NH,MC) + PEL(JrK)
           ^C)» S(NR,MC) t SEL(J,K)
                  002
...
IF
  999
 1000
II 00

1200
   wP)U(b,999)
          i ****«*«**«**«*«*««« «*****IN SETUPt)
,  WRITE (*>, 1 100)
,  HRlUU»f1200)U,(PU,J),J»l,J),tS(I»J),Jsl,3).R
-------
(FLECS VERSION Z?,U6)      1J.M4H-81   1JI29M3  PAGE  00002




  0005«         END



          (FLECS VERSION ^^,
-------
(FLECS VERSION
13-MAR.8I
13129148  PAGE  OOOOl
00001
00002
0000)
oooou
00005
00006
00007
00008
00009
OOnlo
OOOJt
00012
0001 J
OOOld
00015
00016
00017
00018
00019
00020
00021
0002?
00021
00020
00025

C
C
C
C
C
C
C
C
C
C
C
C
C
C
C

C
C

C




                SUBROUTINE SHEARR(DEPTH,  050,  STRESS, USTAR, V£L )

              THIS SUBROUTINE CALCULATES  BED SHEAR STRESS AND SHEAR VELOCITY FOR
              A  StfHHENt  LAOEN FLOW,  METHOD IS APPLICABLE FOR RESERVOIRS.
              REF, HYDRAULICS OF  SEDIMENT TRANSPORT BY W,H. GRAF, EO 8,«'?

              FORMAL  PAHAMgTERSl
                06P1H  •  FLOW DEPTH (MgTEHS)
                D5o     •  MEDIAN BED SEDIMENT DIAMETER (METERS)
                STRESS  •  BED SHEAR STRESS (KG/M**2)
                USTAR  -  SHEAR VELOCITY (M/SEC)
                VtL     -  AVERAGE  VELOCITY (M/SEC)

              CALLED  BYI  HYDFLO,  ICFLO

              RHO .  WATER DENSITY (KG(FORCE)/M»»J)
                DATA  RHO  /1000,/

              AKAPPA  -  KAHMAN CONSTANT
                DATA  AKAPPA /0,«/

                USTAR»VEL/(l7,b«>*(ALOG10(OEPTH/(96.5*050)))*2,J/AKAPPA)
                STRES3eHHO»USTAH**2,0/9,8
                RETURN
                END

          (FLECS VERSION  22.U6)
                                          158

-------
(FLECS  VERSION 22,46)
            19.MAK.flt   1<||27|15  PAGE  00001
  00001
  00002
  OOOOJ
  ooooi
  00005
  00006
  00007
  OOOOfl
  00009
  00010
  0001 I
  00012
  000)3
  0001U
  00015
  00016
  0001 7
  00018
  ooop
  00020
  000*1
  00022
  0002J
  00020
  00025
  00026
  SUBROUTINE. SH£ARS(*LEN,ELEV, HRAO, PEl.EV,SLOPE,STRESS,USTAR]

THIS METHOD OF COMPUTING BED SHEAR STRESS AND SHEAR VELOCITY
IS APPLICABLE TO RIVERS AND STREAMS.

FORMAL PARAMETERS!
  ALEN
  ELEV
  HRAO
  PtLEV
  SLOPE
  STRESS
  USTAR
SEGMENT LENGTH
ELEVATION OF THE CURRENT SEGMENT
HYDRAULIC RADIUS OF THE SEGMENT
ELEVAtlON OF THE PREVIOUS SEGMENT
BED SLOPE
660 SHEAR STRESS
SHEAR VELOCITY
CALLED BYJHYOFLO
  G   > RKAVlTr (M/S»*2)
  RHO - nfcNSITY OF WATER (KG(FORCE)/M**3)
  DATA RHO/1000,/
  DATA   G/9,801/
  SLOPE « (PELEV - ELEV) / AL£N
  STRESS » SLOPE * RHO * HRAD
  USTAR • 3URT(G » SLOPE * HRAD)

  RETURN
  ENO
          (FLECS  VERSION  22,«6)
                                        159

-------
(FLECS  VERSION  22.16)
13-MAR-8I    13129:56   PAGE   00001
00001
00002
0000]
00004
00005
00006
OOOOT
00009
00009
00010
0001 I
00012
0001 3
000)1
00015
00016
oooi;
00019
00019
00020
00021
00022
00023
00020
00025
00026
00027
00028
00029
00030
00031
000)2
00033
00030
00035
00036
00037
00038
00039
o o () a o
oooai
OOOU2
OOOU3
00014
000«5
000«6
OOOH7
OOOU8
00049
00050
00051
00052
00053





C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C

C


C





SUBROUTINE S1LCLA(ARAR, B, BDIVi CC1N» OEUD, DELZ, DEPTH,
1 DENS, D8HR, ERODE, HRAD, J\, N8EO, COLD,
2 NELEM, POR, QH1N, OHOUT, 3C3HR, STRESS, V3ET,
3 XYSO, OEPO, ILAYR, 3D, SR, XNT,
n CROSEC, BWIO, ALEN, ECHO?, SCOUR)

THIS SUbROUTINE CoMPUTES THE RATE AND SOURCE TERMS FoF! THE
TRANSPORT OF 3RT (Jla2) AND CLAY (Jl«3)

INPUT PARAMETERS!
ABAR - AVERAGE AREA
8 • BED CONOIUONS
80IV • ST*N0»»l-> BED LAYER THICKNESS
c • WATER CONDITIONS
CCIN • CONCENTKA rioN or INFLOW
OELTO • TlME STEP (DAYS)
OELZ " STANDARD ELEMENT THICKNESS
DENS • DENSITY
DEPTH . DEPTH OF FLOW
DSHR • CRITICAL SHEAR STRFSS FOR DEPOSITION
EROOE - ERODAB1LITY, (KQ/M**2/SEC )
HBAD - HYDRAULIC RADIUS
Jt - »M SILT »2> CL*Y
NBEO • NIJMbf.R Of BED LAYERS
NELEM - NUMBER OF ELEMENTS
POR - POROSITY
OH1N • INFLOW DISCHARGE
gHoilT • OUTFLOW DISCHARGE
SCSHR - CRITICAL 3HEAK STRESS FUR SCOUR
STRESS - BED SMEAR STRESS
VSET • PARTICLE SETTLING VELOCITY
XYSO • THICKNESS OF TUP BED LAYER
OUTPUT PARAMETERSj
ILAYR • NO, OF HF.O LAYERS AFFECTED BY DEPOSITION AMD EROSION
SO - DEPOSITION RATE, (KG (PC J /M» * 3/DAY )
SR • EROSloN RATE, (KG[pC ]/M**3/OAY)
XNT . WEIGHT OF TOP BED SEDIMENT LA^ER, (KG/M**J)
OEPO • HEO DEPOSITION RATE ( KG f PC ) /M2/DA Y )
SCOUR - 8ED SCOUR RATE (KG IPC1 /M2/DA Y )

CALLED BYI JRANSP
CALLS: OEPCAL

INCLUDE 'SYIELMSIZ.PRM-

REAL K«FUNC,K£NS(3), DSHR(3<, EROOE(S), lLAYR(3)p
? UHIN(MXELtM), OHOUT(MxfLEH), SCSHRC3),
3 SD(MXELEM,6), SR(6), VS£T(3), XNT(3).
a CCIN(MX£LtM,MAXCON) , BWIO(MXELEM), OEPOC6J, SCOIlRl*)
                                         160

-------
(FUECS VERSION 2?,«6)
                  uj2|Jt56  PAGE  00002
OOOS1
00055
00056
00057
00058
00059
00060
00061
00062
00061
00060
00065
00066
00067
00068
00069
00070
00071
00072
0007i
00074
00075
00076
00077
00078
00079
00080
00081
000«2
0006J
0008«
00085
00086
00087
OOOBA
00089
00090
00091
00092
0009J
00090
00095
00096
00097
00098
00099
001 00
OOtOI
00102
00103
00101
OOJ05
00106
OOJ07
001 08
00109

C























C
C
C




C
C
C
C


















C
C
                DATA SECDAr/66100./
                XNTU1 )*0.
                IF  (NBED.GT.O)
                           t-,
                           8(NBED, J)/DEN5(}))
                   XNT(Jt) a XDIOP * B(NBEO,J1) * XY30
                DEPO(Jt)  a 0,0
                OtPO(J2)  s 0.0
                SR(JI) *  0.0
                SHfJ2) *  0.0
                SCOUR(Jl) * 0,0
                SCOURCJ2) » 0,0
                RS s 0.0
                CS * 0,0
                VOLUME a  CROSEC * ALEN
                DO (IX «  l.NELEM)
                ,   SDdx, Jl ) « 0.0
                ,   S0(IX,J2J * 0.0
                ...FIN
                ILAYR(.Jl) a 0
                IF(fcCH07)
                ,   IF (STRESS ,LT. OSHR(Jl))

              SEDIMENT DEPOSITION
                      ILAYR(Jl)  x -1
                      AVGC * 0.0
                      ruiu * o.o
                      00 (IX » 1,N£LEM)
                         IT
                         AT
        IS
        OR
IMPLICITLY
NEAR UNIT*
ASSUMED THAT A
IS EMPLOYED IN
DOWNSTREAM COURANT NUMBER
THIS ANALYSIS
                         TOTQ * TOTO * (OHIN(IX)*UHOUTCIX})/2,
                                                   Xt Jl )+CCIN(IX*l,Jl))/U,
                                                 * ( 1 . 0- ( S THE SS/DSHR ( J 1 ) ) )
                                                  ALEN  / VOLUME
  AVGC  s  AVGC  /  TortJ
  OEPO(Jl)  s VSET(J))  •  AVGC
  RATE  »  DEPO(Jl)  *  SWIOt1)  <
  DO  (K a  1
     SD(K,JJ )
     VOLK  a  AUAR(K)  *  OELi
     SEDaQHlN(K)*(CCIN(K,Jl)*CClN(K+l,Jl))/1,tf5HOUT(K)*COLD(KfJl)/2.
     CONTaQHIN(h)*(CCIN(K>J2)»CCIN(K»l»J2))/«.+QHOUT(K)*COLO(K,J2)/2,
     HATEK  a RATE  *  VULK
     SO(K,J2)  *  OATEK  *  CONT  /  SEO  /  VOLK
     OEPO(J2)  »  DEPO(J2)  »  5D(K,J2)  * VOLK  / 8WlO(l)
   ..FIN
,.FJ1
  (STRESS  ,GT, SCSHR(J1).ANO.  NpED.  Gf  ,  0)
                                         161

-------
(FLEC3  VERSION  22.46)
13.MAK.8I    13129156   PAGE   0000)
OOJIO
001 11
00112 C
00113 C
00114 C
0011? C
001 16
00117
001 IB
00)19
00120
00121
00122
00123
00124
00125
00126 140
00127
00)28
00129
00130
00131
00132
OOI3J
00] 34
00135
00136
00137
00138 C
00139
00110
00141
00142
00)43 C
OOJ41 155
00)15
00)46
00)17
00148
00149
00150
00151
00152
00153
00154
00155 C
00156
00157
00)5«
t
•
,
«
t
t
•
.
•
i
.
.
i
.
*
.
.
.
.
*
•
•
•
.
.
.
.
.
.
.
.
»
t
.
t
.
.
i
.
»
.
»
.
,
«
«
• .
, RS * ERODE(Jl) * SECDAY * (STRESS / 3CSHRCJ1) - 1.0)
, ILATR(Jl) B (i
*
. COMPUTE AVAILABILITY OF COHESIVE SEDIMENT IN BED LAYERS,
, MAXIMUM NUMBER OF LAYERS SCOURED IS RESTRICTED BY SAND SCOURING,
•
, RS » R3 * OELTO
. *H£N (,NOT,(R3 ,GT, XNT(Jl) .AND, ILAvR(l) ,CT. 0) )
, , KS « AMIN1 (RS,XNT(Jt ) )
. , CS « RS * B(NBED,J2)
, . XNTUI ) » XNT(J1)-RS
. ...FIN
, ELSE
, , FACs8(NB£D,J2)
. . HSUSP * RS
. . KS = 0.
. . ILAYR(JI) * ILAYRCJD + 1
. . N8 « NBEO»IL*YR{ Jl )
, , RSUSP o PSUSP-XNUJ1)
, . HS » RS + XNHJl)
. , CS » CS f FAC*XNT(J1 )
XNHJt ) « 0,0
. . FAC * 0.0
, , IF (NB.NE.O)
. . , XNOs(t,0-POR)/(B(NR,l)/OENS(l ; *B (NB, 2) /DENS ( ,2 } +B (NB , 3 } /DENS ( 3 ) )
. . . XNT(JI) * BDIV * B(NB,J1) * XNO
. , . FAC * R(NB,J2)
	 FIN
• •
. . IF (ILAYR(J) ),EO.ILAYR(t J) GO TO 155
, IF (RSUSP. GE, XNT(J1 ), AND. ILAYR( 1) .GT.ILAYR(Jl) )
. . , GO TO 140
• « t • f * 1 "
t (
, , CONTINUE
, . DEL * AMIN1 (RSUSP, XNT Ut ))
. , KS a RS + DEL
. . CS » CS t DEL * FAC
, , XNT(Jl) * XNT(Jl) - DEL
. ...FIN
...FIN
SCUUK(Jt) « HS / OELTO
SCOUMJ2) « CS / DELTD
SH(Jl) * RS / OELIO » BKJO(l) » ALEN / VOLUME
S«(J2) * CS / OELTO * BWlD(l) * ALEN / VOLUME

,F1N
RETURN
END
          (FLECS VERSION 22.46)
                                           162

-------
(FLECS  VERSION  22.46)
13,MAR»8I    I3I30H2
00001
00001
01)00?
00003
00004
00005
00006
00007
00008
00009
00010
0001 1
00012
0001)
00014
00015
00016
0001 7
00018
00019
00080
00021
0002?
00025
00024
00025
00026
00027
00028
00029
000 JO
00031
0003?
0003J
oooja
00035
00036
OOOJ7
0003H
oooiR> /
DATAYFS/'Y'/
DATA wRIStG/, FALSE./

WHITE(fl, 1 )






















                                        163

-------
(FLECS  VERSION  22.4fe)
m3oii2   PAGE   00002
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
0006R
00069
00070
00071
00072
00073
00074
00075
00076
00077
00076
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00091
00094
00095
00096
00097
00098
00099
00100
OOlOt
00102
0010J
00104
00105
00106
00107
00108
00109



C



C



C


C



C



C



C



C



C



C



C













RE AD (8, 2) NCHR, (lNPFIL(I)»Ial,NCHR)
INPF IL(NCHR + 1 ) « 0
OPEN (UNI Taj , NAME" t NPF I L, TYPE" 'OLD1, READONLY)

WRITEC8»3)
REAO(8,4)AN3WER
IF (ANSWER ,EO, YES) ECHO « .TRUE,

WHITE(B,6)
READ(8,«)(FNAME(I),-J«1,E9)
CALC FOCOUE(FNAME,BASE,JSEG,FTYPE,DEV,GUIC»UUIC)

WRITE(8,7)
REAO(8,4) SMETH

WHITE ( 9» 8)
REAt>(8,4) ANSWER
IF (ANSWER. EO. YES) S»VECHU) s .TRUE.

WRITE(«,<»)
REAO(8,M) ANSWER
IF (AN3«EH. EO, YES) SAVECHt?) a .TRUE.

WHITt(8, 10)
READ(6,4) ANSWER
IF (ANgwER.EQ.YES) 8AVECH(3) a .TRUE.

WHITE(8,11)
R£AD(8,4) ANSWER
IF (ANS"£H.EQ,YES) SAVECH(4) t .TRUE.

WRITE (8,12)
REAO(8,«) ANSWER
IF (ANSWER. EO. YES) S*VECH(3) « .TRUE.

WRITE (6,13)
REAO(8,4) ANSWER
IF (ANSWEK.EO.YES) SAVECH<6) a .TRUE.

WRITE (8,14)
REAOtB,") ANgwEH
IF (ANswER.EO, rfcs) gAvECH(7) * .TRUE,

WHI TE (6,15)
REAO(6,«) »NSWER
IF (AN8WEH.EO. YtS) WRTSEG a .TRUE,
WHEN (WRT5EG) JSEG(l) B 0
ELSE
. WRITE (8,16)
. R£AO(8,17) (JSEG(J),J«1,5)
« t , F I N
CLOSE(UNIT«8)
NFRST * 1
ISTNTel
INFLOa?
OUlFLO«i
                                        164

-------
(FLECS  VERSION  22.«6)
I3-M4K-8)    13lJO|l2   PAGE   OOOOJ
00110
001 1 1
00112
OOI1J
00) 19
001 IS
001 16
00117
00118
001 19
00120
00121
00142
00123
00124
00125
00126
00)27
00128
OOJ29
001 JO
00111
00132
00)33
0013«
00135
00136
00137
00138
00139
OOlUO
00141






C
C
1
2
3
U
6
7

8
9
10
1 1

12

13
IU

15

16

17
C

OPEN ( UN 1T»2, NAME t'OUMMY.DTl •, TYPE e< NEW' ,FORM" ' UNFORMATTED ' )
OPEN(UNlT»J,NAMt«iDUMMYtDT2<,TYPE«»NEw»,FORM»«lJNFO»MATTEO' >
OPEN (UN IT«fl,NAME»'HY'OKOLOGY,TMP', TYPE* 'NEW », FORM* »UNFGMA T TED ' )
OPEN(UNlls7,NAME««TRIBUTAKY.TMPf , TVPE« ' NEW ' ,FORM» "UNFORMATTED » )
OPEN(UNIT»6,NAME«i8ED,LST' , TYPE* 'NEW')
RETURN

»* FOHMATS **
FORMAH 'JtNTER NAME OF INPU1 FILE>')
FORHAI (U.30A1)
FORMAK'JUO YOU WANT THE INPUT FILE ECHOED (Y OK N)>")
FURMAJ (29A1 )
FORMAT( 'HNTER BASE FILE NAM£>')
FORMAir" WHICH SAND CAPACITY METHOD 13 TO BE U3ED7'/
1 'JENTER T (TOFFALETTI) OK C (COL8Y)>i)
FORMAlClOO YOU WANT SEfATRA HEADINGS ECHOED (Y OR N)?')
FORMAtt'lOO YOU WANT INFLUENT CONCENTR A T IONS ECHOED (Y 0" N)?l)
FORM4TCJOO YOU "ANf ELEMtNT MAfHICES ECHOED (Y OR N)7')
FORMATf'IDo YOU WANT GEOMETRY AND CONCENTRATIONS ECHOED (Y OR N)t,
1 'T')
FORMAM'SUO YOU WANT CONCENTRATION ECHOED BEFORE AND AFTER ROSFLO'
1 , ' (Y OR N)?l )
FORMATMJOO YOU WANT jCOUR/DEpOSl T I ON TO OCCUR? (Y OR N>«)
FURMAH'JDO YOU WANT COMPLETE SCOU«/DEPOS I T ION INFORMATION1,
1 « RECORDED? (Y OH Nj ' )
FORMATf'IDo YOU WANT COMPLETE ECHO* INFORMATION FoR ALL'»
1 « SEGMENTS? (Y OR N) ' )
FORMAT(i*FOR WHICH SEGMENTS DO YOU WANT COMPLETE ECHO**,
1' INFORMATION? (MAXIMUM OF 5)'l
FURMAH5I5)

END
          (FLECS  VERSION  22,06)
                                        165

-------
(FLEC3 VERSION  22.«6)
13-MAR-si
PAGE  ooooi
00001
00002
00003
00004
00005
00006
00007
00008
0000"'
00010
00011
00012
00013
oooi a
00015
00016
000 1 7
000 1 8
0001"'
00020
00021
00022
00023
0002«
00025
00026
00027
00028
00029
00030
00031
00032
00033
0003«
00035
00036
00037
00039
00039
00040
00n« |
00042
00043
0001U
oooas
00046
OQOu7
OOOU8
00049
00050
00051
00052
00053


C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C

C

C







C
C
C
C

C
C
C
C
C






C
C
C
C
C
SUBROUTINE TOFFALULEN, 050, G9If HRAO. rjTOT, SLOPE? TEMPR, VOL,
1 VSET, GSU, GSM, GSL» GSB, YU, YM, YU

THIS SUBROUTINE USES TOF FALE T T I • S METHOD TO CALCULATE THE CAPACITY
OF THE FLOW TO TRANSPORT SAND. A SUMMARY OF THIS METHOD CAN BE
FOUND IN IH£ ASCE 1975 EDITION OF "SEDIMENTATION ENGINEERING"
PAGES ?U9 - 21J.

FORMAL PAKAMETEKSi
ALEN SEGMENT U.NGTH
Dio MEDIAN BED SEDIMENT DIAMETER (METERS)
GSI TOTAL CAPACITY OF THE SEGMENT (KG/OAY/MJ
HRAD HYDRAULIC RADIUS
QTOT TOTAL FLOW WITHIN THE SEGMENT
SLOPE ENEKG* OR RIVER BED SLOPE
TEMPR WATER TEMPERATURE
VOL VOLUME
VSE1 SETTLING VELOCITY

CALLED 6YJ 3ANO

REAL K«FUNC,K7 . 0,667 » TMPR
TT=1,10 * (0,051 » 0,00009 . fMPR)
ZIsVSETU) * CONST! * V 1 (CZ * FMHAD * SLOPE)
IF(ZI ,LT ,CNv> ZI»1 ,5 * CNV

THE MANNING-STRICKLER EQUATION is USED HERE TO
DETERMINE THE HYDRAULIC RADIUS COMPONENT DUE TO
GRAIN ROUGHNESS <«'). TAKEN FROM THE 1975 ASCE
"SEDIMENTATION ENGIMEERING'iPG, 128,
                                        166

-------
(FLECS  VERSION 22.«6)
          ii.MAH.8t   I3i30i3<>  PAGE  00002
0oo5"
00055
00056
00057
00058
0005'
00060
00061
00062
00063
OOflb'J
00065
000b6
00067
00068
00069
00070
00071
00072
0007J
00070
00075
00076
00077
00076
00079
00080
00081
00082
00083
0008U
00085
00086
00087
00089
00089
00090
00091
00092
0009J
00094
00095
00096
00097
00098
00099
00100
00101
00102
0010)
ooiou
00105
00106
00107
00108
00109
C
C
C
C
C










C






C














C
C
C
C



C


C
C
C
C

C
C
C
C
                SUBSTITUTIONS »KE MADE IN EQUATION 2,I'M  FOH SHEAR VELOCITY
                AND  MSU9JS,   THE FORMER IS REPLACED BY EQUATION 2,1«2. AND
                THE  LAHEK BY 0(SUH)65.
                RPRIM£«((V»*l,5)  »  (065 *»0,25)  / (SLOPE ** 0,75))
                USTARr(HPHlME  •  SLOPE * 32,2)  ** 0,5
                AFUNC»
...FIN
OCZUS1 .0 *
/ AC

CNV
                OCZMsJ.O  f  CNV  •
                 1 .5 *
                 ZI
                                       ZI
                OCZL'1.0  t  CNV  -  0,756 * ZI
                ZINV«CNV  -  0.756  *  ZI
                ZOs. 0.756 *  ZI
                ZP*0,2"0  *  ZI
                ZQ*0,5  *  ZI

              CLI  HAS 0EEN  MULTIPLIED  8Y  1.0E30  TO KEEP IT  F»0«
              EXCEEDING  THE  COMFUTEH OVERFLOW  LIMIT
                CLI»CONST2  *  OCZL  *  (V  **  2,333)  /  FHRAQ ««
               1     UTT  •  AC •  K«  *  FDIAM)  **  1,667)  / (J.O  f CNV)  /
               i     ({FHRAO / 11.2U}  ** (/N)  .  (2,0 »  FfjIAM)  »* OCZL)

                Pls(2.0«FOIAM/FHRAD)**Zo
                C2D»CLI  » PI  /  l.OEtJO

              CHECH  TO  SEE  IF THE  CALCULATED  VALUE  IS  REASONABLE
              (<  100. 0),  AND  ADJUST  IT  IF  IT  IS  NQT.

                IF(C20. Of. 100.0) CLIs   l,OEt2H   / PI
              CMI  HAS  BtEN  MULTIPLIED  RY  1.0E30  TO  KEEP  IT
              EXCEEDING ' THE COMPUTE* OVERFLOW  LIMIT
                                        167

-------
(FUCS VERSION 22, Ufc)
13l30|36  PAGE  00003
00110
00111
001 12
0011J
OOtH
001 15
00116
001 17
001 18
001 19
00120
00121
00123
00|23
00121
00125
00126
00127
00126
001J9
00130
00111
00132
00133
00131
00135
00136
00137
00139
0013?
001UO
001 Ul
00102
00103
001 11
00115
OOH6
001 «7
001 18
00119
001SO
00151
00152
00153
00151
00155
1)0156
C
C
C
C
C
C
C

C
C
C




C
C
C


C
C
C


C
C
C

C
C
C

C
C
C








C


                P(SU8)l  APPEARING IN EQUATIONS 2.236H, J, K, L, M, AND
                  N IS IH£ WEIGHT FRACTION OF TOTAl SAND THAT THE I-TH
                  size FRACTION CONTAINS.  SINCE WE ARE MODELING ALL
                  SAND AS * SINGLE SIZE FRACTION -- PCSUBH » 1,0. AND
                  HENCE  DOES NOT APPEAR IN THE MODEL EQUATIONS,

                CMIs(l3.g * CL1 * (1,0 » CNV) * V * (FHRAD ** (ZM))

              CALCULATE  TRANSPORT CAPACITY OF THE UPPER LAYER

                FDllsFHRAU X 11.21
                FO?5oFHRAU / ?,5
                GSUe(CMl * (FOll ** UP)) » (FD25 ** (ZQ)J *
               1    {FHHAO tt (UCZU) - (FD25 •» (oCZU)))) ' (UCZU *  1,0 E+30)

              CALCULATE  THE CAPACITY OF THE MIDDLE LAYER,

                GSMe(C*l * (FDtl *» (ZP)) * UF025 **(OCZM)) «
               1    (FOll »» (OCZM)))) /  (OCZM * t.OE+30)

              CALCULATE  THE CAPACITY OF THE LOWER LAYER

                GSLs(CMI * ((FD11 »* (ZN)) - (C2.0 * FDIAM) .»  (OCZL»)))
               1    / (OCZL * 1,OE»30)

              CALCULATE THE CAPACITY OF THE BED LAYER

                G38=(CMJ * 1(2,0 * FDIAM) ** (ZN)))/1.0E+30

              TOTAL CAPACITY OF  THE SEGMENT (G3l HAS UNITS OF  TONj/DiY/FT)

                GSI»GSU + GSM +  GSL *

              CONVERTING  TO KG/DAY/H

                GSu « G5U * CONST3
                GSM * GSM * CON3TJ
                GSL « G5L * CONST3
                GS8 * fiSB • CONST3
                YU *  HRAD / 2,5
                YM e  HRAO /  11,21
                YL =  2.0  • D50
                GSltGSl * CONST3

                RETURN
                END

           (FLECS VERSION  22,16)
                                         168

-------
(fLECS  VERSION 22.a&)
                 3.APR-8I   I7i26t56  PAGE  ooooi
  oooot
  oooo?
  00003
  ooooa
  00005
  00006
  00007
  00(108
  00000
  00010
  OOOH
  00012
  00013
  00014
  00015
  00016
  00017
  0001A
  00017
  00020
  00021
  00022
  0002)
  ooo2a
  00025
  00026
  00027
  00024
  00029
  00030
  00031
  00032
  00033
  00030
  00015
  00036
  0003?
  00036
  00039
  00010
  00041
  00042
  00043
  00044
  00045
  00046
  00047
  00040
  00049
  00050
  00051
  00052
  OOOS3
C
c
C
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
  SUBROUTINE TRANSP(TERROR,PCOEF,8*10,AW ID,ABAR,DEPTH,OUDC,ECH04,
 1                 CRUSEC,ECH07, ECH08, ECHO?)

THIS ROUTINE SOLVES THE MASS TRANPORT EQUATIONS 8Y AN IMPLICIT
FINITE-ELEMENT METHOD.  A CRANK-NICHOLSON METHOD IS USED TO
APPROXIMAtE THE SOLUTION THROUGH TIME,
VARIABLE
  ALEN
  AREA
  8
  BOIV
  BED
  C
  CCIN
  COLD
  CH03EC
  DECAY
  DELTH
  Dt'LZ
  DFZ
  D1AM
  OSHR
  050
  ERODE
  FERHOR
  HRAO
  KAY1
  KAYg
  NBEO
  NELE*
  PCOEF
  POR
  QHIN
  OHOUT
  (3V
  SCSHR
  SLOPE
  SMgTH

  SR
  STRESS
  TEMPR
  VOL
  VSEt
  XYSO
DEFtNITIONSl
  SEGMENT LENGTH
  ELEMENT AREAS
  dEO CONDITIONS
  STANDARD BED LAYER THICKNESS
  BED THICKNESS
  WATER CONDITIONS
  CONCENTRATION OF INFLOW
  CELL-CENTERED CONCENTRATION
  TOTAL CROSS-SECTIONAL AREA, M>*2
  FIRST ORDER DECAY
  TIME STEP (SECONDS)
  STANDARD ELEMENT THICKNESS
  DENSlTY
  DIFFUSION COEFFICIENT
  DIAMETER
  CRITICAL SHEAR STRESS FOR DEPOSITION
  MEDIAN BED SEDIMENT DIAMETER (M)
  ERODABILITY
  FATAL ERROR FLAG (L*l)
  HYDRAULIC RADIUS
  LIGHT EXTINCTION COEFFICIENT OF WATER
  LIGHT EXTINCTION OF SUSPENDED SEDIMENT IN HATER
  NUMBER OF BED LAYERS
  NUMBER OF ELEMENTS
  FIRST TERM OF THE PHuTOLYSlS RATE OF CHANGE EQUATION
  POROSITY
  INFLOW DISCHARGE
  OUTFLOW DISCHARGE
  VERTICAL DISCHARGE
  CRITICAL SHFAR 5IRESS FOR SCoUR
  ENERGY OR RIVER BED SLOPE
  CONTROL VARIABLE TO SELECT THE  METHOD TO BE USED
  WHEN COMPUTING THE SAND CARRYING CAPACITY,
  SEDIMENT EROSION RATE
  BED SHEAR STRESS
  WATER IEMPERATURE
  VOLUME
  PARTICLE SETTLING VELOCITY
  THICKNESS OF TOP BED LAYER
CALLED BYI SERATRA
CALLSj BEODK, BEDHIS, COLAPS, COMB, DISOLV, FALL, PARTIC. SAND.
       SEOIME, SETUP, SILCAL, TRISOL

  INCLUDE
                                          169

-------
CFLECS  VERSION 22,«6)
                         3.APR-81    17l26|56  PAGE  00002
00051
00055
00056
00057
00058
00059
00060
00061
00062
00065
00061
00065
00066
00067
00068
00069
00070
00071
00072
00073
00071
00075
00076
00077
00078
00079
00080
00081
00082
00085
00081
00085
00086
00087
00088
00089
00090
00091
00092
0009*
00091
00095
00096
00097
00099
00099
00100
00101
00102
00103
00101
00105
00106
00107
ooioa
00109
          I 0 10
          1015
          1000
                LOGICAL*!  FERHOH,  ECMOU,  ECH07,  ECHQB,  ECH09
                DIMENSION A(MXELEM),  ABAR(MxELEH) ,  00(1(1),  ILAYR(3),  P(HX£LEM,3),
               1           R(MXELEM),  3(HXELEM,5),  SD(MXELEM,6),
               2           SR(6),  XNf(3),  Z(MXELEM),  BWlD(MXELEM),  AWID(MXELE*)
               3     ,OLUC(MXELEM,MAXCON), DEPOC6),  SCOUR(6),  8EDSO(3)

                INCLUDE  'TRANS,COM»
                DATA  EPbl/l.OE-30/

                MP1  « HELEM » 1
                Mil  * NELEM . 1

                ***  PERf-OPM CALCULATIONS OVER THE TIME STEP DELTO •**

                DELTD » OtLTH /  86100.
                DO (J«I,HAXCON)
                   DO (L * l,hPl)
                   .   R(L) » 0,0
                   .   00 IN s 1,3)
                   ,   .  S(L,N)  a  0,0
                   ,   ,  P(L,N)  »  0.0
    DO (I«1,NELEM)
    ,  RCDZ i 0,0
    .  IF (I ,EQ. 1)
    .  .   SELECT(J)
    ...  (1)
 	   CALL S«NO (ABAR, ALEM, AREA, 8, 8DIV, CCIN, OELTD, DELZ.
1,   .  ,   ,  ,              DENS, 050, HRAD, NBEO, NELEM, POU, QHJN, OHQUT,
2,   ,  .   ,  ,              3CSHR, SLOPE, SMETH, STRESS, TEMF'R, VSET.VOL, XYSO,
3,   ,  ,   ,  ,              OEPO,1LAYR, SO, SR, XNT, COLO, C,
«,,,,,              CRUSEC,B»<10,ECH07, SCOUR)
 .   .  .   .  ,   1F(ECH08)
 	   ,  WHIIE(6,1000)
 ...,,.  «M£N(jLArRt i) ,LT .0)
 	   ,  ,  WRITEC6,1010) J,ILAYR(1),DEPO<1),DEPO(«),SD(1,1),XNT(1),
1,   ,.,.,.               (50(11,«),II«l»NELEM)
 ......  ...FIN
 	ELSE
 ,..,,,.  w»ITE(6, 1015) J,ILAYRO),SCOURC1),SR(»),XNT(1),SCOUR(a),SR(fl
 	FIN
 ,,.,,,    FORHAT(' Ja',l2,i  ILAYRs',12,'  DEPOs',E15,7, '  DEPO( + 3) = ',
1,   ,  ,   .  ,   ,  El5.7,i  SD»',E15.7,'  XNy«•,E15.7,5X,'SO(I,*3)s ' /
2,   .....  (5X,8E13.7))
 ,.,.,,  FOPHATC  J»',J2,'   ILAYRa',12,'  SCOUH='„E15,7,'  SRa',E15.7,
1,   ,.,,,'  XMT» ' ,E15,7, i  SCOURC +J)s",E15,7, '  SR( + 3) = ',Ei5,7)
 .....   ...FIN
                        IOIN TPANSP FOLLOWING SANO>)
                                              170

-------
(FLECS  VERSION 22,«6)
J-APR-81    17126(56  PAGE  00003
  oono          	FIN
  00111          ....   (2)
  00112          	   CALL SILCLA(ABAR,  8,  BOlV,  CClN,  DELTO, DELZ, DEPTH, DENS,
  00113         1	               DSHR,  ERODE*  HRAD,  Z,  NBED,COLO,NELEM, POR, QHJN,
  ooiia         a.   ....               QHuur,  SCSHR,  STRESS,  VSET, XYSO, DEPO, ILAYR,
  00115         3,   ....               SO,  3H,  XNT,  CROSEC,  BWID, ALEN,  ECHQ7, SCOUR)
  00116          	IF(ECH08)
  00117          ,,,,,.   "RITE(6,1030)
  00118          ......   WHEN(ILAYR(2),LT.O)
  OOllt          ,	WRITE(6,1010)  J,ILAYR(2)»DEPO(2),OEPU(5),SDn»2),XNT(2),
  00120         I.   ......               (80(11,5),II«1,NELEM)
  OOm	FIN
  00122          .,..,,   ELSE
  00123          .......  WRITE(6»1015)  J,ILAYR(2),SCOUR(2),SR(2),XNT(2),SCOUR(5),SB(5)
  0012«          	FIN
  00125          .....   ...FIN
  00126    1020   «   .   .   .   .   FOHMAT(»oIN  TRANSP  FOLLOWING  SILT')
  00127          ....   ...FIN
  00128          ....   (3)
  OOU9          	CALL 3ILCLA(A9AR,  8,  80lV,  CCtN,  DELTD, DELZ, DEPTH, DENS,
  00130         1	               OSHR,  EROOE>  HRAp,  3,  N8EO,COLD,NELEM, P0», QHJN,
  00131         2,   ....               QHQUT,  SCSHR,  STRESS,  VSET, XYSO, OEPO, RAYR,
  00132         3,   ....               SO,  SR,  XNT,  CROSEC,  BWID, *LEN,  ECHQ7, SCOUR)
  00133          	IF(ECHOS)
  0013«          ......   «RITE(6,1030)
  00135          ......   WHEN(IL*YRU) ,LT,0)
  00136          .......  WRITE(6, 1010)  J,ILAYRm,OEPO(3),DEPO(6),3D(l»3),XNT(3),
  00137         1.   ......               (80(11,6),1I«1,NELEM)
  00138          ......   ...FIN
  00139          	ELSE
  00140          ,.,,...  WRITE(6,1015)  J,ILAYR(3),SCOUR(3)»SR(3),XNT{3),SCOUR(6),SR(6)
  ooiui          ......   ,.,FIN
  001«2          ....   *   ...pIN
  001«3    1030   .....   FOHMATCoIN  TRANSP  FOLLOWING  (SILT) CLAY')
  001«a          	FJN
  001U5          	FIN
  00106             .   ...FIN
  00107             .   CONDITIONAL
  OOU8             .   .   (J  ,LE.  3)
  001U9             .   ,   .   CALL  SEDIME(ABAft,  ALEN,  CClN,  DELTD,  I, J, NELEM,  OHIN,
  00150         1    ...              OMOUT,  0V,  SO,  SR, ALFA,  BETA, VEL1, VEL2,V3ET,
  00151         2    ...           OELZ,  BwlD, Awlo,  DEPTH,  BETA1, BLTA2)
  00152             ,   .   ,   IF(tCHOB)  wfllTE(6,)500)
  00|53    (500      ,   .   ,   FQRHAU'OIN TWAN3P  FOLLOWING  SEDIMg')
  OOtS«             	FIN
  00155             .   .   (J  ,GE.  U .AND,  J  ,LE, 6)
  00156             .   .   ,   C*LL  PAHIIC(ABAH,  *LEN,  B,  C,  CClN,  COLD, DECAY, DELTD, DFZ,
  00157         i    ...     I,  J, NBED.  NELEH,  OHOUT,  OHIN,  gv,  SORBK,  30, SR, ALFA, BETA,
  00158         2    ...              VEL1,  VEL2.VSET,  DELZ,  DEPTH,B«ID,AwID,
  00159         3    ...              BtTAl,  8ETA2)
  00160             ,   ,   .   IF(tCHOB)  WRITE(6,1510)
  OOjbl    1510      ,   ,   ,   FORMAM'OJN TRANSP  FOLLOWING  PARTIC')
  00162             	FIN
  00163             .   ,   (J  ,EQ.  7)
  0016U             ,   .   ,   CALL  OISOLV(AHAR,   B,  BDIV,  C, CClN,  COLO, DECAY,  DELZ,
  00165         t    ...              DELID,  DENS, DIAM,  I,  MYt,  KAY2, NELfiM,N8ED,
                                              171

-------
(FLECS  VERSION  22.U6)
3,APH-ai    m26i56  PAGE  ooooi
00166
00167
00168
00169
00170
00171
00172
00173
07
00198
00199
00200
00201
00202
0020J
oo?na
00?05
OU206
00207
0 0 ? 0 ft
00209
00?! 0
00211
2. .
3. .
• •
1 520 . .
* •
* •
ff •
(530 , .
C , .
c . .
• •
• *
• *
1 •
• •
t •
• *
• •
• *
• ft
f •
• *
t •
• *
2500 . .
1. .
ff •
2000 , .
ff 9
C . ,
ff •

1 *
t *
1 * •
c
. . PCOEF, POR, OHIN, QHOUT, ov, SOHBK, ALFA, BETA, VELI,
, , VEL2, BETAl, HETA2, OEPO, SCOUR, BEOSO, XYSO, AREA)
, IF(ECHOfl) WRITE(6, 1520) (BEDSD ( 1 1 ) , ll*\ , 3 )
. , FORMA|-('OIN TRANSP FOLLOWING DISOLV I3EDSDU-3) S|,3F18,7)
. ...FIN
, , ,F IN
IMECH08) WHITE(6,1530) VEL(,VEL2
FORM»T(' VELt «',E15.7,10X, 'VEL2 »',E15,7)

*** CONSTRUCT THE FINITE ELEMENT MATRICES FOR EACH LAYER ***
"MEN (J.LE.3) DIFUSE » l)FZ(J)
ELSE DIFUSE » DFZ(J-3)
00(1) OIFUSE/(OELZ«OELZ)
DU(2) 6.0 * OELZ
00(1) (VEL2 • «, * VELI) / 00(2)
00(«) (VELI + 2, * VEL2) / 00(2)
D0(5) (2. * VELI * VEL2) / 00(2)
OU(fc) (a, * VEL2 • VELD / 00(2)
D0(7) ALFA
00(6) BETA
D0(9) 8ETA1
00( 10) a BETA2
IF (ECHO«)
, WRITE(6,2500)
. FORMAT ( "0 II,lX,lJl,6X,'DDK*l,10)
, FORMAT (U, 13, tX,Il,U, 10(1 PE 12, «))
...FIN

VEL « VEH/DELZ
IM1,EQ,NEL£M) VEL«"VEL2/OELZ
WIDTH • AMlD(I)
CALL SETUPd, 00, P, S, R, VEL,NELEM, ECHOU , W IOTH)
.FIN

f HALPO « OELTD / 2.0
. 00
* •
f t
ff •
* ff
f •
* •
• *
• •
(L > 1.MP1)
H(L) « R(L) » OELTO
Z(L) = C(L,J)
00 (N » 1,3)
. PI 2 S(L,N)*HiLFD
. P9AR 3 P(L,N) + PI
. S(L,N) = P(L,H) - Pi
P(L,N) » P8AR
...FIN
00212
00213
0 0 ? 1 «
00215
OOP16
00?17
00218
00219
                   ...FIN
                   IF
           5760
E COMB***
                                  COMB**•
                         TE(6,5761
  00221
        1st ,MPl)
                                           172

-------
(FLECS  VERSION 22.a6)
J-APR-81
17126156  PAGE  00005
00222 5762
00223
,0022"
00225
00226 6001
00227 C
00228 C
00229 C
00230
00231 C
00232
00233
00?34
00235
00236
00237 C
00239
00239 (
00240 1
00241 2
002u2
002«3 1
00244
002<»5 C
002"6 C
00247 C
00246 C
00?49
00250
00251
00252 6200
00253
0025«
00255
00?56
00257
00258
00259 6300
00260
00261 f
. FORMATC1X,I2, 1P8£16.5)
...FIN
CALL COHBfMPj, S, Z, R)
IF JECH04) WM1TE(6,6000) 
-------
(FLECS VERSION 22.16)
13.MAH.81    1JI32IOO  PACE  00001
00001
00002
0000*
00001
00005
00006
00007
00009
00009
oooio
OOQ1 1
00012
0001J
OOOH
00015
00016
OOOlT
00018
00019
00020
00021
00022
0002J
00021
00025
00026
00027
00029
00029
OOOJO
00031
00032
OOOSJ
00031
00035
00036
00037
0003S
00039
OOO^O
oooal
0 0 0 " 2
000" 3
00010
Q 0 ft ^5
0 0 0 ** b
OOOU7
00019
00050
00051
00052
00053


C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
c
c
c

c

c

c

c

c

c
c
c
c
c
c
c
c
c
c
c
c
c

c
c

c


SUBROUTINE TRBDAT (ECHO, HLDERR, N£LEM» NTRlBS, NUMERfl,
1 SIMLEN, TR80PT)

THIS ROUTINE IS RESPONSIBLE FOR READING AND PROCESSING THg
TRIBUTARY INFLOW MASS FLUX DATA, THE DATA IS READ FROM
THE INPUT STREAM (LUN 1) AND WRITTEN TO " THlBUT ARY . TMP" (LU
FOR USE DURING THE SIMULATION,

FORMAL PAHAMETERSi
ECHO • LINE PRINTER ECHO OPTION CONTROL VARIABLE (L*l
HLDERR - HOLDING ARRAY FOR ERROR NUMBERS (BYTE)
NELE* • NUMBER OF VERTICAL ELEMENTS
NOTEl NELEM IS LATER REDEFINED IN HYOOAT
NTRJBS « NUMBER OF TRIBUTARIES (0 OR 1)
NUMERH • NUMBER OF INPUT ERRORS
3IMLEN . SIMULATION LENGTH (3F.CQNOS - 1*1)
TK8UPT - TRIBUTARY INPUT CONTROL VARIABLE

CALLED BY| SERATRA
CALLSl PUTERR

INCLUDE 'SYlELMSIZ.PRMi

BYTE HLDERRUOO)

INTEG£W»2 TRBOPT

INTEGER*1 ENOTIM,PRETIM,SIMLEN

LOGICAL*! ECHO

DIMENSION CTRB(MXELEM,MAXCON)

... .TRIBUTARY INFLOW MASS FLUX

FIRST RECORD,..,.

CoL. 1- 5, ..NTRIBS,. ..NUMBER OF TRIBUTARIES to OR l
6-10. ,.TR«OPT... .TRIBUTARY INPUT OPTION
»o> THE USER WANTS THE MODEL
DISTRIBUTE THE MASS FLUX
THE ELEMENTS,
•l; THE USER WILL SUPPLY T^E
MASS FLUX VALUES FOR EACH

REWIND 7
^
ADO, *) NTRIBS, THHOPT
IF (ECHO) WHITE «»,*) NTPIBS.TRPOPT

IF (NTFMBS ,GT. 0)
. IF (ECHO) WRITE (fe, a)





N 7)



)



























)

TO
THRU


ELEMENT








                                        174

-------
(FLECS  VERSION 22,86)
13.MAR.8i    i3i32ioo  PAGE  00002
0005«
00055
00056
00057
00058
00059
00060
00061
00062
00063
00061
00065
00066
00067
00068
00069
00070
00071
00072
0007S
0007"
00075
00076
00077
00078
00079
00080
00081
00082
00083
00080
00085
00086
00087
oooee
oooe9
00090
00091
00092
00093
0009U
00095
00096
00097
00098
00099
ootoo
00101
00102
00103
0010«
00103
00106
00107
00108
00109

C
C
C
C
C
C

C

C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C















C

C
t
2
3

a


                   REPEAT  UNTIL (ENOTIM ,EQ.  -9999)

                      CARD 11-8
                      COL.  1-10...ENDTIM,,,.ENDING TIME FOR THE DATA THAT FOLLOWS,
                                           A  VALUE OF -9999 TERMINATES THE DATA
                                              (SECONDS).

                      READ(1,6) ENOTIM

                      UNLESS (ENDT1H .EG.  -9999)

                         RECORD Two..,.,,.TRIBUTARY MASS FLUX AND DEPTH
                                    ********** CAUTION **********
                                    THE MASS  FLUX UNITS ARE DIFFERENT FROM THOSE OF
                                    INITIAL WATER AND UPSTREAM WATER CONCENTRATIONS,
                                    PADIONUCUDE  IS PC/SEC, PESTICIDE IS KG/SEC,
                                    SEDIMENT  IS KG/5EC
                                    ********** CAUTION ****.******

                         COL,   1-IO...CTR8(1,1),,.MAS5 FLUX OF SAND (KG/M**3 ) *(M**3/SEC)
                                11-20, ..CTRBft,2)...MASS FLUX
                                21-30, ,,CTR8(1,3),,.MASS FLUX
                                31-«0,,,CTRB(J,«)..,MASS FLUX
                                                    WITH SAND
                                al-50. ,,CTRB(J,5),,.MASS FLUX
                                                    WITH SILT
                                51-60,..CTRB(J,6),,.MASS FLUX
                                                    WITH CLAY
                                «»!-70,,,CTRB(J,7) , . .MASS FLUX
                                    OF SILT
                                    OF CL*V
                                    OF CONTAMINANT  ASSOCIATED
                                    (PC/KG)*(XG/M**3)*(M**VSEC)
                                    OF CONTAMINANT  ASSOCIATED

                                    OF CONTAMINANT  ASSOCIATED

                                    OF DISSOLVED CONTAMINANT
                                                 (PC/M**3)*(M*«3/3£C)

                         WHEN  (TRHQPT  ,EO.  0)  N  s  1
                         ELSE  N  B  NELEM
                         DO  
-------
(FLECS  VERSION 32,H6)      13-MAR-61    I3l32l00   PACE   00003

  OOltO        3  'WIIH 3ILP,6X,'HITH CLAY',«X,'DISSOLVED CONC'.ZX,
  OOJ11        «  '(M..3/5EC)')
  00112    5     FORM»T(2X,110,2X,7UPE12,5,SX),1PE12,5)
  001IJ    6     FORMAT(IJO)
  00114   C
  00115         END

          (FLECS VERSION 22.06)
                                        176

-------
(FLECS  VERSION 22.16)
1}.MAR-81    13132123  PAGE  00001
oonoi
oooo?
00003
0000«
oooos
00006
00007
00008
00009
00010
0001 1
0001?
00011
OOOlo
00015
00016
0001 7
0001 8
00019
00020
00021
00022
00023
00021
00025
00026
00027
00029
00029
OOOJO
00031
00032
00033
00031
00035
00036
OOOJ7
00038
00039
00040
oooai
00012
00013
OOoau
OOOU?
00006
00017
OOOflB
0004Q
00050
00051
00052
00053


C
C
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c

c

c

c

c

c















c
c
c
c
c
SUBROUTINE TRBFLOtCTRB, CTRIB, ENDTR8, ETIMf., FERR0R, DEPTH,
i NELEM, NCWUI, NE*TRB, QHIN, TRBOPT, DEPMIN)

WHEN THERE is A TRIBUTARY TO THE SEGMENT THIS SUBROUTINE is
CALLED tACH TIME STEP TO READ THE DATA FRO* LUN 7
WHICH WAS WRITTEN BY SUBROUTINE TRBOAT,

FORMAL PARAMETERS!
CT«8 REDISTRIBUTED CONCENTRATIONS
CTRlb ORIGINAL TRIBUTARY MA$S FLUX
ENDTRB ENDING TIME OF THE CURRENT TRIBUTARY DATA (1*0)
ETiMt ELAPSED TIME OF THE SIMULATION u*
-------
(FCECS  VERSION 22. 
-------
(FLECS  VERSION 22.
-MAR.8|    1JIJ2I36  PARE  00001
0000)
00002
OOOOJ
OOOOU
00005
00006
00007
00008
00009
00010
00011
00012
00015
00011
00015
00016
00017
oooje
00019
00030
00021
00032
00023
00030
00025
00026
00027
00028

C
C

C

C


C
C
C





C
C
C





C


SUBROUTINE TRISOL(*P1 ,01 ,D,02,R)
CALLED BY TRANSP.
USED IN ORIGINAL VERSION OF SERATRA
INCLUDE 'UMSIZ.PRM*

DIMENSION D(MXELEM), Ol(MXELCM), D2(*XELEM), R(MX£L£M)

NBMPt
Ml *N«1

FORWARD ELIMINATION

D0( Ia| ,N1 )
, 01 0«0 1 ( I ) /0( I )
. O(iti)=0(i*n-o2(n*oio
, R(Ifl)9"(I>l)*R(I)*010
...FIN

BACKWARD SUBSTITUTION

a (N) *a (N)/0(N)
00 (I«I,N1 )
, K»N-I
, P(K )«(R(K)«D2(K)*ff (K»l ) )/0(K)
...FIN

RETURN
END
          (FLEC3  VERSION  22,a6)
                                        179

-------
(FlECS  VERSION 22,<<6)
13-MAH-81
I3I32J«B  PAGE  00001
00001
00002
OOOOJ
ooooa
0000?
00006
00007
OOOOB
00009
00010
00011
00012
00013
oooiu
00015
00016
0001 7
00019
00019
00020
00021
00022
0002J
0002U
00025
00026
00027
00028
00029
000 JO
OOOJt
00032
00053
OOOJ«
OOOJ5
OOOJ6
00017
OOOjp
OOOi'
000«0
o o o m
0 0 0 a 2
000LEN
HTtAREA(J»l)*9LEN
NT«J
IELM(I)*J
GO TO 10
..FIN
..FIN
CONTINUE

LINFAHLY INTERPOLATE *10\» AT ELFMENT'S T"P NODE

wToP*«a » (ELTQP-f B)*(WT-«8) /(ET-EB)

ASSUME TRAPZOIDAL SH&PES TO FIND C«OSS-SFCT IUN^I. IREAS

ARATS(WTvWTuP)*{ET-ELTuP>'2,
AHBTa{l|lTOPt'*6)*(ELInP-£B)/^,

DElEWMINE IF NE« ELEMENT SURFACES HAyR «EEN FQuND TO
(A) LIE WITHIN A SINGLE DATA SET
IB) LIE IN SEQUENTIAL DATA SETS, QP
(C) BE 3EPARAUO BY QN£ OR MO&E DATA 3ETS
FINALLY, FORM THE CROSS-SECTIONAL ARE*

                                          180

-------
(FLECS  VERSION 22.«6)
IJ.MAR-61    13l32l«9  PAGE  00002
00050
00055
00056
00057
00058
00059
00060
0006]
00062
0006J
00060 C
00065 C
00066 C
00067
00068
00069
00070
00071 C
00072 C
0007J C
00070
00075
00076
00077
00078
00079 f
00080 E
INDIC»NT«NB
IFflNDIC ,EQ, 0) XSAREAU )»AR8T"AR88
IF (INUIC ,GE, t) XSAREA(I)3AR8TtARAB
IF (INOIC ,GE. ?)
XSAKao,
00(lI«N8tl«NT-| )
, xSAP«xSAR»(AREA(I)»XSAREA(l )/OELZ
A8AR(I)«AW10(I)*ALEN
BW I0( I + 1 )*WTGP
VOL«VOL»X8AREA(I)»ALEN

OVERWRITE INITIAL INFORMATION FOR NEXT ELEMENT

£LTOP«ELTOP*DELZ
ARABcAKAT
ARRH»*H8T
NB«NT
..FIN
!£TURN
NO
          (FLECS  VERSION  22.«6)
                                        181

-------
(FLECS VERSION 22,
            10-APR-S1
I3i56iu9  PAGE  ooooi
  OOOOi
  00002
  00003
  oooou
  00005
  00006
  00007
  00008
  00009
  00010
  00011
  0001?
  00011
  0001«
  00015
  QOQ1!)
  0001 7
  00019
  00019
  00020
  00021
  00022
  00023
  000?"
  0002?
  00026
  00027
  00028
  00029
  00030
  00031
  OOOJ2
  00033
  00035
  00036
  00037
  0003«
  00039
  000«0
  o o o 'j i
  000'42
  000«3
  0 0 0 '4 U
  000«6
  00017
  000«8
  00n<49
  00050
  00051
  00052
  0005J
  SUBROUTINE UPSOAT(ECHO, HLOERR, NUMERSi  S 1MLEN, OW JO , UEL )

THIS ROUTINE IS RESPONSIBLE FOR READING  THE  UPSTREAM INFLOW
CONDITIONS TO SEGMENT I. TH£ DATA IS  READ  FROM  THE  INPUT STREAM
(LUN 1) AND THEN WRITTEN TO "DUMMr. DTP  (LUN 2)  FOR  SUBSEQUENT
USE DURING THE SIMULATION,

  FORMAL PAHAMETEHSi
    ECHO   - LINE PRINTER ECHO OPTION  CONTROL VARIABLE  ( L » 1 )
    HLOERR • HOLDING ARRAY FOR ERROR  NUMBERS (BYTE)
    NUMEPR . NUMBER OF INPUT ERRORS
    3IMLEN • SIMULATION LENGTH (SECONDS  •  I***)

CALLED BV| SERATRA
CALLSl PUIERR

  INCLUDE ''
  BYTE
  LOGICAL*! ECHO

  DIMENSION CCIN(MXELE*,MAXCON), UWI D( MXELEM) ,  UEL(MXELEM)

  REWIND 2

  IF (ECHO) WRITE(6,6)

  ., .... UPSTREAM INFLOW CONDITIONS  TO  SEGMENT  1

  REPEAT UNTIL (ENOTIM .£0, -9909)

       RECOKD ONE .....
        COL,  1-IO...ENOTIM, f ,, ENDING TIM£ FOR  DATA  THAT  FOLLOWS,
                               A VALUE  OF -9999  TERMINATES  THE  DATA,
                               (SECONDS)
             11-15. ,,NH, ,.,.., .NUMBER OF ELEMENTS
           lb-25,..UOEPTH,, .ELEVATION  OF FpEE  SURFACE  ABOVE  BED

     HEADM.S) ENDTIM, NM,

               ,NE. -9
-------
(FLECS VERSION 22,06)
13156109  PARE  00002
00050
00055
00056
00057
00058
00059
00060
00061
00062
00063
00060
00065
00066
00067
00068
00069
00070
00071
00072
00073
00070
00075
00076
00077
0007B
00079
00080
00081
00082
00083
00090
00085
00086
00087
00088
00069
00090
00091
00092
00093
00090
00095
00096
00097
00"99
00099
ooioo
00101
00102
00103
00100
00105
00106
00107
00(08
00)09
C 3. ..CONCENTRATION OF CLAy (KG/M*«3)
£
C
c
£
c
c
c
c



















c



































«. ..CONCENTS* flON OF CONTAMINANT ASSOCIATED WITH
SAND
5, ..CONCENTRATION OF CONTAMINANT ASSOCIATED WITH
SILT
6, ..CONCENTRATION OF CONTAMINANT ASSOCIATED WtTH
CLAY
7, ..CONCENTRATION 0^ DISSOLVED CONTAMINANT

WHEN(NM ,GT. 0)
. DO U»1,NM)
, . READ (1,1) (CCiN(I,K), K»l, MAXCON)
, . , .FIN
...FIN
ELSE
, NMsMXELEM
. HEAO (l,|) (CCIN(l.K), K»l, MAxCoN)
. DO (I»2,NM)
, DO (Ksl, MAXCUN) CCIN(I,K)sCCIN(l,K)
, , . .FIN
, , , F I N
IF (ECHO)
. WRjTE(b,0) ENDTIM
, WRI TE (6, 3 )
. 00 (1*1, NM)
. WRITE(6,2) I, (CCIN(I,K) ,Kst, MAXCON)
. . . .p J^
...FIN

W«ITE (2) ENDTIM ,NM,UDEPTH, ( (CC IN( 1 , K ) , K« t , MAXCDN) , I a 1 ,NM )
PKETIM « ENIJTIM
, ,F JN
..FIN
IF (PREUM tuT, S1MLEN) CALL PUT£RR(20, NUM£RR, HLDERR)
C
REwiNt' 2
C RECORD 1HHEE..,.. CHANNEL CROSS-SECTION DATA
c 	 uwio -• wfinH Or SEGMENT AT NODES
c ,...,utL •• ELEVATION OF NODE ABOVE BOTTOM
C
C***************************************************************
C CAIJTJUNJ
C IF CONCENTRATIONS «RF INPUT AT VARIOUS DEPTHS,
C THE CHANNEL CROSS-SECTIONAL DATA MUST BE INPUT
C AT THQSE SAME DEPTHS.
C
C**************************************************************
READU,7) NWJO, UWJDTH, OEu
WHEN (NMIO.EQ.O)
e««.
DO ( I * 1 1 M^ELfcM )
Ut»lD( J)»UW IOFH
! UtL(I)aE
, F*E+OEL
...FIN
..FIN
                                         183

-------
(FLEC3  VERSION  32,06)
t3i56i«9  PAGE  ooooe
0005«
00055
00056
00057
00058
00059
00060
00061
00062
00061
0006«
00065
00066
00067
00068
00069
00070
00071
00072
00071
00071
00075
00076
00077
0007B
00079
oooeo
00091
OOQ82
00083
0008U
00085
00096
00087
00088
00089
00090
00091
00092
00n?j
0009U
00095
00096
00097
00098
00099
001 00
ooiot
00102
0010}
OOtOM
00105
00106
00107
00108
00109
C
C
C
C
C
C
C
C
C



















C





C

C
C
C
C
C*
C
C
C
C
C
c »









, . J,., CONCENTRATION OF CLAy (KG/M«*J)
, . «... CONCENTRATION OF CONTAMINANT ASSOCIATED WITH
. . SAND
. . 5, ..CONCENTRATION OF CONTAMINANT ASSOCIATED WITH
. . SILT t
. . 6, ..CONCENTRATION OF CONTAMINANT ASSOCIATED WITH
. . CLAY
. . 7, ..CONCENTRATION OF DISSOLVED CONTAMINANT
. .
, , ^H£N(NM ,GT. o)
... 00 (1»J,NM)
.... READ (1,1) (CCIN(I,K), K»l> MAXCON)
	 FIN
. . ...FIN
. . ELSE
. . . NMsMXELEM
. . , HEAD (1,1) (CCIN(1,K), K.I, MAxCQN)
... DO U'2,NM)
.... 00 (Ksl, MAXCON) CCIN(T.»K)«CCIN(1,K)
	 FIN
• • t f t " * ™
. . IF (ECHO)
. . . w«lTE(b,'O ENDTIM
. . . WRIT£(6,J>
... 00 (Isl,NM)
.... WRITE{6,2) I, (CC1N(I,K),K*1, MAXCON)
	 FIN
	 fin
t •
, . W*ITE<2) ENDTIM, NM, UDEPTH, ( (CCIN(1 ,K) ,K«l ,M*XCON) , Ia| ,NM)
, , PHETIM a ENIJTJM
. ...FIN
...FIN
IF (PRE'IM tLT, SIMLEN) CALL PUTERR(2«> NUMgRR, HLDERR)

RtWINU 2
RECORD IHHEE.....CHANNEL CROSS-SECTION DATA
,,..,uKio — wfnTH OF SEGMF.NT AT NQOES
. ....utL •• ELEVATION OF NODE ABOVE BOTTOM
'
•»•**•«»»»*»<•****•«»*»•»»»*•»»«»«*«**•«»»*»•***»•***«»*******
CA1IT1UNI
IF CONCENTRATIONS »PE INPUT AT VARIOUS DEATHS,
THE CM»NNtL CROSS-SECTIONAL DATA MUST HE. INPUT
AT THQSE SAME DtPTHS.

**»»**»«»***<»**»**»»»t*******»»*»»»*«»**»**.»»***»*»***»*i>**
READ(1,7) NWID, UWfOTH, DEL
WHEN (NWJO.EQ.O)
. ES<>,
, 00 ( I - I , M
-------
(FUCS VfHSION
                                 PAGE  oooos
  00110
  00111
  001 12
  00111
  09114
  001 15
  001 16
  OOU7
  00116
  001 19
  00120
  00121
  00122
  0012J
  00120
  00125
  00126
  00127
  00128
  00129
  00130
  001 Jl
  00112
  oom
  001 3«
  001i<5
  00116
  00137
  OOUfl
  00119
  00140
  ooiai
 ELSE
 ,  READ(l,l) (UWID( I) ,Ial «NWID)
 ,  HEAO(1,1)
 ,  if (wwio.tr.
 ,  .  DO (I » NW1D » 1,MX£IEM)
 ,  .  .  UWIO(I) * UWIDTH
 .  .  .  UEL(I) « UEUI-I) + OEL
 ..... FIN
 .  ...FIN
 ...FIN
 IF(ECHO)
 ,  WRITE(6,8) (I,UWID(I),I»l,MxELEM)
 ,  WRIT£(6,9) (I
 RETURN

 FORMAT (8FIO.O)
                                   *SSOC,',2X),2X,ICONTAMINANT'X
2  9x, 'SUSPENDED SAND t, | x ,' SUSPENDED SIM ', 1 X, » SUSPENDED CL*Y»,
i  JX.'WITH SANo',6x,»t*rrH SILT', 6x, 'WITH cLAr»,«x, »oissoi. VED  '
«  'CONC,')
 FO»H»? { 1H0.8X, IIO» ' ,,,0»TA SET E^olNO TlM£')
 FORM*! (110, 15, F10, 0)
 FORMAT (1HO,««X, "UPSTREAM INFLOW WATER CONO I T IUHS ' )
 FORMAT  (I5,2FJO,0)
 FORMAT  (IHO,56X, IX. SECTION M IDT H3 I /It ( J7X , 5 ( I 3, 1 P E I 2 . 5) /) )
 FORMAT  (IHO,58X, IX- SECTION ELEVAT IONS ' /O (27X , 5( I 3 , 1 PC 12 ,5) /))

 END
          (FUECS  VERSION  22,
                                        185

-------
(FLECS  VERSION  22,06)
29.MAK-8I    07l22»56  PAGE  OQOOl
oooot
00002
OOOOJ
00004
00005
00006
00007
OOOOP
oooo1?
00010
0001 1
00012
OOOtJ
000 11
00015
00016
0001 7
00016
00019
00020
00021
00022
00023
00020
00025
00026
00027
00028
00029
00030
00031
OOOS2
0003J
0003"
00035
000j6
00037
00038
00039
00000
00001
0 0 0 
-------
(FLEC3  VERSION 2?.«6)
                29.MAH-81   0/123156  PAGE  00003
  00051
  00055
  00056
  00057
  0005«
  00059
  OOOjO
  00061
  00062
  00065
  00060
  00065
  00066
  00067
  00068
  00069
  00070
  00071
  00072
  00075
  0007U
  00075
  00076
  00077
      If (ECHO)
      .  WRirt(6,3>
      ,  WR1TM6.5)
      ,  00 (J«l,NELEMf1)
                       ,(C(J,K),Ks!,MAXCON)
      ...FIN
C
      RETURN
t
I     FQRMAI(8F10.0)
2     FORMATUS.FIO.OJ
3     FORMAT OH«iS2X» ' INITI*L «4TER CONDITIONS')

5     FORMAT(1HO,'ELEMENT',IX,
     1  3(3x,'CONC, OF),ux),3(lX,'CONC. AS30C,',2x),2X,'CONTAMJN&NT ' -
     2  9X,'SUSPENDED SANOMX, '3USPENPEO SILT ', IX, 'SUSPENDED CL*Y',
     3  3x,'«irH s*Noi,6x, »WITH siLr»,6x, IWITH CLAV^X,'DISSOLVED '
     
-------