M2D Report2
Contents
 1 List of Figures
 2 List of Tables
 3 Preface
 4 Introduction to CMSM2D
 5 Governing Equations for Water Motion
 6 Governing Equations for Sediment Motion and Methods for Morphologic Constraints
 7 Numerical Implementation of Governing Equations for Water Motion
 8 Numerical Implementation of Governing Equations for Sediment Motion
 9 Boundary Conditions
 10 Model Features
 11 Surfacewater Modeling System Interface for CMS‑M2D
 12 Model Setup and File Structure
 12.1 Grid file
 12.2 Model control
 12.3 Initial conditions
 12.4 Waterlevel forcing data files
 12.5 Velocity forcing data files
 12.6 Flow rate forcing data files
 12.7 Wind speed and direction
 12.8 Tidal constituents
 12.9 Wave stresses
 12.10 Wave properties file
 12.11 Sediment transport and morphology change specifications file
 12.12 Nonerodible cell specifications file
 12.13 Selected cell output specification file
 12.14 Global output time specification files
 12.15 Output Files
 13 Example Applications
 14 References
 15 Appendix AExample Input and Output Files
 16 Appendix BM2D Citations
 17 Appendix CSlosh Tests
 18 Appendix DWind Set Up Tests
 19 Appendix EAdvection Test
 20 Appendix FWetting and Drying Tests
 21 Appendix GWaveAdjusted Boundary Condition Test
 22 Appendix HSurf Zone Verification Tests
 23 Appendix IHardBottom Tests
List of Figures
Figure 1.  Comparison of longshore current speed values for Visser Case 4  12 
Figure 2.  Definition of continuity (conservation of volume) of sediment transport  25 
Figure 3.  Vertical distributions of mixing coefficient due to current and wave  29 
Figure 4.  Schematic hardbottom grid and potential transport rates  35 
Figure 5.  Corrected hardbottom depths and adjusted transport rates  37 
Figure 6.  Cell and variable definitions for CMSM2D  40 
Figure 7.  Control volume definition for xmomentum equation  41 
Figure 8.  Control volume definition for ymomentum equation  44 
Figure 9.  Bottomfriction coefficient adjustment versus total water depth  49 
Figure 10.  Control volume definition for continuity equation  53 
Figure 11.  Cell numbering system  54 
Figure 12.  CMSM2D grid and ADCIRC mesh for Shinnecock Inlet, NY  80 
Figure 13.  Time discretization of a sinusoidal waterlevel curve  81 
Figure 14.  Example CMSM2D and STWAVE grid orientations  83 
Figure 15.  Example CMSM2D and STWAVE grid spacing  84 
Figure 16.  Grid frame around scattered data points  87 
Figure 17.  Map> 2D Grid and Refine Point dialogs  89 
Figure 18.  SMSgenerated CMSM2D grid  90 
Figure 19.  Arc options for developing coastlines  91 
Figure 20.  CMSM2D Boundary Conditions dialog  93 
Figure 21.  Extract Boundary Conditions dialog  96 
Figure 22.  Extract Tidal Constituents dialogs  96 
Figure 23.  Assign Cell Attributes dialog  98 
Figure 24.  Model Checker dialog  99 
Figure 25.  CMSM2D Model Control: Model Control dialog  100 
Figure 26.  CMSM2D Sediment Transport Option dialogs  102 
Figure 27.  CMSM2D Model Control: Model Parameters dialog  103 
Figure 28.  CMSM2D Model Control: Time Control dialog  105 
Figure 29.  CMSM2D Model Control: Output Control dialog  105 
Figure 30.  CMSM2D Model Control: Tidal Constituents dialog  107 
Figure 31.  Steering Module dialog  109 
Figure 32.  Steering Module Restart Options dialog  109 
Figure 33.  Configuration for channel infilling tests  125 
Figure 34.  Surface elevation, current velocity, and concentration calculated by AD formulation with LundCIRP formula  125 
Figure 35.  Channel profile change by AD formulation, grain size = 0.2 mm  126 
Figure 36.  Channel profile change by TL formulation, grain size = 0.2 mm  126 
Figure 37.  Channel shape comparison between AD and TL formulations, grain size = 0.2 mm  127 
Figure 38.  Channel profile change by AD formulation, grain size = 0.4 mm  128 
Figure 39.  Channel profile change by TL formulation, grain size = 0.4 mm  128 
Figure 40.  Bathymetry and CMSM2D computational grid for Ocean City Inlet  129 
Figure 41.  Bathymetry and STWAVE computational grid for Ocean City Inlet  129 
Figure 42.  Regional ADCIRC mesh and bathymetry for Maryland coast  130 
Figure 43.  Calculated peak watersurface elevation along Maryland coast for December 1992 storm  131 
Figure 44.  Calculated velocity field at Ocean City Inlet during 4.8 m wave condition, December 1992 storm  132 
Figure 45.  Calculated velocity fields at 10hr intervals at Ocean City Inlet, December 1992 storm  133 
Figure 46.  Calculated depth at Ocean City Inlet, December 1992 storm  135 
Figure 47.  Calculated depth change at Ocean City Inlet, December 1992 storm  136 
Figure 48.  Aerial photograph of Sebastian Inlet with hard bottom shown  137 
Figure 49.  Bathymetry and CMSM2D computational grid for Sebastian Inlet  138 
Figure 50.  Bathymetry and STWAVE computational grid for Sebastian Inlet  139 
Figure 51.  Detail of CMSM2D grid resolution and bathymetry at Sebastian Inlet  139 
Figure 52.  Hardbottom cells specified for Sebastian Inlet  140 
Figure 53.  Representative calculated ebb and flood currents at Sebastian Inlet  141 
Figure 54.  Calculated depth change at Sebastian Inlet after 360 hr  142 
List of Tables
Table 1.  Features of Calculation of Pickup and Deposition Rates  PAGEREF TabFeaturesMethodPickupDepo 76 
Table 2.  Boundary Condition Types  171 
Table 3.  Criteria for Flooding and Drying Algorithms  185 
Table 4.  Definitions of Parameters in Grid File  225 
Table 5.  Cell Types and Their Function in CMSM2D  228 
Table 6.  Model Control File Specifications  231 
Conversion Factors, NonSI to SI Units of Measurement

NonSI units of measurement used in this report can be converted to SI units as follows:
Multiply  By  To Obtain 
acres  4,046.873  square meter 
cubic feet  0.02831  cubic meters 
cubic yards  0.7645549  cubic meters 
feet  0.3048  meters 
miles (U.S. nautical)  1.852  kilometers 
miles (U.S. statute)  1.609347  kilometers 
Preface
The tidal and nearshore circulation model CMSM2D is being developed in the Coastal Inlets Research Program (CIRP) as part of the Coastal Modeling System (CMS). The CMS is a suite of coupled models operated in the Surfacewater Modeling System, which is an interactive and comprehensive graphical user interface environment for preparing model input, running models, and viewing and analyzing results. The CIRP is administered at the U.S. Army Engineer Research and Development Center (ERDC), Coastal and Hydraulics Laboratory (CHL) under the Navigation Systems Program for Headquarters, U.S. Army Corps of Engineers (HQUSACE). Mr. Barry W. Holliday was formerly HQUSACE lead technical monitor for the CIRP. Dr. Sandra K. Knight and Mr. James E. Clausner, CHL, are the Technical Director and Associate Director, respectively, for the Navigation Systems Program. Dr. Nicholas C. Kraus, Senior Scientists Group (SSG), CHL, is the CIRP Program Manager. This report is the second in a series on CMSM2D, documenting upgrades to the circulation model and new capabilities to calculate sediment transport and morphology change at coastal inlets and adjacent beaches and waterways.
 The mission of the CIRP is to conduct applied research to improve USACE capability to manage federally maintained inlets, which are present on all coasts of the United States, including the Atlantic Ocean, Gulf of Mexico, Pacific Ocean, Great Lakes, and U.S. territories. CIRP objectives are to advance knowledge and provide quantitative predictive tools to (a) make management of coastal inlet navigation projects, principally the design, maintenance, and operation of channels and jetties, more effective and reduce the cost of dredging, and (b) preserve the adjacent beaches in a systems approach that treats the inlet and beach together. To achieve these objectives, the CIRP is organized in work units conducting research and development in hydrodynamic, sediment transport and morphology change modeling; navigation channels and adjacent beaches; inlet structures and scour; laboratory and field investigations; and technology transfer.
 This report was prepared by Dr. Adele Militello Buttolph, Coastal Analysis LLC; Dr. Christopher W. Reed, URS Corporation; Dr. Kraus, CHL; Dr. Nobuyuki Ono, presently at ECOH Corporation, Tokyo, Japan, and formerly at Kyushu University and guest researcher, CHL; Drs. Magnus Larson, Benoit Camenen, and Hans Hanson, Lund University, Sweden; Mr. Ty Wamsley, CHL, and Dr. Alan K. Zundel, Environmental Modeling Research Laboratory, Brigham Young University. Dr. Buttolph was Principal Investigator for CMSM2D model development. Dr. Frank S. Buonaiuto, State University of New York at Stony Brook, Marine Sciences Research Institute, Mr. Kenneth J. Connell, Coastal Engineering Branch, CHL, and Mr. Mitchell E. Brown, SSG, CHL, contributed to model development and testing. Work was performed under the general administrative supervision of Mr. Thomas W. Richardson, Director, CHL, and Dr. William D. Martin, Deputy Director, CHL.
 At the time of publication of this report, Dr. James R. Houston was Director of ERDC, and COL Richard B. Jenkins, was Commander and Executive Director.
Introduction to CMSM2D
A coastal inlet connects an ocean, sea, or lake through a typically narrow landmass to the water body behind it, such as a bay, estuary, lagoon, or river. Hydrodynamic forcing contributing to the water exchange that maintains the coastal inlet channel may be the tide, river flow, wind, or seiching. A tidal inlet is the most common type of coastal inlet and is the waterway connecting the ocean and a bay, a lagoon, or a river entrance through which tidal and other currents, such as from rivers, flow. Longer period flows at coastal inlets, nearshore currents produced by waves, and wave action move sediment at many temporal and spatial scales, constrained by the sea bottom morphology, jetties, training structures, and navigation channel dredging. Change in morphology at coastal inlets in turn modifies the incident waves, circulation, and sediment pathways. Kraus (2006) gives an overview of morphologic response to coastal inlets and to engineering actions taken at inlets.
Advances in numerical modeling, increased speed of desktop computers, and reliable and powerful interfaces now make calculation of morphology change at coastal inlets feasible, despite the large number of interacting processes. Simulation of morphology change at inlets is an emerging area of applied research of interest to the U.S. Army Corps of Engineers (USACE) and its navigation mission at coastal inlets in design, operation, and maintenance of navigation channels and jetties, and in operating coastal inlets within the sedimentsharing system connecting the inlet, adjacent beaches, and bay.
Because of the wide range of problems to be addressed, both basic and applied, success in simulation of coastal inlet processes is promoted by exchange of information among interdisciplinary teams of coastal engineers and scientists working in government, private industry, and academia. A system approach is required that is based on a comprehensive numerical model with a code accessible to a wide range of researchers. At the same time, the model should be efficient in calculation so that it may be exercised in addressing practical problems. Experience with a variety of coastal inlets and engineering problems will call for continued improvement and advances in model capabilities.
The model M2D (Militello et al. 2004) is being developed under the Coastal Inlets Research Program (CIRP) conducted at the U.S. Army Engineer Research and Development Center (ERDC), Coastal and Hydraulics Laboratory (CHL) as a numerical simulation predictive tool with which to support multidisciplinary research teams and conduct practical projects at coastal inlets. CMSM2D is a component of the CIRP’s Coastal Modeling System (CMS), formerly called the Inlet Modeling System, which is designed to calculate combined circulation (current and watersurface elevation), waves, and morphology change at inlets and nearby areas and operated on desktop computers through operation in the Surfacewater Modeling System (SMS) interface (Zundel 2000). In this interactive environment, CMSM2D can simulate hydrodynamics, sediment transport, and morphology change at project level at coastal inlets and the connecting nearshore and bay. CMSM2D is computationally efficient, easy to set up, and incorporates features required for many coastal engineering applications. CMSM2D can be coupled to regional circulation models, such as the ADvanced CIRCulation (ADCIRC) model (Luettich et al. 1992), through boundary conditions (Militello and Zundel 2002a, 2002b), providing flexibility for larger scale applications and connectivity between models. At the same time, the code is accessible to CIRP researchers with expertise in areas other than computational fluid dynamics, as expected in interdisciplinary teams.
Prior to 2005, the model was called M2D. Because the model is central to the CMS in terms of its flexibility and functionality, it was renamed CMSM2D in 2005. In this report, the model will be referred to as M2D or CMSM2D, depending on if the reference is to the model prior to 2005 or to the present version.
The first report in the M2D series (Militello et al. 2004) documented Version 2.0, which calculated hydrodynamics under general forcing by tide, waves, and wind. The present report describes CMSM2D Version 3.0, building upon the original technical documentation and describing sediment transport and morphology change calculations, other model advancements, changes to input and output formats, interface modifications, and example applications. An effort was made to provide a complete description of CMSM2D in this report so that it is selfcontained with respect to both the hydrodynamics and morphology change.
Scope of Model
CMSM2D, Version 3.0, is a finitevolume numerical representation of the twodimensional (2D) depthintegrated continuity and momentum equations of water motion. It also contains integrated representation of sediment (presently, sandsized sediment) transport and morphology change through transport rate formulations, the advectiondiffusion equation, and the sediment continuity equation for updating change in the sea bottom. Wave forcing is included in CMSM2D through coupling with a wave model. In the CMS, radiation stresses from surface waves force currents and change the watersurface elevation and, if required, the calculated current can be input to the wave model to transform waves propagating on it. The governing equations, finitevolume approximations, representation of bottom and surface stresses, grid scheme, boundary conditions, other model features, and graphical interface are described in this report. Examples are given to demonstrate capabilities of CMSM2D.
Calculation cells in CMSM2D are defined on a staggered, rectilinear grid and can have constant or variable side lengths. Momentum equations are solved in a timestepping manner first, followed by solution of the continuity equation, in which the updated velocities calculated by the momentum equations are applied. Optional sediment transport calculations are conducted on updated velocity and watersurface elevation values, together with wave properties if they are included in a specific simulation.
For support of engineering applications, features of CMSM2D include flooding and drying, windspeed dependent (timevarying) winddrag coefficient, variably spaced bottomfriction coefficient, wavestress forcing that can vary in space and time, efficient grid storage in memory, hotstart options, and the convenience of independently turning on or off the advective terms, mixing terms, wall friction, and sediment transport and morphology change calculations. Features of the sediment transport component include three transport formulation options, control over timing of transport calculations and morphology change calculations, representation of hard or nonerodible bottom, and representation of avalanching of seabottom slopes. Additionally, model output is written in formats convenient for importing into commercially available plotting packages. CMSM2D operates exclusively in SI units and requires that input be provided in metric units.
CMSM2D has been designed as a projectscale model that can be easily and quickly applied to examine engineering issues at coastal inlets such as navigation channel infilling, natural sand bypassing, consequences of mining ebb or floodtidal shoals, and changes in hydrodynamics and sediment transport in response to modifications to jetties. The model has been developed to maximize flexibility in grid specifications and forcing. For example, if forcing by watersurface elevation time series is prescribed as a boundary condition, the time interval between values in the time series does not have to be constant. Thus, if values were being supplied from a waterlevel gauge and the sampling rate was modified, the measurements could be prescribed as forcing without subsampling the data set.
Implementation within SurfaceWater Modeling System
A graphical interface for CMSM2D is implemented within the SMS, Versions 8.1 and higher (Zundel 2000). Features of the CMSM2D interface cover grid development, control file specification, boundary condition and wind specification, coupling with regional and wave models, model runs, postprocessing of results, and input and output visualization. The SMS provides flexibility in grid generation and modification by incorporating modelspecific tools to assign bathymetric data sets for interpolating to the CMSM2D grid, manually modifying depths and friction coefficients, adjusting cell sizes, and inserting or deleting calculation cells. Variably spaced grids can be readily developed with SMS tools that spatially scale the cell sizes over userdefined extents. The SMS contains dialogs for specification of boundary conditions. For some boundary types, forcing information can be input manually from within the SMS, or predefined information can be read from files. A model control dialog provides the user with a convenient interface for specifying timing control, model options, wind and wave forcing, sediment transport and morphology change options, and output options.
CMSM2D can be driven by largerdomain circulation models, such as ADCIRC, through boundary specification capabilities contained within the SMS. The boundary conditions dialog allows access to solutions from largerdomain models that can be extracted and mapped to CMSM2D boundaries. The user can decide whether to specify watersurface elevation or a combination of watersurface elevation and velocity as boundary input for CMSM2D. This capability provides CMSM2D with boundary conditions that preserve tidal phase and other variations calculated by a larger or regional scale model.
The SMS also allows automated coupling of CMSM2D with the STeady state spectral WAVE model STWAVE (Smith et al. 1999, 2001) and the Wave Action Balance Equation with Diffraction (WABED) model (Mase 2001; Mase and Kitano 2000; Mase et al. 2005) through a Steering Module dialog, which is convenient for projects that require wavestress forcing for CMSM2D. The Steering Module allows the user to control the model coupling, giving flexibility in conducting simulations of wavedriven currents and the wavecurrent interaction.
Sediment transport and morphology change options are specified within the SMS model control dialog for CMSM2D. This dialog allows the user to select from three sediment transport formulations and enter formulationspecific parameters. Timing controls for sediment transport rate calculations and for morphology change are included in the dialog.
Studies Performed with CMSM2D
CMSM2D has been developed and tested in basic and applied studies covering a wide range of bathymetric configurations, forcing, and project goals. Summaries of selected applications are described here to familiarize users with model capabilities and to establish model history.
M2D was first applied to investigate hydrodynamic responses to proposed engineering projects on the Texas coast. Inlet and bay hydrodynamics on this coast are frequently dominated by wind forcing, making this region a more complex study area than most inlet and bay systems on the Atlantic and Pacific Ocean coasts of the United States. Changes in circulation patterns in the Upper Laguna Madre and exchange of water with the Gulf of Mexico were calculated for proposed causeway modifications designed to improve evacuation safety (Brown, Militello, and Kraus 1995a, 1995b, 1995c) for the Kennedy Causeway that connects North Padre Island with the mainland. As a result of the analysis, the Kennedy Causeway was elevated to provide improved circulation to the Laguna Madre and a more reliable evacuation route from North Padre Island.
In an investigation of a proposed new inlet called the Southwest Corner Cut that would connect East Matagorda Bay to the Colorado River Navigation Channel, TX, M2D was applied to calculate water velocity changes in the navigation channel and Gulf Intracoastal Waterway and to determine whether the new inlet would promote closure of Mitchell’s Cut (Kraus and Militello 1996, 1999; Militello and Kraus 1998) an inlet and flood relief channel located on the opposite end of East Matagorda Bay.
In a basic study of the hydrodynamics of Baffin Bay, TX, M2D was applied to calculate the winddriven circulation and set up and set down in this nontidal bay (Militello 1998, 2000). Model calculations also determined the contributions of nonlinear terms in the governing equations to harmonics of the oscillatory wind (sea breeze) forcing in Baffin Bay (Militello 1998; Militello and Kraus 2001).
In a channel infilling study for Bay Center, a harbor located inside Willapa Bay, WA (Kraus, Arden, and Simpson 2000), M2D calculated current velocity over a 1month time interval from which bed elevation changes were computed (Militello 2002; Militello et al. 2003). The Bay Center application also demonstrated successful coupling of M2D with ADCIRC. This success, combined with CIRP goals, led to the development of automated M2D and ADCIRC (or other largerdomain model) coupling capability within the SMS (Militello and Zundel 2002a, 2002b).
As part of the CIRP’s efforts to assure model reliability, M2D calculated tide and wavedriven currents at an idealized inlet and ebb shoal for fair weather and storm waves (Militello and Kraus 2003). Interactions between wavedriven currents and the ebb jet varied, depending on the relative strength of the two current sources. For storm waves, calculated alongshore velocities were stronger and the surf zone was wider and farther from shore, as compared to the fairweather waves. This study demonstrated coupling of M2D and a surface wave model (STWAVE), described in this volume and by Militello and Zundel (2003), and the capability to calculate sediment transport and morphology change that has since been advanced.
Recent applications include calculation of hydrodynamics and morphology change under combined tide and wave forcing at Shinnecock Inlet, NY (Bounaiuto and Militello 2004) and at the mouth of the Colorado River, TX (Lin, Kraus, and Barcak 2004). The study at Shinnecock Inlet compared measured change in bathymetry at the inlet and ebb shoal with calculations representing the same 6month time frame (13 August 1997 to 28 May 1998). Observed major changes in morphology were shown to be represented by the model, including westward migration of the channel thalweg, scour of the inlet throat, and accretion of the ebb shoal. For the Colorado River study, six structural alternatives were evaluated for performance relating to sediment management at the inlet (river mouth) entrance. For the existing condition, M2D was demonstrated to reproduce sediment shoaling at the entrance and filling of a deposition basin located adjacent to a weir jetty.
Report Contents
This report describes Version 3.0 of CMSM2D and gives instruction on development of a CMSM2D project within the SMS. Chapter 2 covers the governing equations for water motion that are solved in the model. Chapter 3 similarly covers the governing equations for sediment motion and morphology change, as well as methods describing morphologic constraints that have been implemented in CMSM2D. Chapter 4 describes the numerical approximations for water motion and defines the cell numbering method, and Chapter 5 describes the numerical approximations for sediment motion and morphology change. Chapter 6 reviews the types of boundary conditions available in CMSM2D. Chapter 7 describes key model features, and Chapter 8 reviews the SMS interface for CMSM2D and provides guidance for project development. Chapter 9 provides information on model setup and file structure. Chapter 10 provides example applications of CMSM2D.
Appendices supplement the main text and contain more detailed and auxiliary information. Appendix A gives example input and output files. Appendix B provides references for CMSM2D development and applications. Appendices C through F describe results of numerical model integrity tests. Appendix G demonstrates the waveadjusted boundary condition, which modifies prescribed boundary condition values for the presence of wave forcing. Appendix H compares calculated and measured longshore currents from laboratory experiments. Appendix I demonstrates the capability for representation of hard bottom (nonerodible bottom).
Governing Equations for Water Motion
CMSM2D solves the 2D, depthintegrated continuity and momentum equations by applying a finitevolume method. Velocity components are calculated in two horizontal dimensions. This chapter introduces the governing equations and describes the respective terms and variables. Wind and bottom stress formulations are presented, as well as implementation of wave stresses.
The 2D depthintegrated continuity and momentum equations solved by CMSM2D are:
(1) 
(2) 
(3) 
=stillwater depth relative to a specific vertical datum  
=deviation of the watersurface elevation from the stillwater level  
=time  
=flow per unit width parallel to the xaxis  
=flow per unit width parallel to the yaxis  
=depthaveraged current velocity parallel to the xaxis  
=depthaveraged current velocity parallel to the yaxis  
=acceleration due to gravity  
=diffusion coefficient for the x direction  
=diffusion coefficient for the y direction  
=Coriolis parameter  
=bottom stress parallel to the xaxis  
=bottom stress parallel to the yaxis  
=surface stress parallel to the xaxis  
=surface stress parallel to the yaxis  
=wave stress parallel to the xaxis  
=wave stress parallel to the xaxis  
Component velocities are related to the flow rate per unit width as:
(4) 
(5) 
For the situation without waves, bottom stresses are given by:
(6) 
(7) 
where U = total current speed and C_{b} = empirical bottomstress coefficient. The total current speed is:
(8) 
The bottomfriction coefficient is calculated by:
(9) 
where C = Chezy coefficient given by:
(10) 
in which R = hydraulic radius, and n = Manning roughness coefficient.
In the presence of waves, the bottom stress contains contributions from both the quasisteady current (as from tide, wind, and surface waves) and the bottom orbital motion of the waves. Assessment of an average bottom stress over the period of a surface wave, which requires numerical integration, would need to be performed at every grid point at every time step, a computationintensive operation. Instead, here a square wave approximation for the wave is applied, which allows analytic estimation of the time average. It is given by the following approximation for the timeaveraged bottom stress under combined currents and waves (Nishimura 1988):
(11) 
(12) 
in which = wave angle relative to the xaxis, and and are given by:
(13) 
(14) 
where = wave angular frequency, H = wave height, and k = wave number.
Surface wind stresses are given by:
(15) 
(16) 
where
= wind drag coefficient
= density of air
= density of water
= wind speed
= wind direction
The convention for wind direction is specified to be 0 deg for wind from the east with angle increasing counterclockwise.
Wave stresses are calculated from spatial gradients in radiation stresses as:
(17) 
(18) 
where S_{xx}, S_{xy}, and S_{yy} are wavedriven radiation stresses. Radiationstress tensor calculations are based on linear wave theory and computed within STWAVE, WABED, or other wave model for supplying information to CMSM2D. They represent the summation of standard tensor formulations across the defined spectrum. For a coordinate system with the xaxis oriented normal to the shoreline, the tensor components are (Smith et al. 2001):
(19) 
(20) 
(21) 
where
= flux of shorenormal momentum
= flux of shoreparallel momentum, or the shear component of the radiation stress
= flux of momentum alongshore
= wave energy density
Wave models such as STWAVE typically calculate in coordinate systems such that the xaxis is normal to the shoreline (positive x directed toward shore) and the yaxis is parallel to the shoreline. For CMSM2D applications, the radiationstress tensor is rotated from the STWAVE grid and mapped onto the CMSM2D grid by the SMS.
The Coriolis parameter is given by:
(22) 
where = angular frequency of the Earth's rotation, and = latitude.
The depthmean horizontal eddy viscosity coefficient D depends on the strength of mixing in the water column, which is a function of the acting processes at a particular location. If waves do not contribute significantly to mixing, D can be calculated as a function of the total water depth, current speed, and bottom roughness as (Falconer 1980):
(23) 
where the subscript o denotes oceanic mixing. The form of the eddy viscosity coefficient given by Equation 23 produces a mixing term that is weakly nonlinear.
In the surf zone, waves contribute significantly to lateral mixing, and the eddy viscosity coefficient is expected to be a function of the wave properties. In CMSM2D, surf zone mixing is represented by:
(24) 
where describes the lateral mixing below trough level (Smith, Larson, and Kraus 1993) and is expressed as (Kraus and Larson 1991):
(25) 
where = empirical coefficient representing the lateral mixing strength, and u_{m} = amplitude of the horizontal component of the wave orbital velocity at the bottom given by:
(26) 
where T = wave period.
Mixing is a vigorous threedimensional (3D) process in the surf zone not readily represented in a depthaveraged model. Such vertical processes cannot be directly described in a depthaverage model, and the mixing coefficient in Equation 25 should be considered as a surrogate. Streaming from undertow advects turbulent eddies or mixing offshore, and this mixing can support a strong current seaward of the wave breakpoint (Putrevu and Svendsen 1992). With further distance seaward, the vertical current decreases as the volume of water increases, weakening the mixing and the longshore current.
The transition between surf zone mixing and oceanic mixing seaward of the breakpoint is represented in CMSM2D by a weighted mixing coefficient specified as:
(27) 
where the weighting parameter is given by:
(28) 
The method of weighting and the weighting parameter are ad hoc and must be validated by comparison to data. Intuitively, a cubic dependence on water depth introduces the fluid volume.
To illustrate the control on the crossshore distribution of the longshore current by wave friction and representation of mixing, four simulations were conducted that correspond to Visser (1982) Case 4. The Visser laboratory data and CMSM2D grid and parameter values are described in Appendix H with one difference being that the Manning’s n value for velocities discussed in this section was 0.013. The four simulations consisted of combinations of wave friction specification and mixing coefficient. Simulations denoted as "No Wave Friction" did not include waves as a source of friction, whereas "Wave Friction" denoted the bottom stress as defined by Equations 11 and 12. Mixing coefficients were calculated as "Wave Mixing," which indicated application of Equation 24, and "Weighted Mixing," which denoted the combined oceanic and surf zone mixing described by Equation 27.
Calculated and measured longshore current for Visser Case 4 are compared in Figure 1. Values of distance increase toward the offshore direction. Peak calculated current speed varies between 0.37 and 0.40 m/s and measured peak speed is 0.39 m/s. Thus, combinations of both wave friction and representation of the mixing coefficient exert control on the maximum current speed. Greatest variation among the calculated speeds is located between the peak current and the weakening current with distance offshore. Calculation with the weighted mixing coefficient and wave friction produced a curve in which the magnitude and slope compare well with measurements. All remaining calculations show deviation in magnitude and curvature from measured values in the offshore tail.
Accurate estimation of the windstress coefficient is necessary for calculating windinduced flow in shallow water (depths . A short review describing the development of the variable windstress coefficient implemented in CMSM2D is presented here.
The flux of momentum into the water column from the wind is specified as a function of the wind speed and windstress coefficient. Anemometer height above the water or land surface must be considered for accurate estimation of the windstress coefficient because wind speed varies logarithmically in the vertical direction for unstratified atmospheric conditions. A general law for the vertical wind profile is given by (Charnock 1955; Hsu 1988):
(29) 
where
= wind speed at height Z above the surface
= surface roughness
= friction velocity
= von Kármán constant
The friction velocity is defined in terms of the surface wind stress as (Hsu 1988):
(30) 
where K_{m} = eddy viscosity coefficient, and z is the vertical dimension.
Under the assumption of nearly neutral atmospheric stability, the windstress coefficient over water at a height 10 m above the water surface, C_{10}, can be expressed as (Hsu 1988):
(31) 
where W_{10} = wind speed in meters per second at 10 m above the surface. Equation 31 includes the assumption of fully developed seas. For measurements of wind speed made at heights other than 10 m, an approximation for the 10m wind speed is (Shore Protection Manual 1984):
(32) 
The surface windstress Equations 15 and 16, as implemented in CMSM2D, apply the 10m winddrag coefficient and wind speed to compute the surface stress. Thus, values of C_{10} and W_{10} defined by Equations 31 and 32 are specified as C_{d} and W in Equations 15 and 16.
Equations 31 and 32 have been successfully applied in modeling studies investigating motion in strong windforced shallow embayments with typical depths ranging from 1 to 4 m (Brown, Militello, and Kraus 1995a; Kraus and Militello 1999; Militello 2000). Calculated water level and current compared well with measurements, indicating that these formulations are satisfactory for estimation of the vertical wind profile and wind stress in shallowwater systems.
Governing Equations for Sediment Motion and Methods for Morphologic Constraints
As a userspecified option, CMSM2D calculates sediment transport rates and resultant changes in water depth (bottom elevation) through gradients in the transport rates. In CMSM2D Version 3, three transport rate formulations are available:
 Watanabe (1987) total load formulation.
 LundCIRP (Camenen and Larson 2005, 2006) total load formulation (combined suspended and bed load).
 Advectiondiffusion (AD) transport for suspended load coupled with either the van Rijn (1998) or the LundCIRP formulation for bed load. The AD equation applies the reference concentration and sediment diffusivity from either the van Rijn or LundCIRP formulation as a user option.
The sediment transport formulas are applicable with or without the presence of waves. Change in bottom elevation is calculated by the sediment continuity equation in which transport rates computed from a specified formulation are entered. The LundCIRP formulas have the properties of smooth transitions between areas of breaking and nonbreaking waves and between areas of transport by current only and by a current and waves.
CMSM2D accounts for the two morphologic constraints of: (a) hard bottom (nonerodible substrate) and (b) bottom avalanching if the slope exceeds a specified value. The approach taken to treat hard bottom allows for sand to accumulate over the hard bottom if depositional conditions are present, and it also allows material overlying the hard substrate to erode while preserving sediment volume. Avalanching is invoked if the bottom slope between two cells exceeds a specified critical slope. The avalanching algorithm applies an iterative approach to move material down slope until the critical slope is no longer exceeded, while conserving sediment volume.
The transport rate formulas that can be applied in CMSM2D Version 3 are based on the shear stress concept, implying that bed roughness and resulting friction factors are key parameters to estimate when computing transport rates. A sediment transport formula is often developed (i.e., calibrated against data) based on specific equations for calculating bed roughness and associated shear stress. Thus, when calculating the transport rate in CMSM2D with the three implemented formulas, slightly different approaches are taken to determine the shear stress. In the following sections, the methods are discussed for obtaining the shear stress for each of the sediment transport formulas. Also, it is noted that the roughness and associated shear stresses within the sediment transport calculations are different from those in the CMSM2D hydrodynamic calculations. The computed current field and properties of surface waves calculated from a separate model are input to the roughness and shear stress calculations for the sediment transport, but there is presently no feedback of roughness or shear stress from the sediment transport component of the model to the hydrodynamic or wave calculations.
CMSM2D calculates the current velocity in two horizontal coordinate directions (u, v). If there is negligible contribution from the waves to the transporting velocity (e.g., sinusoidal waves), the net transport is in the direction of the resulting current vector and has magnitude of . Thus, waves will contribute to the mobilization and stirring of sediment, but a mean current is needed to produce a net transport. The Watanabe total load formulation and the AD equation compute sediment transport rates along the x and y axes. The LundCIRP total load formula computes transport in the direction of the current. In order to obtain the LundCIRP calculated transport in the two horizontal coordinate directions, the transport vector is split up into x and ydirected components.
The following sections describe the sediment transport equations applied in CMSM2D, followed by the methodologies implemented to treat hard bottom and avalanching.
Watanabe Formulation
The total load sediment transport rate of Watanabe (1987) is given by:
(33) 
where
= total load (both suspended and bed load)
= maximum shear stress at the bed
= shear stress at incipient sediment motion
= depth averaged current velocity
= density of water
= acceleration of gravity
= empirical coefficient typically ranging from 0.1 to 2
The shear stress at incipient motion is:
(34) 
where
= sediment density
= median grain diameter
= critical Shields parameter
For the case of currents only (no waves) the bed shear stress is:
(35) 
where is the current friction factor and in Equation 33. The current friction factor is given as (van Rijn 1998):
(36) 
in which = total depth defined as , and = Nikuradse equivalent sand grain roughness obtained from:
(37) 
If waves are present, the maximum bed shear stress is given by a databased method of (Soulsby 1997):
(38) 
where = mean shear stress by waves and current over a wave cycle,
= wave bed shear stress, and = angle between the waves and the current. The mean wave and current shear stress is:
(39) 
The wave bed shear stress is given by:
(40) 
where = the wave friction factor, and = wave orbital velocity amplitude.
The wave friction factor is (Nielsen 1992):
(41) 
where is the relative roughness defined as:
(42) 
where is the semiorbital excursion defined as:
(43) 
Transport rates are set to zero at the beginning of the simulation, then updated at each sediment transport time step.
LundCIRP Formulation
The LundCIRP formulation is implemented into CMSM2D in two modes. One mode is calculation of total load through combining bed load and suspended load transport. The second mode is implementation in the AD transport equation. Bed roughness and friction factors applied in the LundCIRP formulation are first introduced, followed by descriptions of the bed load and suspended load formulations, respectively.
Bed roughness and friction factors
Bottom roughness k_{s} is assumed to consist of three components, namely grain related roughness k_{sd}, formdrag roughness k_{sf}, and sedimentrelated roughness k_{ss} (Soulsby 1997). Total roughness is obtained as the linear sum of these components:
(44) 
where the grainrelated roughness is given by Equation 37. Formdrag roughness is primarily a function of the ripple properties and calculated as (Soulsby 1997):
(45) 
in which H_{r} = ripple height, and L_{r} = ripple length, which are computed from:
(46) 
for a current (Soulsby 1997) and from:
(47) 
for waves (van Rijn 1993), where = mobility parameter that is defined by:
(48) 
and s = specific density given by:
(49) 
The sedimentrelated roughness is given by Wilson (1966, 1989):
( SEQ Ch4Eq \* MERGEFORMAT 50) 
where = Shields parameter for current or waves (i = c, w, respectively, for current and waves). Expressions for the Shields parameter for currentsand for wavesare given by:
(51)  
(52) 
Equation 50 has to be solved simultaneously with the expression for the shear stress, because the roughness depends on the stress. Explicit predictive equations were developed using approximating polynomials to the exact solution avoid timeconsuming iteration in calculating the shear stress. Based on the roughness estimate, friction factors for current f_{c} and waves f_{w} are separately computed according to Soulsby (1997) and Swart (1974), respectively as:
(53)  
(54) 
where =Von Karman constant (taken to be 0.4). Shear stress from the current is given by:
(55) 
whereas the maximum shear stress from the waves is estimated from:
(56) 
and the mean shear stress is obtained from:
(57) 
where a sinusoidal wave is assumed. The corresponding shear velocities for current and waves, respectively, are defined as:
(58) 
for the current, and:
(59) 
for the waves (based on the maximum shear stress).
Bed load
A general transport formula for bed load under combined waves and current was developed by Camenen and Larson (2005):
(60) 
where subscripts w and n refer to the wave direction and the direction normal to the waves, respectively, a and b are coefficients, and and are the mean and maximum Shields parameter for waves and current combined, respectively, not including the bed form roughness. The coefficient a_{n} = 12 for the transport component normal to the wave direction (currentdriven transport). The coefficient b describes initiation of motion and is specified as b = 4.5. The quantities and represent the net contribution of the shear stress to the transporting velocity during a wave cycle in the direction parallel and normal to the waves, respectively, defined as:
(61) 
in which:
(62) 
and
(63) 
where T_{wc} = period of positive flow, T_{wt} = period of negative flow, and u_{w} = timevarying horizontal bottom orbital velocity ( ). Analytical solutions to these equations are available for simple expressions of u_{w}. The friction factor for combined wave and current flow is calculated from Madsen and Grant (1976):
(64) 
where and f_{c} and f_{w} are the friction coefficients for current only and waves only, respectively, not including the bed form roughness. The Shields parameter that determines the amount of sediment mobilized for transport is obtained as:
(65) 
and the Shields parameter applied in the initiation of motion term is:
(66) 
where and are the Shields parameters for current only and waves only, respectively, and the index m denotes the mean value. For sinusoidal waves, . Values of the transport rate coefficients were obtained through calibration against a large data set from laboratory and field experiments involving a mean current, oscillatory waves (sinusoidal and asymmetric), and combined waves and current. A wide range of current and wave velocities, grain sizes, and roughness conditions were covered in this combined data set. The following relationship was developed for the transport coefficient in the wave direction (Camenen and Larson 2005):
(67) 
In many applications, the waves are assumed to be sinusoidal, having no asymmetry. Thus, the contribution to the transporting velocity from the waves is negligible, implying that only the current moves the material. Waves are still important for mobilization of the sediment. For such conditions, Equation 60 simplifies to:
(68) 
where the transport q_{bc} is obtained in the direction of the current, and the transport normal to the current is zero. (There is no velocity component to move the material in this direction.)
Suspended load
The suspended load q_{s} is calculated based on the assumptions of an exponential concentration profile and a constant velocity over the water column to yield (Camenen and Larson 2006):
(69) 
where w_{f} = sediment fall speed, c_{R} = reference concentration, and = sediment diffusivity (or mixing coefficient). The transport q_{s} is taken to be in the direction of the current because the waves are assumed to produce a zero net drift and not contribute to the transport. In the calculation of c_{R} and , the total shear stress should be applied, including the bed form roughness. The reference concentration is given by:
(70) 
where the coefficient is determined by the following relationship:
(71) 
and the dimensionless grain size is defined by
. The sediment diffusivity is related to the energy dissipation according a generalization of the treatment of Battjes (1975):
(72) 
where D_{e} is a total effective dissipation given by:
(73) 
in which k_{c}, k_{w}, and k_{b} are coefficients. The dissipations from bottom friction due to current D_{ec} and from bottom friction due to waves D_{ew} are expressed as:
(74)  
(75) 
and the dissipation due to wave breaking D_{eb} is directly provided from a wave transformation model (e.g., STWAVE. WABED). The coefficient k_{b} corresponds to an efficiency factor and was found to be 0.017, whereas k_{c} and k_{w} are related to the Schmidt number that expresses the ratio between diffusivity of sediment and water (i.e., momentum). These two coefficients are given by:
(76) 
where= Schmidt number and the subscript i = c or w denotes current and waves, respectively. The Schmidt number is calculated from the empirical relationships:
(77) 
where A_{1} = 0.7 and A_{2} = 3.6 for current, and A_{1} = 0.09 and A_{2} = 1.4 for waves. In the case of coexistent waves and current, a weighted Schmidt number is applied according to:
(78) 
for both waves and current.
Bed load and suspended load transport rates are set to zero at the beginning of the simulation, then updated at each sediment transport time step.
AdvectionDiffusion Equation
Calculations of suspended load and bed load are conducted separately through solution of the AD equation for suspended load. This method calculates the suspended load in the water column through the lateral and vertical movement of the sediment.
Basic equations
Sediment transport consists of two components, bed load and suspended load. The bed load and suspended load transport rate formulas are based on the local shear stress. However, in the situation where the suspended sediment concentration rapidly changes in time and space, such as at a river mouth, inlet entrance, navigation channel, and in the vicinity of structures, the suspended load cannot be determined solely by the local forcing conditions. In this case, suspended sediment concentration is governed by the AD equation.
The AD equation implemented in CMSM2D is obtained from the continuity of depthaveraged suspended sediment transport (Figure 2) as:
(79) 
in which
The suspended sediment concentration can be solved from Equation 79 at a sediment transport time step.
Bed level change is obtained from the sediment continuity equation:
(80) 
where q_{bx} = bed load transport rate parallel to the xaxis, q_{by} = bed load transport rate parallel to the yaxis, and p = porosity of sediment.
In Equation 80, the terms include the bed load component, and the term PD corresponds to the suspended load component. Figure 2 shows the definition of sediment continuity in a water column, where q_{sx} and q_{sy} are the suspended transport rate in the x and y directions, respectively, and a is the height of the bed load layer. The transport rates q_{sx} and q_{sy} may be defined as follows from Equation 79:
(81)  
(82) 
Sediment concentration and bed load and suspended load transport rates are set to zero at the beginning of the simulation, then updated at each sediment transport time step.
Pickup and deposition rates
The AD model calculates the bed level change due to suspended load from the difference between pickup rate and deposition rate in Equation 80. The pickup rate and the deposition rate are also applied as the bottom boundary condition in Equation 79. The boundary conditions are specified at an arbitrary level a above the mean bed level:
(83)  
(84) 
where c = equilibrium concentration of suspended sediment at a given elevation, and z = vertical coordinate. Both c_{a} and c_{0} are reference concentrations defined at z = a. Because the upward flux of sediment depends on the bed shear stress, c_{a} is determined from the bed shear stress calculated from the local hydrodynamic conditions. Representation of c_{a} within CMSM2D is dependent on selection of either the van Rijn or LundCIRP models. The downward sediment flux depends on the concentration in the upper water column; therefore, c_{0} is specified from solution of Equation 79.
Assuming that the suspended concentration is in equilibrium , then the basic equation for suspended sediment concentration can be written:
(85) 
This equation can be solved analytically by applying an appropriate mixing coefficient , and the vertical profile of suspended concentration is obtained in the following form:
(86) 
where F(z) is a function of the vertical concentration distribution. The relationship between the reference concentration c_{0} and the depthaveraged concentration C is:
(87) 
Thus, c_{0} may be written in the following form by introducing a conversion function _{d}:
(88) 
The bed level change due to suspended load is based upon the difference of the two types of reference concentration:
(89) 
This equation implies that erosion occurs if c_{a} > c_{0}, and accretion occurs if c_{a} < c_{0}. In the AD model, three methods of specifying c_{a} and c_{0} (that is, )are implemented. Two of the methods are based on the van Rijn formula (van Rijn 1985) and one on the LundCIRP formula (Camenen and Larson 2006). Table 1 summarizes general features of the methods.
van Rijn formula
The reference concentration c_{a} in the van Rijn formula is given by:
(90) 
where a = reference height and _{s,max} = maximum bed shear stress given by Equation 38.
Features of Calculation of Pickup and Deposition Rates  
Method  Reference Concentration  Conversion Parameter  Comments 
Exponential Profile  Eq. 90  Eq. 104 and 105  Fast computation. Tends to overestimate sediment transport rate. Can be used for some tests. 
Van Rijn Profile  Eq. 90  Solves Eq. 85 numerically with Eq. 103 (RungeKutta 4^{th})  Requires substantial computing time. Provides the same results as van Rijn (1985). 
LundCIRP Profile  Eq. 70  Eq. 104 and 72  Fast computation. Newly developed sediment transport formula. 
The currentrelated shear stress is calculated from:
(91) 
The waverelated shear stress is given as:
(92)  
(93) 
where = roughness height defined as:
(94) 
in which k_{sd} and k_{ss} are calculated from Equations 37 and 50, respectively.
Bed concentration in the van Rijn model is defined at the height a as:
(95) 
where H_{r} = ripple height. If ripples are present, the total roughness height is modified as:
(96) 
where, k_{sf} = 20(H_{r}^{2}/L_{r}) is specified for the van Rijn formula, and k_{sf} = 7.5(H_{r}^{2}/L_{r}) is specified for the LundCIRP formula. The ripple dimension is obtained by selecting the largest ripple height for the case of current or waves (Equations 46 and 47).
The conversion parameter to determine c_{0} is obtained from the vertical mixing coefficient. Van Rijn (1985) proposed a distribution of the mixing coefficients for only current or waves according to Figure 3. The currentrelated mixing coefficient is given by:
(97) 
where u_{*c} = currentrelated bed shear velocity expressed as:
(98) 
andis a coefficient obtained from:
(99) 
Figure3. Vertical distributions of mixing coefficient due to current and waves
The waverelated mixing coefficient is:
(100) 
where
(101)  
(102) 
in which the parameter = height from the bed given by
, H = significant wave height, and T = significant wave period. If waves and current coexist, the combined mixing coefficient is given by:
(103) 
By applying the expression for _{cw}, the concentration profile can be derived from Equation 85, and the conversion parametercalculated. In the ADmodel based on the van Rijn equations, two methods are implemented to calculate . One is based on an exponential profile employing a depthaveraged mixing coefficient, and the other uses the original van Rijn profile, where the is obtained by numerical integration of Equation 85. Assuming an exponential profile of suspended sediment concentration,is obtained analytically as:
(104) 
where
(105) 
LundCIRP formula
Reference concentration and sediment diffusivity calculated by the LundCIRP formula may also be applied in the ADmodel. The formulas used for c_{R} and ε are presented in the section describing the LundCIRP formula.
Horizontal diffusion coefficient
Horizontal diffusion coefficients K_{x} and K_{y} for the depthaveraged sediment concentration in the AD equation are calculated by the equation proposed by Elder (1959):
(106) 
In the surf zone, waves contribute significantly to lateral mixing, and the eddy viscosity coefficient is expected to be a function of the wave properties. For the horizontal diffusion coefficients for AD equation, surf zone mixing proposed by Kraus and Larson (1991) is applied as well as for hydrodynamic calculation.
(107) 
wheredescribes the lateral mixing below trough level (Smith, Larson, and Kraus, 1993) and is expressed as (Kraus and Larson 1991):
(108) 
where = empirical coefficient representing the lateral mixing strength.
The transition between surf zone diffusion and oceanic diffusion seaward of the breakpoint is represented in CMSM2D by a weighted mixing coefficient specified as:
(109) 
where the weighting parameteris given by:
(110) 
Bed load transport rate
Bed load transport rate may be calculated with the van Rijn (1998) or LundCIRP (Camenen and Larson 2005) formula. In the van Rijn formula, bed load transport rate is obtained from, not including bed roughness:
(111) 
The LundCIRP formula for bed load is described previously in this chapter.
Scaling Factors for Bed Load and Suspended Load Transport Rates
Adjustments to the bed load and suspended load transport rates can be assigned for both the LundCIRP total load formulation and the AD equation. Scaling factors are applied directly to transport rate values as coefficients independently for the bed load transport rate and for the suspended load transport rate. Thus, the bed load transport rate can be scaled separately from the suspended load transport rate. Recommended ranges for the scaling factors are 0.1 to 4. A scaling factor of 1 will not modify the transport rate, and this value is the default. Values less than 1 will reduce the transport rate, and values greater than 1 will increase it. Scaling factors are sometimes found necessary because of uncertainties in forcing and initial conditions, allowing adjustment of model predictions of sediment transport rates and morphology change to observations.
Sediment Continuity Equation
Depth change for the total load formulations and for bed load transport from the AD equation is calculated by the sediment continuity equation, in which timeaveraged transport rates are applied. This approach requires that two time intervals be defined, one over which to compute instantaneous transport rates dt_{sed} and the other over which to compute averaged transport rates and morphology change dt_{morph}. Directional instantaneous transport rates and are calculated at intervals of dt_{sed} and averaged over the time interval dt_{morph} to obtain the timeaveraged transport rates and for the x and y directions, respectively. Enhancement of downslope transport and reduction of upslope transport rates is accomplished by calculation of modified timeaveraged transport rates and as (Watanabe 1987):
(112)  
(113) 
in which = empirical slope coefficient with typical range of 5 to 30, and is the time averaged transport rate. These formulations add an effective diffusion of transport to the continuity equation for bed change.
The sediment continuity equation is solved to compute depth change at the time interval dt_{morph} and for total load formulations is given by:
(114) 
At forcing boundaries, the gradient in transport rate across the boundary cell is set to zero.
For the ADmodel, the sediment continuity equation is provided by Equation 80. The time intervals to compute instantaneous transport rates and to compute averaged transport rates and morphology change are consistent with those applied in the total load model, that is, dt_{sed} and dt_{morph} respectively. Also, the bed load components in Equation 80 are modified by the slope effect as:
Where Finally, the sediment continuity equation is solved to compute depth change at the time interval dt_{morph} and is rewritten as:(115)  
(116) 
(117) 
which contains both bed load and suspended load components. At forcing boundaries, the gradient intransport rate across the boundary cell is set to zero.
HardBottom Methodology
Representation of hard (nonerodible) substrate provides the capability to simulate mixed bottom types within a single simulation. The default bottom type in CMSM2D is erodible, meaning that sediment is available to be transported from that area. Areas having hard bottom are specifically designated as such in the model, and the depth of the hard substrate is specified, allowing representation of either exposed or sedimentcovered hard bottom. The onedimensional (1D) hardbottom calculation approach applied in the GENESIS shoreline change model (Hanson 1989; Hanson and Kraus 1989) to represent the control of seawalls on shoreline evolution (Hanson and Kraus 1985, 1986) was extended to two dimensions and implemented in CMSM2D (Hanson and Militello 2005).
The presence of hard bottom exerts a constraint on water depth because the bottom cannot erode. Representation of hard bottom applies an adjustment to the potential transport rates (calculated by a transport formulation with no restriction) to account for the presence of hard substrate. Treatment of hard bottom was developed to satisfy the following four properties:
a.  Areas having hard bottom cannot erode below the level of the hard substrate. 
b.  Sediment volume is conserved. 
c.  The direction of sediment transport at a location with hard bottom is the same as that of the direction of potential local transport. 
d.  Correction to transport rates is always done in the direction of potential sediment transport. If hard bottom is exposed, the reduction in actual transport as compared to the situation without hard bottom is always transmitted to neighboring areas in the direction of transport as governed by the hydrodynamic forcing. 
The general procedure for treating hard bottom is:
a.  Calculate sediment transport and morphology change without hardbottom restriction. 
b.  Assess whether hardbottom cells have eroded below the hard bottom depth. If so, apply a correction procedure that adjusts transport rates based on available sediment at hardbottom cells and corrects depths so that the hardbottom constraint is not violated. The correction procedure makes adjustments at all cells in which transport rates are controlled by hard bottom and can include adjustments at cells that do not have hard bottom. 
The correction procedure involves four steps:
a.  Identify all cells that have transport at all four faces directed out of the cell, called "Minus4" cells. These Minus4 cells, if they exist, must constitute the first stage of corrections, as they are only ’deliverers’ of sediment to all adjacent cells, not ’recipients’ of material. 
b.  If the hard bottom is exposed, all transport rates out of the Minus4 cells are reduced. A list of all adjacent cells, with or without hard bottom, that are influenced by exposed hardbottom cells is generated for later correction to depths and transport rates. 
c.  Depths at all adjacent cells are then recalculated to account for the reduced influx of sediment. Cells with hard bottom must then be checked for a possible violation of the hardbottom constraint and corrected as necessary. For each corrected cell, all sediment transport rates out of the cell are in turn corrected, and each of the next generation of affected cells adjacent to it is added to the list of cells to be corrected. Transport rates into a cell are never changed (as it is an outgoing transport from the adjacent cell that is corrected in that cell). 
d.  After all cells have been checked, the process is repeated to make sure that the hardbottom constraint is not violated in any cell. 
Corrections to transport rates and depths are based upon the potential transport rate and amount of sand available for erosion. If, after solution of the sediment continuity equation (Equation 114), the updated depth
is greater than the hardbottom level
, the outgoing transport rates are corrected to match the criterion
. Over one morphologic time step, the total amount of material
, expressed as a vertical quantity that may leave the cell without violating the hardbottom constraint is:
(118)

where q_{in} = total influx of sediment from the cell during the morphologic time step. The correction factor K is given as:
(119)

where q_{out} = total outflux of sediment from the cell during the morphologic time step. To ensure that
ingoing transport rates are left unchanged, and outgoing transport rates are multiplied by the correction factor K.
A schematic example of the correction procedure is provided for a symmetric computational grid (Figure 4). The domain contains a 9by9 grid of calculation cells. Rows (parallel to the xaxis) are numbered 1 through 9, and columns (parallel to the yaxis) are indicated by A through I. Initial bathymetry level is specified to be at all cells, and the hardbottom level is at (units) at all cells (z is positive downwards from the original bottom level at)
Arrows across the cell walls indicate the initial (potential) transport rates. These are of three different magnitudes: 2 units/m/s (black arrows), 5 units/m/s (blue arrows), and 12 units/m/s (green arrows). For demonstration purposes we assume that the cell sizes in the xdirection and the ydirection are the same and that a transport rate of 1 unit/m/s during one time step corresponds to a bottom elevation change of 1.
Numbers inside each cell indicate the potential depth change (positive numbers mean erosion) in each cell, which is a measure of the magnitude of the depth change if the hard bottom were not there. Thus, in each cell with a depth change that is greater than 5, the hard bottom is exposed. As a result, the actual depth change is limited to 5. Once this depth is reached, the transport out of the cell is reduced owing to limited sediment availability.
In the model, this reduction is accomplished through a correction procedure. The following section explains how this correction is performed through three successive correction loops in a hierarchical and systematic order.
Figure4. Schematic hardbottom grid and potential transport rates
Correction loop 1:
a.  Find cells with transport rates directed out of the cell through all four faces. These cells represent the ultimate starting points. Cell E5 is the only cell in this example having outwarddirected transport rates through all four faces.

b.  Calculate the new bottom level equaling 8 units, which means that the hard bottom at 5 units is exposed.

c.  Reduce all transport rates out of cell E5 in proportion to the sediment deficit. The potential loss of sediment was 8 units while the available volume in cell E5 was 5 units. Thus, the outgoing transport rates will be reduced from 2 to 2 x 5/8 = 1.25 units/m/s.

d.  Recalculate depths of all adjacent cells, D5, E4, F5, and E6, based on modified transport rates.

e.  Hard bottom is now exposed in cells E4 and E6.

f.  Reduce transport rates out of these two cells (E4 and E6).

g.  Recalculate depths of cells adjacent to E4 and E6 that receive sediment. These cells are D4, E3, F4 and D6, F6, E7. No additional hardbottom cells are exposed. Thus, the deficit associated with cell E5 does not spread further.

Correction loop 2:
h.  Find start cells from where sanddeficit might spread by searching through the grid from one end to the other. Start cells are those that are located on a hard bottom, but do not receive sediment from any other hardbottom cell.

i.  Find exposed cells (defined as cells where the hard bottom is exposed) and identify by flag IEXP = 1. Start the search in cell A1. This cell is exposed, but sediment is coming in from B1 that is also exposed. The direction of influence will be in the direction of transport, i.e., from B1 to A1. Thus, A1 cannot be a start cell.

j.  Next, proceed to cell A2. This cell is exposed but, as above, it is receiving sediment from cell A1, which is also exposed. Thus, cell A2 is not a start cell.

k.  The same situation prevails for all cells in the A column. Thus, no cells in the A column are start cells.

l.  Next, proceed to cell B1. This cell is exposed. It is only getting sand from B2, but that cell is not exposed, so no correction can come from there. Thus, cell B1 is a start cell.

m.  All remaining cells are checked the same way, and all start cells are added as necessary to the list of cells to be corrected (here referred to as the correction list).

n.  Correct the first cell in the correction list, cell B1. Add adjacent cells receiving sediment from B1 to the correction list, i.e., cells A1 and C1.

o.  Proceed through all start cells, correct outgoing transport rates, and add to the correction list all cells receiving sediment from the start cells.

Correction loop 3:
p.  The next step is to examine all cells connected to start cells. Transport rates need to be corrected if hard bottom is exposed. Adjacent cells receiving sediment are added to the correction list at the next level of correction cells.

Through this procedure, cells will always be corrected in a hierarchic order in which all cells of one level are corrected before proceeding to the next level. Corrections are always propagated in the direction of transport without ambiguity regarding which cell affects another. Figure 5 shows the final bathymetry where all (positive) depth changes are less than 5. The figure also shows the transport rates that were unchanged within this correction procedure (indicated by their original colors) together with those transport rates that were changed (indicated by red arrows). It should be noted, however, that the red arrows represent transport rates with very different magnitudes.
Through the correction loops, transport rates modified by the hardbottom algorithm are not restricted to cells specified as having nonerodible substrate. Adjustments to transport rates take place at hardbottom and erodable cells and the spatial extent of the modifications is dependent on the spatial influence of the hard bottom under the transport conditions.
Figure5. Corrected hardbottom depths and adjusted transport rates
Avalanching Methodology
Controls on bottom slope are implemented through an avalanching algorithm. After each calculation of morphologic change, every cell in the CMSM2D grid is evaluated to determine if a critical bottom slope has been exceeded. If so, avalanching takes place to reduce the slope. By this method, realistic bathymetric slopes are maintained over the CMSM2D domain. The method extends an algorithm developed for the StormInduced Beach (SBEACH) change model (Larson and Kraus 1989) to two dimensions.
The procedure for determining if avalanching is needed is entered after each calculation of morphologic change. Four slopes are computed for each cell in the grid using the updated depth values. The slopes are computed between each cell and its four neighbors (top, right, bottom, and left neighbors). Starting at the deepest cell in the grid, the bottom slopes are compared to the critical slope, which is the maximum slope allowed before avalanching takes place. If more than one cell has the same depth, cells are checked in order of cell identification number. If the critical slope is exceeded, avalanching takes place with the ending slope being equal to the residual slope after shearing. In the avalanching process, each avalanching calculation includes only the two neighboring cells that exceed the critical slope. Depths of avalanched cells are updated, and the slopes for each of the four neighboring cells recomputed. If more than one slope has exceeded the critical slope, the steepest is avalanched first as it is assumed that it would be the first to reach a critical state. If there is more than one slope that exceeds the critical limit by the same amount, then the slopes are avalanched from north to west in a clockwise fashion.
After an avalanche has occurred, the slopes are recomputed and checked to ensure they have not remained in a critical state. If a critical slope remains, the profile is again avalanched and the process repeated. After all critical slopes have been eliminated, the slopes of all affected cells are recomputed and the algorithm proceeds to the next deepest cell in the grid to repeat the process. All active cells are checked, whether they are wet or dry. After all cells have been checked and, if necessary, avalanched, slopes are again checked against the critical slope. If critical slopes remain, the algorithm finds the deepest cell and the entire process is repeated. If no profiles exceed the critical state, the avalanching process is complete.
A bias can result for cases where there are multiple cells with the same depth or multiple profiles that exceed the critical state by the same degree. In practice, however, it is unlikely that there will repeatedly be multiple cells with equivalent depths or slopes as the values are computed with a high degree of precision.
Numerical Implementation of Governing Equations for Water Motion
Grid definition and discretization of the governing equations are described in this chapter. The governing equations of CMSM2D are solved numerically on a staggered rectilinear grid by a finitevolume calculation approach. All spatial derivatives are approximated with central differences with the exception of the advection terms, for which an upwind algorithm is applied. The momentum equations are solved first, followed by the continuity equation wherein updated velocity values are applied.
To maximize efficiency of memory for domains with complex shoreline perimeters, the CMSM2D grid is stored in a 1D array rather than a 2D matrix. The cell numbering convention is described in this chapter. Information is also given on the Courant stability criterion, which provides the user with understanding and an initial approximation of an appropriate model time step for the explicit solution method.
Rectilinear Grid
The governing equations are solved on a discretized domain where cells are defined on a rectilinear grid (which can be regular or irregular), as shown in Figure 6. Each cell has indices i and j that correspond to its position along the x and yaxes of the grid domain, respectively. Watersurface elevation is calculated at the cell center, whereas the x and ycomponents of the velocity are calculated on the left face center and bottom face center of the cell, respectively. Values of flow rate per unit width, q_{x} and q_{y}, are calculated at the same locations as u and v, respectively. Note that the notation for flow rate per unit width is similar to that for sediment transport rate. For the present discussion on hydrodynamics, lower case q denotes flow rate per unit width.
Because the best orientation of the grid may be such that the x and yaxes do not correspond to geographical coordinates (NS and EW), cells in the grid are defined in a local (or grid) coordinate system. The local coordinate system is referenced to geographic coordinates by specification of the angle between the yaxis and true north. A positive value of this angle denotes clockwise rotation and the maximum rotation angle should not exceed 45 deg to retain an orientation as close to geographic as possible.
Figure 6. Cell and variable definitions for CMSM2D
The 2D array format for referencing cell locations is retained here to facilitate presentation of the finitevolume approximations. Mapping of the cell indices from a 2D array to a 1D array is conducted primarily to reduce computer memory requirements. The 1D cell indexing method is discussed below.
Momentum Equations
The finitevolume scheme for the xmomentum equation will be given first, followed by that for the ymomentum equation. Calculation of the bottom stress coefficient, wind stress, eddy viscosity coefficient, and adjustment to the wave stress for shallow water follow the finitevolume approximation of the ymomentum equation because their descriptions are common for both x and ymomentum equations.
Solution of the momentum equations is conducted to calculate the x and ycomponents of velocity u and v, respectively. The explicit approach implemented in CMSM2D solves each momentum equation for the corresponding flow rate per unit width or at the present time step k+1 from values calculated at time step k. Velocity components and are then calculated from the values of and , respectively.
xmomentum equation
The xmomentum equation is solved explicitly by a finitevolume approximation for the control volume shown in Figure 7. The control volume is indicated by the dashed line. Surface and bottom stresses (wind stress and bottom friction) are approximated on the upper and lower surfaces, and momentum fluxes are approximated at each cell face.
Figure7. Control volume definition for xmomentum equation
The xmomentum equation in finite volume form is given by:
(120) 
where
=  
i, j  =  cell location on the grid  
k  =  time step  
=  cellside length parallel to the xaxis  
=  cellside length parallel to the yaxis 
and
(121) 
(122) 
(123) 
(124) 
The xdirected current velocity is given by:
(125) 
and the current speed for the xmomentum equation is:
(126) 
Wave stress for the xmomentum equation is given by:
(127) 
ymomentum equation
The ymomentum equation is solved explicitly with a finite volume approximation for a control volume as shown in Figure 8. The control volume is indicated by the dashed line. Surface and bottom stresses are approximated on the upper and lower surfaces and momentum fluxes are approximated at each cell face.
Figure8. Control volume definition for ymomentum equation
The ymomentum equation is finite volume form is given by:
(128) 
(129) 
(130) 
(131) 
(132) 
The ydirected current velocity is given by:
(133) 
and the current speed for the ymomentum equation is:
(134) 
Wave stress for the ymomentum equation is given by:
(135) 
Bottomfriction coefficient
The bottomfriction coefficient is given by:
(136) 
where C_{i,j} = Chezy coefficient calculated as:
(137) 
and
if the depth criterion is met. Equation 175 scales the wave stress toward zero as the water depth decreases.
Wave models typically perform calculations in a local righthanded coordinate system in which positive x is directed onshore and positive y is directed alongshore. Thus, the orientation of the local coordinate system may not be aligned with global geographic coordinates. CMSM2D performs calculations on a local coordinate system that is referenced to global geographic coordinates by the deviation of the yaxis (given in degrees) from true north. If wave stresses are included in CMSM2D calculations, mapping of those stresses from the wave model to the circulation model must take into consideration the different coordinate systems and grid orientations. Wave stresses calculated by STWAVE or WABED can be automatically mapped to CMSM2D within the SMS (see Chapter 8).
Continuity Equation
The continuity equation is solved explicitly for watersurface elevation
by a finitevolume approximation for a control volume depicted in Figure 10. Mass fluxes are approximated at each cell face. In the staggered time differencing scheme, the most recently calculated values for the u and v velocity components are entered into the spatial derivatives. The finitevolume approximation of Equation 1 is given by:
(176) 
whereand all other variables have been previously defined.
Figure10. Control volume definition for continuity equation
Cell Numbering
CMSM2D stores its numerical grid in an array rather than a matrix, which saves memory for large or irregular grid domains. The numbering scheme for the computational grid is designed to be efficient such that cells that reside in computationally inactive regions do not have to be stored. For model domains that have complex shorelines, this feature can save substantial computer memory. On the other hand, for simple grids, more memory may be required because pointing arrays are necessary for cell indexing.
The cell numbering system internal to CMSM2D does not require row and column indexing, but instead assigns each cell a unique identification number. Flather and Heaps (1975) implemented a similar cell numbering system so that only cells included in hydrodynamic calculations were stored. Noncomputational regions of the grid, such as the mainland and islands, do not require assigned cell numbers, so they do not occupy space in memory. Figure 11 illustrates the cell numbering system for a small domain that includes a noncomputational region indicated by hatching. Cell identification numbers of neighbors adjacent to a particular cell are stored in a pointing matrix within the model. For example, cell 9 has neighbors, with cell identification numbers 12, 10, 4, and 8 moving from top, to right, bottom, and left, respectively. This clockwise order of referencing neighbor cells is taken as convention for descriptions in this document.
Figure11. Cell numbering system
Locations where no cells exist, such as beyond the computational domain or in noncomputational regions such as islands within the domain, are not stored in the grid as cells, but can be referenced as having a cell identification number of 0. For example, cell 11 in Figure 11 lies on the boundary of the grid domain and also resides next to a noncomputational area. Neighborcell specifications for cell 11 would be stored as 14, 0, 6, and 0. The grid does not contain any cells with a cell number of zero; this value is used in neighbor specification to indicate that a computational cell does not exist at a particular location.
Courant Condition
For an explicit solution method, an initial estimate of the maximum time step for a grid can be calculated from the Courant number x, given by (Richtmyer and Morton 1967):
(177) 
The theoretical maximum value of the Courant number is unity for stability of a linear, finite volume hydrodynamic model, in which for shallowwater equationsrefers to the speed of a long wave, such as the tide. For a fixedand u, the Courant number limits the value of the hydrodynamic time step. Because CMSM2D solves the nonlinear shallowwater equations, stability will be maintained for a Courant number less than unity. Also, for a typical coastal inlet situation, multiple forcing is possible from a superposition of sources other than or in addition to the tide. Contributions to the current can be produced by wind, surface waves, and tributary discharges. Assigning a velocity component to each of these forcings, denoted with a subscript, the Courant number is more accurately defined as:
(178) 
In strong or focusedflow regions of a model domain, such as at ebb shoals and in the surf zone, the wavedriven current can be significantly stronger than the tidal current. Moreover, these are typically areas of greater spatial grid resolution. The combination of strong currents and small grid cells limits the allowable size of the time step in an explicit solution scheme.
Numerical Implementation of Governing Equations for Sediment Motion
Three choices are available for computing sediment transport with CMSM2D: the Watanabe (1987) formulation, the LundCIRP formula (Camenen and Larson 2005, 2006), and the AD equation. The Watanabe transport formula produces a total transport rate, estimating the contributions of combined suspended sediment load and total load in a "calculationatapoint" formulation. The LundCIRP transport formula computes both bed load and suspended load transport rates, which are combined to obtain a total load transport rate. The AD equation is solved for both suspended load and bed load transport rates.
Morphology change is computed by means of two time steps, a transport rate time step and a morphology change time step. Instantaneous transport rates are computed at the transport rate time step and averaged over the morphology change time step. Averaged transport rates are then applied in the sediment continuity equation. Transport rates calculated by the Watanabe, LundCIRP total load formula, and AD equation are instantaneous values.
Watanabe Formulation
Implementation of the Watanabe formulation computes transport rates on cell faces with the xdirected rate located on the left face center and the ydirected ratelocated on the bottom face center. Thus, for a given cell, andare calculated at the same locations as u and v, respectively (Figure 6). Timeaveraged facecentered transport rates are applied in the sediment continuity equation to calculated depth change.
Calculation of x and ydirected transport rates and, respectively, by the Watanabe formulation is conducted in CMSM2D as:
(179)  
(180) 
The bottom stresses in the situation in which no waves are present are calculated in the x and y directions as:
(181) 
and
(182) 
in which the velocities and are calculated as:
(183) 
and
(184) 
The current friction factors for the x and y directions, respectively, are:
(185) 
and
(186) 
If waves are present, the bottom shear stresses in the x and y directions are calculated as:
(187) 
and
(188) 
Bottom shear stresses calculated by Equations 187 and 188 are entered as values of and in Equations 179 and 180, respectively.
Combined wave and current shear stresses for the x and y directions are given by:
(189) 
and
(190) 
The wave bed shear stresses for the x and y directions, respectively, are given by:
(191) 
and
(192) 
where the wave friction factor for the x direction is given as:
(193) 
and for the y direction is:
(194) 
Relative roughness for the x and y directions are given by:
(195) 
and
(196) 
Wave orbital velocity amplitudes for the x and y directions, respectively, for nonbreaking waves are:
(197) 
and
(198) 
For breaking waves, the wave orbital velocity amplitudes for the x and y directions, respectively, are:
(199) 
and
(200) 
LundCIRP Formulation
The LundCIRP formulation computes sediment transport properties and transport rates at the cell center, which corresponds to the same location in the cell as the watersurface elevation
is calculated (Figure 6). After transport rates are calculated by the LundCIRP formulas for all cells in the domain, they are mapped back to the cell faces such that the xdirected rate
is located on the left face center and the ydirected rate
is located on the bottom face center. Timeaveraged facecentered transport rates are applied in the sediment continuity equation to calculated depth change.
AD Equation
AD equation for sediment concentration
The AD equation for sediment concentration is solved explicitly for depthaveraged concentration by a finitevolume approximation for a control volume. Depthaveraged concentration C, pickup rate P, and deposition rate D are approximated at each cell center, and mass fluxes are approximated at each cell face. The finitevolume approximation of Equation 79 is given by:
(201) 
where
=  
=  
i,j  =  cell location on the grid  
k  =  time step  
=  time step to calculate sediment transport  
=  cell side length parallel to the xaxis  
=  cell side length parallel to the yaxis 
and
(202)  
(203)  
(204)  
(205) 
Pickup rate and deposition rate
Pickup rate and deposition rate can be calculated in CMSM2D by either the van Rijn or LundCIRP formulation. The calculation method of P and D for van Rijn formula is described first, then that for LundCIRP formula.
Van Rijn model (exponential profile or van Rijn profile)
The pickup rate P and for van Rijn model is given by:
(206)  
(207) 
Maximum bottom shear stress _{s,max} is given by:
(208) 
where _{cs}, _{ws}, and _{ms} are shear stresses owing to current, wave, and combined wave and current, and are given by:
(209)  
(210)  
(211) 
The current velocity U_{c} and wave orbital velocity U_{w} are defined at each cell center.
(212)  
(213) 
and wave friction factor is:
(214) 
where
(215) 
Calculations with CMSM2D have shown that the van Rijn (1985) reference concentration tends to give an overestimation under strong shear stress, such as in the sheet flow region. Therefore, the following limitation is applied to reduce the overestimate:
(216) 
where R is the reduction coefficient expressed as:
(217) 
in which c_{b} is the extrapolated bed concentration calculated by Equation 207 with a = d_{50}, which reduces to:
(218) 
The deposition rate D for the van Rijn model is given by:
(219) 
where β_{d} is the conversion parameter that depends on the userselected concentration profile. If an exponential profile is selected, β_{d} is calculated by using depthaveraged mixing coefficient and given by:
(220) 
and the reference height a is given by:
(221) 
where H_{r} is the ripple height.
If the van Rijn profile is selected, β_{d} has to be calculated numerically because the mixing coefficient varies with height from the bed. In the ADmodel with the van Rijn profile, the mixing coefficients are calculated at 20 points in the vertical direction. Mixing coefficients for the current ε_{c} and for waves ε_{w} are calculated, and then combined as follows:
(222)  
(223)  
(224) 
where
(225)  
(226)  
(227) 
With the mixing coefficient ε_{cw}(z) available, the vertical distribution of the concentration c(z) can be solved by the fourthorder RungeKutta method. Then, β_{d} values for the van Rijn profile are calculated by numerical integration of the concentration profile:
(228) 
LundCIRP model The pickup rate P for the LundCIRP model is given by:
(229) 
where c_{a} is the reference concentration given by:
(230) 
where A_{cR} = 3.5 10^{3}exp(0.3d_{*}), and b = 4.5. Bed shear stresses due to current, wave, and combined current and wave are given by,
(231)  
(232)  
(233)  
(234) 
Friction factors for the current and for waves are given, respectively, by:
(235)  
(236) 
The deposition rate D for the LundCIRP model is given by:
(237) 
The concentration profile for the LundCIRP formula is approximated by an exponential profile. The conversion parameter _{d} is given by:
(238) 
where the mixing coefficient is calculated as:
(239) 
D_{e} is the energy dissipation rate owing to current, wave, and wave breaking:
(240) 
where
(241)  
(242) 
and D_{b} is given from wave model output, and and
Sediment diffusion coefficient
Diffusion coefficients K_{x} and K_{y} are defined at cell faces and calculated as:
(243)  
(244)  
(245)  
(246) 
Bed load transport rate
Bed load transport rates q_{bx} and q_{by} are calculated at each cell center. For the van Rijn model, they are given by:
(247)  
(248) 
where
(249)  
(250) 
Bed load transport rates for the LundCIRP model are given by:
(251)  
(252) 
where a_{n }= 12 and b = 4.5.
Boundary conditions
Boundary conditions for the AD equation are given for wall boundary and for open boundary, respectively.
If a cell face is defined as a wall, the suspended load flux on the cell face is set to zero.
(253)  
(254)  
(255)  
(256) 
For the cell on the open/forcing boundary, the concentration is set as the equilibrium concentration,
(257) 
where is the depthaveraged concentration on the open boundary cell. Also, the gradient of suspended load flux is setas zero ()for the open boundary.
(258)  
(259)  
(260)  
(261) 
Criterion of time step for AD model
Calculation of the AD equation is computed at a time step of Δt_{sed}. To maintain stable calculations in an explicit solution scheme, the following condition must be satisfied:
(262) 
where Δs is the cell size, and u is the local current speed. During calculation of the AD equation, CMSM2D evaluates whether this criterion is met. If the criterion is not met, CMSM2D will reduce Δt_{sed} to maintain stability.
Hardbottom methodology for AD model
Modification of sediment transport rate owing to hard bottom is also computed in the AD model. Hard bottom is treated separately for suspended and bed load. For suspended load, the methodology assumes that upward sediment flux will be zero if the hard bottom is exposed. The criterion for the maximum pickup rate is expressed as:
(263) 
where h_{hb} is the hardbottom level, and p is the porosity. For bed load, the methodology of treating hard bottom as described in Chapter 3 is applied.
Sediment Continuity Equation
Calculation of depth change is computed by solution of the sediment continuity equation. Before solving the sediment continuity equation, timeaveraged sediment transport rates are computed from the instantaneous transport rate values. Transport rates applied in the sediment continuity calculations are total load transport rates when total load formulations are applied, or bed load transport rates when the AD equation is applied. Thus, for the sediment continuity equation, the subscript t denotes total load for total load formulations and bed load for the AD equation.
Timeaveraged transport rates for the x and y directions, respectively, are computed by:
(264)  
(265) 
in which N_{m} = number of instantaneous transport rate values, and l = index representing the time at which the instantaneous rates were calculated. Instantaneous rates are calculated at the sediment transport time step, and timeaveraged rates apply instantaneous rates averaged over the morphologic change time step . Adjustment of the timeaveraged transport rate for bottom slope is computed for the x and y directions as:
(266)  
(267) 
where the total timeaveraged transport ratesand are calculated as:
(268) 
and
(269) 
Depth change over the time interval is calculated as:
(270) 
Updated depth is then computed by:
(271) 
After new depth values are calculated for all cells in the computational domain, they are provided to the hydrodynamic portion of the model so that it can respond to changes in morphology.
For the AD model, calculation of depth change is computed by a method similar to that described above, except that suspended load and bed load components are treated separately. Before solving the sediment continuity equation, timeaveraged sediment transport rates are computed from the instantaneous transport rate values. Timeaveraged pickup rate and deposition rate for the suspended load component are computed by:
(272)  
(273) 
Timeaveraged bed load transport rates for the x and y directions, respectively, are computed by:
(274)  
(275) 
Bed load transport rates for the AD model are defined at each cell center. Solution of the sediment continuity equation requires that the bed load transport rates are defined at the centers of cell faces. Therefore, bed load transport rates are computed on the cell faces by:
(276)  
(277) 
Further, adjustment of the timeaveraged bed load rate for bottom slope is computed for the x and y directions as:
(278)  
(279) 
Depth change over the time interval is calculated as:
(280) 
Updated depth is then computed by Equation 271.
Boundary Conditions
Six types of boundary conditions are implemented in CMSM2D and are distinguished as specifying a forcing or a nonforcing boundary. Table 2 lists the boundary condition types and contains a short description of each. Each boundary condition type is described next.
Boundary Condition Types  
Boundary Condition  Description 
Tidalconstituent waterlevel forcing  Water level specified as sum of tidal constituents 
Time series waterlevel forcing  Water level specified from time series input file 
Time series waterlevel and velocity forcing  Water level and velocities specified from time series input files 
Time series flow rate forcing  Flow rate specified from a time series input file 
Closed, reflective (nonforcing)  Impermeable boundary, velocity must flow parallel to boundary 
Waveadjusted waterlevel and velocity forcing  Boundary water level and velocity values are adjusted for presence of radiationstress gradients. Provides compatibility of boundary forcing with wave forcing 
WaterLevel Forcing Boundary Conditions
Waterlevel forcing can be specified through either tidal constituents or by time series of water level read from a file. These two boundary conditions apply the same calculation approach, with the distinguishing feature between them being the source of the water level prescribed at the boundary.
If a cell is designated as a watersurface elevation boundary cell, the continuity equation for that cell is not solved, and the water level is updated each time step according to:
(281) 
where is a prescribed value. If tidal forcing is specified, then
(282) 
Tidalconstituent forcing
Tidalconstituent forcing in CMSM2D can accommodate as many as eight components of the astronomical tide. The user can select from the following constituents: M_{2}, S_{2,} N_{2}, K_{2}, K_{1}, O_{1}, M_{4}, and M_{6}. Although the M_{4} and M_{6} constituents are harmonics, they can be generated in continental shelf areas and may be present as components of the tidal forcing at the grid boundary. Specification of tidal constituents requires input information for the local amplitude and phase values. Tidalconstituent forcing by CMSM2D is simple and does not include advanced tidal calculations or relations to Greenwich tidal parameters (Schureman 1924).
Tidal elevation
is given by:
(283) 
where A = amplitude (m), s = speed (deg/hour), and f = phase (deg) of the tidal constituent. Constituents can be eliminated from the tidal forcing by setting their amplitudes to zero. If the tidal elevation boundary condition is invoked, water levels at tidal boundary cells are computed at every time step. Tidal phase and amplitude is held constant across the tidalconstituent boundary. For applications requiring amplitude and phase variation over an open boundary, two approaches to forcing the boundary are available. Time series of tidal curves along the boundary can be developed within the SMS in which the tidal information is obtained from a tidalconstituent database. Alternatively, solutions from regional models can be applied to map watersurface elevations as boundary conditions for CMSM2D.
Time series waterlevel forcing
The time series waterlevel forcing boundary condition is specified by water levels () read into the model from an input file. Time increments of the forcing data are not required to be equal to, or in multiple increments of, the model time step. Because the model will usually have a hydrodynamic time step smaller than the time interval between waterlevel forcing input, CMSM2D must be instructed on treatment of the waterlevel boundary value between times that its value is specified in the input file. One option is to linearly interpolate in time between input waterlevel values, and this is the preferred option. A second option is to keep the water level constant between input waterlevel values. The boundary condition input file for water level contains a parameter that sets the interpolation option.
Time Series WaterLevel and Velocity Forcing Boundary Condition
The time series waterlevel and velocity forcing boundary condition applies velocities at cell boundaries in addition to water levels. Application of water levels for this boundary type is identical to that previously described for waterlevel forcing boundary conditions. Velocities prescribed on the boundaries enter the momentum equation through the advective terms. Discretization of the momentum equations for applying velocities on the boundaries is identical to the implementation for nonboundary cells described in Chapter 4.
Time Series Flow Rate Forcing Boundary Condition
The time series flow rate forcing boundary condition can be assigned at locations where the flow rate is known. Typical examples where this boundary condition is applied are natural tributaries (rivers, streams, and creeks), controlleddischarge canals, and anthropogenic intake or discharge locations such as for power plant cooling water or treatment plant outfalls.
A flow rate boundary condition specifies discharge at one or more cells on the grid boundary. If a cell is designated as a flow rate boundary cell, the momentum equation for the appropriate cell face is not solved, and the flowcomponent normal to the face is prescribed. Because CMSM2D operates on a staggered grid, virtual cells are added to the right or top of the grid at flow rate forcing boundary cells prescribed on those sides. Addition of virtual cells, where watersurface elevation and current are not calculated, is required to calculate fluxes at cell faces on the right or top of the grid.
For a flow rate forcing cell located on the right side of the grid at location i+1,j, the flux is given by:
(284) 
where = input flow rate directed parallel to the xaxis, and i+1
denotes an imaginary cell adjacent and to the right of the i^{th} cell.
For a flow rate forcing cell located on the left side of the grid at location
i1,j,the flux is given by:
(285) 
For a flow rate forcing cell located on the top side of the grid at location i,j+1,the flux is given by:
(286) 
where= input flow rate directed parallel to the yaxis.
For a flow rate forcing cell located on the bottom side of the grid at location
i,j1, the flux is given by:
(287) 
Closed, Reflective Boundary Condition
The closed, reflective boundary condition is specified at impermeable boundaries, such as at the landwater interface. These boundaries behave as walls; water can flow parallel to the wall face, but not through it.
The normal velocity at a closed boundary on the left cell face is:
(288) 
and the normal velocity at a closed boundary on the bottom face is:
(289) 
Closed boundaries on the right and top cell faces are prescribed at the imaginary cells i+1,j and i,j+1, respectively.
WaveAdjusted WaterLevel and Velocity Forcing
Simulations for nearshore areas may have available boundary forcing information that does not include the presence of waves. The waveadjusted waterlevel and velocity boundary condition modifies the prescribed forcing values to account for waves. If waterlevel forcing or mixed waterlevel and velocity forcing are applied together with radiationstress forcing, then in this boundary condition, boundary values are adjusted for wavedriven current and set up or set down. Boundary adjustment is conducted by creating a surface deflection (set up and set down) consistent with that of the interior solution so that radiation stressforced flow can move smoothly through the boundary (Reed and Militello 2005). It is believed that this boundary condition is new to coastal circulation modeling.
Implementation of the waveadjusted boundary conditions within CMSM2D is automated. Thus, if radiationstress gradients are applied as forcing, CMSM2D will automatically apply the waveadjusted boundary condition to adjust the prescribed forcing for the presence of waves.
Adjustment to the prescribed boundary conditions is conducted by solving the 1D continuity and momentum equations normal to the boundary, in which the radiation stress gradient is included in the momentum equation. The forms of the 1D continuity and momentum equations for the xdirection are:
(290)  
(291) 
in which:
(292) 
where is the applied boundary condition,is the prescribed boundary value (read from a file), and are the solutions from Equations 290 and 291, and is given by:
(293) 
where and denote facecentered averages that place h and at the same position as . If the boundary is specified a mixed watersurface elevation and velocity boundary, then the ucomponent of velocity assigned at the boundary is modified by:
(294) 
where u is the applied velocity at the boundary and u_{b} is the prescribed velocity (read from a file).
The 1D continuity and momentum equations for the ydirection are:
(295)  
(296) 
where and are the solutions from Equations 295 and 296, and is given by:
(297) 
where and are facecentered averages that place h and at the same position as . If the boundary is specified as a mixed watersurface elevation and velocity boundary, then the v component of velocity assigned at the boundary is modified by:
(298) 
where v is the applied velocity at the boundary and v_{b} is the prescribed velocity (read from a file).
The waveadjusted boundary condition is demonstrated in Appendix G for an idealized beach.
Model Features
Capabilities have been implemented into CMSM2D to represent flooding and drying, and other features designed to promote flexibility and convenience of the modeling system. This chapter describes these features and provides information on model options. Topics covered are: flooding and drying, hotstart options, model spinup, coupling with larger scale circulation models, coupling with wave models, and output options.
Flooding and Drying
Numerical modeling of shallowwater areas such as beaches, flood shoals, or expansive tidal or windtidal flats is most accurately performed if realistic and robust flooding and drying algorithms are invoked. Representation of flooding and drying also eliminates the need to modify grid depth to avoid artificially induced instabilities. Numerical simulation of flooding and drying of cells or elements in hydrodynamic models has been performed with various techniques such as application of barrier and weir equations (Reid and Bodine 1968; Butler 1978; Wanstrath 1978) and moving boundaries (Yeh and Chou 1978). A simple and robust flooding and drying algorithm has been implemented to represent inundation and drying of shallow areas of the model domain.
Criteria were established for the flooding and drying algorithms implemented in CMSM2D and are given in Table 3. The criteria were specified so that the algorithms would produce realistic behavior, and numerical problems, such as oscillations and flutter, would be minimized.
Criteria for Flooding and Drying Algorithms  
Flooding  Comments 
Water depth must exceed a specified minimum depth  Transfer of physically meaningful water volume, avoids flutter 
Water must be moving toward dry cell  Takes into account windinduced set up, avoids instability 
Drying  Comments 
Total water depth is less than specified minimum depth  Definition of drying 
Every wet cell is checked to determine whether or not it has dried after new waterlevel and velocity values have been calculated over the model domain. The criterion for a cell to be dry is:
(299) 
where = total water depth, and = depth below which drying is assumed to occur. If a cell or its adjacent neighbor to the south or west has become dry, restrictions on flow between the two cells are imposed. Restrictions governing flow across the two faces are imposed for the following conditions:
a.Both cells on each side of a face are dry.  
and ,  (300) 
and ,  (301) 
This restriction sets the velocity at the face to zero so that there is no transfer of water between dry cells.
b.Neighbor to south or west is dry, and cell i,j is wet.  
(302)  
(303) 
This restriction sets the velocity at the face to zero if the velocity at the previous time step indicates transfer of water from a neighboring dry cell to the wet cell i,j. Water is allowed to flow from the wet cell to the neighboring dry cell.
c.Neighbor to south or west is wet, and cell i,j is dry.  
(304)  
(305) 
This restriction sets the velocity at the face to zero if the velocity at the previous time step indicates transfer of water from dry cell i,j a neighboring wet cell. Water is allowed to flow from the neighboring wet cell to the dry cell i,j.
HotStart Capabilities
CMSM2D has two hotstart capabilities, and both can be invoked during a simulation. The two hotstart types are:
a.  Hotstart file written once during a simulation at a userspecified time. The file name prefix is given by the user. This file can be opened in future simulations to initialize CMSM2D at a convenient time, such as after the model has spun up.  
b.  Hotstart file written at userspecified intervals. If this option is invoked, CMSM2D will alternate hotstart file names HOTSTART1.M2I and HOTSTART2.M2I each time a hotstart file is written. An information file called HOTSTART.INFO is also written that contains the name of the last hotstart file that was written and the simulation time, in hours, when the hotstart file was saved. These hotstart files are helpful in restarting simulations that terminate unexpectedly.
Model SpinUp: Ramp FunctionModel spinup is controlled by a hyperbolic tangent function that scales values of the input forcing over a userspecified interval. A timedependent scaling factor is computed as:
where T_{ramp} = time over which the model is spun up. All model forcing is multiplied by the scaling factor over the duration of the ramp. After the simulation time exceeds the ramp duration, the scaling factor is set to 1.0. Coupling with LargerDomain ModelCMSM2D can be operated as a detailed inset of a largerdomain model. This capability maintains hydrodynamic properties at the CMSM2D boundaries, increases flexibility in resolution over the project area, and allows for application of options within CMSM2D that may not be available in other models. Coupling can be invoked by forcing CMSM2D with watersurface elevations or a combination of watersurface elevations and velocities, where the values have been obtained from a largerdomain model. The SMS provides an automated procedure for extracting and mapping boundary information from a largerdomain model to CMSM2D (Chapter 8). CMSM2D can accept boundary information from any largerdomain model, including another CMSM2D simulation. Considerations for coupling with a largerdomain model are discussed here with an example shown for CMSM2D forced by watersurface elevations and velocities calculated by ADCIRC. If a largerdomain model is to provide boundary conditions for CMSM2D, mesh or grid resolution of the largerdomain model in the area of the CMSM2D boundary must be sufficient to describe details of the hydrodynamic field at the scales required for the particular project. Figure 12 shows a CMSM2D grid overlaid on a portion of an ADCIRC mesh developed for Shinnecock Inlet, NY. Distances between ADCIRC nodes are a few times larger than the CMSM2D cell sizes, but are not greatly larger. If the ADCIRC nodes were spaced further apart, having only a few nodes in the vicinity of the CMSM2D boundary, details of the flow field would not be adequately described to capture the inlet and ocean hydrodynamics of the area. Figure12. CMSM2D grid and ADCIRC mesh for Shinnecock Inlet, NY Temporal resolution of the boundary information provided to CMSM2D from the largerdomain model must also be considered. Output frequency of largerdomain model solutions should be set to minimize error in forcing for the scales of motion calculated. As an example, waterlevel curves calculated by the function , where t is in hours, and output at increments of 1.0 and 0.25 hr are shown in Figure 13. Output at 0.25 hr produces a curve that describes the water level significantly better than the curve output at 1.0 hr. An example of the error introduced by the 1hr interval output is shown at the second peak, in which a 3cm difference is encountered. Application of a solution from a regional model as boundary conditions for CMSM2D can be conducted for simulations in which any combination of tide, wind, and waves are needed. When the regional model is launched, it should contain all forcing to be included in the simulation (tide, wind, etc.) except for waves. Wave forcing should be applied only to the local CMSM2D simulation. There are two reasons for this approach. First, if waves are applied as forcing, CMSM2D automatically adjusts its forcing boundaries for the presence of waves (waveadjusted boundary condition) to compute set up and set down, and to allow wavedriven flow into and out of the domain. If the regional model includes wave forcing, then the regional solution will transmit the wavedriven component of the solution into the CMSM2D boundary conditions. Combination of the prescribed boundary conditions from the regional model and the waveadjusted boundary condition will then result in the wave forcing being applied twice at the CMSM2D boundary. Secondly, the regional model will usually have coarser resolution than the CMSM2D local grid, and will not have adequate resolution in the surf zone to accurately describe the distribution of set up, set down, and wavedriven currents. If waves are included in the regional model forcing, the interpolation or extrapolation of the wavedriven component of the regional solution to the local CMSM2D boundary will not contain sufficient detail to accurately describe the response in and near the surf zone. Thus, error will be introduced into the CMSM2D boundary conditions. Figure13. Time discretization of a sinusoidal waterlevel curve Coupling with STWAVE and WABEDCMSM2D and a wave model such as STWAVE (Militello and Zundel 2003) or WABED (Lin et al. 2006) can be coupled through the SMS Steering Module (Chapter 8). Coupling can be conducted by supplying CMSM2D with radiationstress gradients and wave properties calculated by the wave model and by applying currents and water depth (h + η) calculated by CMSM2D as input to the wave model. The user has the option of selecting one or more of these linkages. Guidance is provided here to assist the user in setting up a correct and successful coupled simulation. CMSM2D and STWAVE (or WABED) calculate on different coordinate systems that may or may not be aligned, depending on the orientation of the shoreline relative to geographic coordinates. The coordinate system for CMSM2D can be specified in the range of ± 45 deg from geographic coordinates, meaning, that positive x is directed within 45 deg of east and positive y is directed within 45 deg of north. An angle provided in the CMSM2D control file defines the deviation of the CMSM2D grid from geographic coordinates. STWAVE operates on a grid aligned such that the xaxis is directed onshore and the yaxis is directed alongshore. Figure 14 shows three examples of CMSM2D and STWAVE coordinates for different shoreline orientations. Each model must be independently established so that its coordinate system is consistent with its computational approach. For coupling, the CMSM2D and STWAVE grids overlap and information is mapped from one model to the other. The SMS automatically calculates any required rotations of components when mapping fields between STWAVE and CMSM2D. In areas of the computational domain where wave breaking or strong wavecurrent interaction takes place, resolution for CMSM2D and STWAVE should be similar. By specifying cells in both models to have similar spacing, coupling efficiency is maximized because highresolution details calculated by one model are not lost when the solution field is mapped to the other model. Figure 15 shows STWAVE and CMSM2D grid spacing in the nearshore area. Surf zone width is indicated by the line denoting 10 STWAVE cells. In this area, CMSM2D and STWAVE have similar spacing in the crossshore. Cell sizes in the CMSM2D grid become larger seaward of the surf zone. Coupling CMSM2D and STWAVE (or WABED) requires that the user specify the steering interval, or elapsed time between calls to STWAVE. Selection of the steering interval is dependent on the processes that are most significant to the goals of the modeling effort. A smaller steering interval tightens coupling between the models, increasing accuracy. However, smaller steering intervals require more wave model runs and increase the overall computation time. Thus, the user must balance the cost of run time versus accuracy. Temporal scales of processes being modeled also play a role in the selection of the steering interval. For example, if a mean wave condition is being applied in a predominantly tidal situation, and the wave properties do not change much over time, the steering interval can be set to a relatively large value. If a storm is being modeled and full coupling between the wave model and CMSM2D is required, then the steering interval should be set to a smaller value. If a situation is studied in which there is strong wavecurrent interaction, such as at an inlet, then a shorter steering interval may be specified to capture the modification of the waves by the tidal current and the timevarying water level. Typical steering intervals are 3 hr for fair weather conditions; and for storm waves, the steering interval should be more frequent. Judgment and experience must be exercised, as for all numerical models, and sensitivity analysis is recommended for a particular application to determine the most appropriate steering interval. Figure14. Example CMSM2D and STWAVE grid orientations Figure15. Example CMSM2D and STWAVE grid spacing Output OptionsCMSM2D provides two types of output that can be selected by the user. Time series of calculated variables at specific cells, called observation cells, can be saved at userspecified time intervals. Global fields can be written at userspecified times.
All variables are output at their computational location in the cell. Thus, watersurface elevation and depth are at the cell center, the ucomponent of velocity, xcomponent of flow rate, and xcomponent of transport rate are at the left cell face center, and the vcomponent of velocity, ycomponent of flow rate, and ycomponent of transport rate are at the bottom cell face center.
Observation cell time seriesTime series of watersurface elevation, ucomponent of velocity, vcomponent of velocity, xcomponent of flow rate, and ycomponent of flow rate can be saved at observation cells. The user can specify any number of cells as observation cells. Any combination of variable output may be selected ranging from one to all five previously listed. A time interval for output must be specified, and the most accurate timing of output is achieved if the output interval is specified as an integer multiple of the calculation time step. Observation cell output will take place from the start to the end of the simulation. The SMS interface provides tools for specifying all aspects of the observation cell output. Time series of each variable selected for output is written to a separate file and values for all observation cells are included in that file. Chapter 9 describes the format and provides an example of the time series observation cell output files.
Global field outputGlobal output of scalar (watersurface elevation and depth) and vector components (velocity and sediment transport rates) can be written at userspecified times. Each variable type is written to a separate file. CMSM2D reads two files containing times at which global output is specified, one file for scalar variables and one file for vector variables. Thus, global output times for the two variable types are not required to be concurrent, and the increment between successive times does not have to be constant. By specifying discreet time stamps, the user has flexibility for creating global files with more dense temporal resolution during certain time intervals. The SMS interface provides tools for specifying all aspects of the global output. Chapter 9 describes the format and provides an example of the global output files.
Surfacewater Modeling System Interface for CMS‑M2DCMSM2D is supported by an interface with SMS Versions 8.0 and higher. The interface contains tools for grid development, parameter specification, control file setup, boundary specification including extraction of watersurface elevation and/or velocities from regional models such as ADCIRC, model runs, postprocessing of global field values, visualization, and coupling of CMSM2D with STWAVE or WABED through the Steering Module. This chapter provides instruction on creating and working with CMSM2D projects within the SMS. Dialogs shown are from SMS 9.0 and 9.2.
Access to the CMSM2D interface is obtained through the Cartesian Grid Module in the SMS. The Map Module can also be used to create simulations for CMSM2D via a CMSM2D Coverage. The interface for CMSM2D includes:
Required InformationA CMSM2D grid is a Cartesian Grid with cells that may be of varying sizes. Each cell has a location, side dimensions (Δxand Δy), and depth. Grid definition within SMS includes:
The SMS interface provides tools and methodology for the user to define each of these components and to develop the grid. Depths over the model domain are the most complex component of the grid because these values can represent any geometric shape. Bathymetric information is supplied to the SMS by the user as either a constant depth or as a spatially distributed set of data points (also known as a triangulated irregular network or TIN). Each point in the TIN has a depth associated with it. The SMS can read Digital Elevation Model (DEM) grids or scattered data point surveys and display them as a surface to show the area over which a grid will be generated. A typical scatter data set is illustrated by the red crosses in Figure 16. The SMS interpolates scattered data to the grid to define the depths at each cell. For more information on scatter data sets and the Scatter Data Module, refer to the SMS Help file or SHOALS toolbox documentation (Wozencraft et al. 2002). After defining a surface to represent the depth values, the user specifies the position, orientation, and extent of the grid using a rectangular object called a grid frame. Simple grids with constantsized cells can be created in the Cartesian Grid Module. More complex grids are created in the Map Module. Figure 16. Grid frame around scattered data points Grid Generation from CMSM2D CoverageMost grids will be developed within the Map Module. Information in the Map Module is stored in layers or coverages. Each coverage has a specific type, which defines the properties of the information stored in that layer. The SMS includes a CMSM2D coverage type to allow the definition of a CMSM2D simulation. A default coverage is in the SMS at all times. This default coverage can be used to create a CMSM2D coverage by changing its type. Otherwise, a new coverage with type CMSM2D can be created by leftclicking on Map Data in the Project Explorer (the data tree on the left side of screen) and then selecting New Coverage. To convert a coverage to a CMSM2D coverage, leftclick on the coverage to select it, then rightclick and choose Type to expand the Coverage Type options, then select CMSM2D. By changing a coverage to be a CMSM2D coverage, the modeler has instructed the SMS to create a CMSM2D grid from the information being entered.
Grid frame creation and editingWith a CMSM2D coverage active, the grid frame is defined by selecting the Create Grid Frame tool . When this tool is active, clicking in the main display window of SMS defines the position and extents of a grid frame. The first click defines the origin of the grid, the second click defines the bottom edge of the grid and its size in the "I" direction, and a third click defines the size of the grid frame in the "J" direction. A new grid frame or enclosing shape for the grid is created on the screen (Figure 16). This grid frame can be moved, rotated, enlarged, or reduced in size either graphically or by accessing edit windows before the grid is generated to fill the frame. To edit a grid frame, the modeler selects the Select Grid Frame tooland clicks on the grid frame to be edited. Handles appear at the corners and sides of the selectedgrid. The user may drag any of these handles to change the size and position of the grid frame. A circular handle that extends from the "I" axis of the grid frame can be dragged to change the orientation of the grid frame. The following graphical editing operations and their functions are available when a grid frame is selected:
Grid frame parameters can also be explicitly modified using the edit window that appears when the grid frame is selected. These parameters are:
The grid frame size is displayed at the lower edge of the screen as it is being edited. Grid generationAfter the grid frame is defined, a CMSM2D grid is generated in SMS with the Feature Objects  Map > 2D Grid command. This command opens the Map>2D Grid dialog (Figure 17). For a simple grid frame, this dialog allows the user to specify the number of cells in each direction (or the cell size in each direction) and the source for depth information. The resulting grid will consist of constantsized cells. Figure17. Map> 2D Grid and Refine Point dialogs CMSM2D allows varying cell sizes to provide greater resolution in areas where needed. The interface provides for the development of grids with greater resolution in specific areas through the creation of refine points. A refine point is produced by creating a feature point at the location where specific resolution is to be assigned. Double clicking on the feature point (with the Select Feature Point tool active) invokes the Refine Point attributes dialog. This dialog allows for specification of cell sizes around the point, spatial change in cell sizes with distance from the refine point, and a maximum cell size. For the settings shown in the Refine Point portion of Figure 17, the cell around the refine point would be a 10m ( 10m cell, the cells would get 10 percent bigger with each row or column, and the largest cell would be 20 m ( 20 m. If refine points are specified, the Cell Options portion of the Map>2D Grid dialog does not contain userspecified options, but informs the user that the cell properties will be calculated from the refine point specifications. When refine points are present in the CMSM2D coverage, the top portion of the Map>2D Grid dialog is dimmed out. The SMS will generate cells that match the refine point specifications. If multiple refine points are present and conflict with each other, cells will be created to meet the criteria of all refine points as closely as possible. Figure 18 shows a grid developed with a refine point in the inlet and cell strings around the grid boundary. Figure18. SMSgenerated CMSM2D grid Each cell will be assigned a depth based on the depth option, and cells will be assigned to be land or water based on the resulting depths. However, the modeler may force islands, or other coastline features, into a grid by creating arcs with the Create Feature Arc tool. These arcs will then represent the coastline in the CMSM2D coverage. Attributes of the arc can be specified by activating the Select Feature Arc tool and then selecting the arc. With an arc selected, the user can issue the Feature ObjectsAttributes command in the pulldown menu. This action brings up the dialog shown in Figure 19. Cells generated along this arc will be treated as specified by the arc type. By default, cells intersected by these coastline arcs are classified based on the percent of the cell on the "land" side (percent preference arc). If more than half the cell is land, the cell is classified as land. In some situations, however, the model may require a continuous stretch of either land or water to represent a specific shoreline feature, such as a jetty or narrow canal. In these situations, the coastline arcs may also be flagged as "land" or "water" preference. Thus, the three options for arc preferences are:
Figure19. Arc options for developing coastlines After an arc type is specified, selecting the arc will reveal the water and land sides of the arc, which are displayed as blue and brown arrows, respectively. If the water and land sides of the arc are opposite from what they should be, the arc direction can be reversed by clicking Reverse Arc Direction under the Feature Objects pulldown menu. The Map>2D Grid command also creates cell strings across all ocean boundaries of the grid. These strings are described in the following section and are tools for assigning boundary conditions for the numerical model run. Cartesian Grid ModuleThe Cartesian Grid Module contains tools for editing 2D Cartesian grids. These grids consist of cells aligned with a rectilinear coordinate system. An existing grid can be read in from a CMSM2D simulation file, or created through the Map Module. To enter the Cartesian Grid Module from another module, select Cartesian Grid Data from the Data Tree. With a grid in memory, the following tools are available to edit the grid:
Select CellThe Select Cell tool is used to select a grid cell. A single cell is selected by clicking on it. A second cell can be added to the selection list by holding the SHIFT key while selecting it. Multiple cells can be selected at once by dragging a box around them. A selected cell can be deselected by holding the SHIFT key as it is clicked. When a single cell is selected, its Z coordinate is shown in the Edit Window. The Z coordinate can be changed by typing a new value in the edit field, which updates the depth function. If multiple cells are selected, the Z coordinate field in the Edit Window shows the average depth of all selected cells. If this value is changed, the new value will be assigned to all selected cells. With one cell selected, the Edit Window shows the cells i,j location. With multiple cells selected, the Edit Window shows the number of selected cells. Select Row/Select ColumnThe Select Row and Select Column tools are used to select cell rows and columns, respectively. Multiple rows and columns are selected in the same manner as selecting multiple individual cells: holding the SHIFT key, etc. Insert Column/Insert RowWhen the Insert Column or Insert Row tools are active, clicking within a cell splits the row/column containing the selected cell, creating a new row or column in the grid. The Zvalues of all split cells are the same as the original cells’ values. Drag Colum/Drag Row BoundaryThe position of the edge of rows or columns in a grid can be changed with the Drag Column or Drag Row tools. These tools make one column/row narrower while making its neighbor wider. These tools allow for manual specification of the resolution in specific portions of the grid. Note that depth values are not adjusted, so significant dragging of boundaries should be avoided, or depths should be reinterpolated after the boundaries are modified. Create Cell StringThe Create Cell String tool allows the modeler to group a string of cells together for the purpose of assigning boundary conditions. Cell strings are created automatically around water boundaries when a grid is generated. The user may create others as desired or delete and replace the automatically generated cell strings. When the Create Cell String tool is active, the modeler selects each cell to be added to the string. By holding down the SHIFT key, all boundary cells between the previously selected cell and the selected cell are added to the cell string. Select Cell StringTo specify a boundary condition, the modeler must create a cell string along the desired boundary cells, and then select the cell string while the Select Cell String tool is active. Specification of a boundary condition for the selected cell string is conducted through the Assign BC dialog, which is accessed through the CMSM2D pulldown menu. CMSM2D MenuThe CMSM2D menu includes commands for managing the simulation. Management operations are editing boundary conditions and cell attributes, checking the simulation for common errors, and running a model. Commands from the menu are explained in the following sections:
Assign BCThe Assign BC command allows the user to assign a boundary condition to the cell string through the CMSM2D Boundary Conditions dialog (Figure 20). This command is active only if a cell string is selected. Figure20. CMSM2D Boundary Conditions dialog Boundary conditions specified within this dialog include the following:
File formats for use with CMSM2D are described in Chapter 9 and Appendix A. Figure21. Extract Boundary Conditions dialog Figure22. Extract Tidal Constituents dialogs Delete BCThe Delete BC command allows the user to delete the boundary condition assigned to a cell string. A cell string must be selected to activate this command.
Assign Cell AttributesThe Assign Cell Attributes command (Figure 23) allows the modeler to set the status for one or more selected cells. A cell can be an Inactive Land Cell, an Active Ocean Cell, an Inactive Ocean Cell, or an Observation Cell. These cell types are defined as: Inactive Land Cell: A cell that is considered as land within the SMS and will not be saved to the CMSM2D computational domain. If an Inactive Land Cell is adjacent to an Active Ocean Cell, the interface between the two cells will be treated as a wall. Active Ocean Cell: A cell that is considered as water within the SMS and will be saved to the CMSM2D computational domain. All cells in which computations are to take place must be designated as Active Ocean Cells. Inactive Ocean Cells: A cell that is considered as water within the SMS but will not be saved to the CMSM2D computational domain. These cells are specified adjacent to cell strings outside of the Active Ocean Cell region to denote that the area is water. This information is used by the SMS to apply correct boundary specifications in the CMSM2D grid. Observation Cells: An Observation Cell is a numerical station and must be assigned as an Active Ocean Cell. If a cell is specified as an Observation Cell, the Observation Cell Output Type portion of the Assign Cell Attributes dialog becomes active and the user can specify whether Time Series (watersurface elevation and velocity) or Flow Rate values are to be output as time series. Further output specifications for Observation Cells are specified in the Model Control dialog discussed later in this chapter. The Assign Cell Attributes dialog also provides the capability to assign cells as hard bottom within the Hard Bottom Options area. To specify a cell as a hardbottom cell, the option "Mark selected cells as nonerodible" must be checked. Then, the hardbottom depth (maximum erosion depth) is assigned as either the cell depth or is specified as a value that is different from and greater than the cell depth. The option to specify the hardbottom depth as a depth other than the cell depth allows for cells to start the simulation covered with sediment. Bottom roughness can also be assigned in the Assign Cell Attributes dialog as Manning’s n. FigureMERGEFORMAT 23. Assign Cell Attributes dialog Merge CellsThe Merge Cells command allows the modeler to merge consecutive rows or columns into one. The command is enabled only if rows or columns have been selected with the appropriate tool (select row or column).
Model CheckThe Model Check command performs a number of checks on the simulation to ensure a valid model. If the system detects any missing or problematic components, it displays a message in the Model Checker dialog (Figure 24). The top portion of the dialog displays the problem while the middle and bottom sections describe the problem and a series of steps to correct the problem. When performing a model check, the SMS ensures that:
Figure24. Model Checker dialog CMSM2D Model ControlThe CMSM2D Model Control command displays the Model Control dialog (Figure 25). Five tabs allow access to different model input and specification dialogs. These dialogs are: Model Control: Set up optional input files, specify sediment transport options, and specify wave input. Model Parameters: Specify miscellaneous parameters for wind and latitude, specify whether advection and mixing terms are invoked in momentum equation, specify whether to include wall friction, and set depth at which cells are treated as dry. Time Control: Set up model simulation, ramp time, and hydrodynamic time step. Output Control: Specify type and timing of hot start files, provide names for global files; provide specifications for numerical station output. Tidal Constituents: Specify the amplitude and phase of tidal constituents if applied as boundary forcing. A full description is provided for each dialog. Figure25. CMSM2D Model Control: Model Control dialog The Model Control dialog contains three areas: Input Files Options, Sediment Transport, and Wave Data. Input file options. Although not required, externally generated input files can be accessed in the simulation. By turning on the toggle next to each input file type, an existing file can be selected by clicking on the File Browse button. Alternatively, the user can manually create the input file by clicking on the button to the right that identifies each file type. For example, in Figure 25, an input file for time specification of vector plot output will be read by CMSM2D, and it is called "Flume__m2d_V.m2t." Alternatively, the user can specify the time stamp information by entering the Choose Time… dialog. Initial conditions (*.m2i). The initial conditions file contains a line for every cell in the grid containing information on the state of each cell. This information includes cell identification number, depth, watersurface elevation, u and vcomponents of velocity, suspended sediment concentration, at interior cells (boundary cells have value of 0.0), at boundary cells (interior cells have value of 0.0), u’ and v’ (solutions of Equations 291 and 296). A full description of the initial conditions file is given in Chapter 9. Wind (*.m2w). The wind file contains a list of time steps containing wind magnitude and direction. Each line contains three values: time (hours), magnitude (m/s), direction from which the wind is blowing (deg). Wind directions are referenced as from north = 0 deg, from east = 90 deg, etc. Note that this wind direction convention is different from the convention described for the governing equations (Chapter 2). CMSM2D converts the wind velocity from the input file convention to the computation convention internally. Clicking the Wind Control button brings up a dialog where wind magnitude and direction time series can be specified. Time specification for vector plot output (*_V.m2t). The Time Specification dialog allows the user to specify time stamps for global solution output (in hours). Vector plot output time specification corresponds to the global velocity and transport rate solution files (*.m2v). Time increments between global output can vary, allowing the user to have more or less frequent output. Time specification for global elevation output (*_E.m2t). The Time Specification dialog allows the user to specify time stamps for global solution output (in hours). Scalar plot output time specification is associated with the times at which CMSM2D will write out the global elevation and global depth files (*.m2s). Time increments between global output can vary, allowing the user to have more or less frequent output. Sediment transport. The Calculate sediment transport option allows the user to execute sediment transport and morphology change calculations. By clicking Calculate sediment transport, file name options, sediment transport time steps, and transport formulation options become available. Global bottom change prefix (*.m2s). The Global bottom change prefix is the prefix of the file name that will contain the global depth information (in hours), as computed by the morphology change calculations. An extension of ".m2s" is appended to the specified prefix. This global output file will be written at time stamps contained in the file specified by the Time specification for global elevation. The global depth file format contains a line with the time step, followed by subsequent lines for each grid cell with three values: xposition in present coordinate system, yposition in present coordinate system, and depth. Position values have units of meters and depth values have units of meters. Global transport rate prefix (*.m2v). The Global transport rate prefix is the prefix of the file name that will contain the global total transport rate information (in hours). An extension of ".m2v" is appended to the specified prefix. This global output file will be written at time stamps contained in the file specified by the Time specification for vector plot. Two total load global transport rate files will be written. Instantaneous transport rates are written to a file having the Global transport rate prefix, and averaged transport rates (over time interval of dt_{morph}) are written to a file having "AVG" appended to the Global transport rate prefix. If the LundCIRP total load formulation or the AD equation is selected for sediment transport calculations, two additional global transport rate files are written, one for instantaneous bed load transport and one for instantaneous suspended load. File names for the bed load and suspended load files have "BED" and "SUS" appended to the Global transport rate prefix. Note that, if hardbottom cells are present, the averaged total load transport rates that are saved to the file containing "AVG" have been adjusted to account for transport rate modifications owing to the presence of nonerodible substrate, but the instantaneous values contained in the remaining transport rate files contain the potential transport rate values. The global transport rate file format contains a line with the time step, followed by subsequent lines for each grid cell with four values: xposition in present coordinate system, yposition in present coordinate system, xdirected transport rate, and ydirected transport rate. Position values have units of meters, and transport rate values have units of m^{3}/s/m. Transport rate time step. The Transport rate time step is the time interval at which instantaneous sediment transport rates are computed in the total load formulations, and is the time interval at which the AD equation is solved and instantaneous transport rates computed if the AD formulation is applied. The transport rate time step has units of seconds. Morphologic time step. The Morphologic time step is the time interval at which morphology change is calculated and the depth is updated. The morphologic time step has units of hours. Formulation. If sediment transport is invoked, the user must select a transport formulation to apply. Formulation options are: LundCIRP total load, Watanabe total load, and AD equation and each option can be selected by clicking the radio button adjacent to it. Options specific to each formulation are accessed by clicking on the Formulation Options button. Specific parameters (Figure 26) include the median particle size, sediment density, and water density for all formulations. Each formulation also includes other parameters as shown. Figure26. CMSM2D Sediment Transport Option dialogs Wave data. Information calculated by a wave model can be entered as input to CMSM2D in this section. The Include STWAVE radiation stresses box should be checked only if a radiationstress gradient file is available for CMSM2D to read in directly and the Steering Module is not invoked. This alreadyexisting file can be selected by clicking on the File Browse button. If the Steering Module is to be run, do not check the Include STWAVE radiation stresses box as SMS will do this automatically as files become available. All other wave properties can be included in a simulation by checking the Wave Conditions box. If the Wave Conditions box is checked, CMSM2D will read files containing wave height, period, direction, breaking index, and dissipation. Radiation stress file (*.m2v). The radiation stress file contains the global radiationstress gradient information (in hours). An extension of ".m2v" is customary for this file as it includes vector information, and the SMS applies this extension to radiationstress gradient files when creating them in the Steering Module. During Steering simulations, the SMS writes radiationstress gradient files for CMSM2D that have values at time steps equal to the steering interval. The global radiationstress gradient file format contains a line with the time step, followed by subsequent lines for each grid cell with four values: xposition in present coordinate system, yposition in present coordinate system, xdirected radiationstress gradient, and ydirected radiationstress gradient. Position values have units of meters and radiationstress gradient values have units of m^{2}/s^{2}. The Model Parameters tab of the Model Control dialog (Figure 27) contains four areas: Miscellaneous Parameters, Momentum Equation, Wall Friction, and Wetting and Drying. Miscellaneous Parameters. This area of the dialog allows the user to specify parameters relating to wind and Coriolis calculations. Anemometer height. If wind is specified, the height of the anemometer is required. The standard anemometer height is 10 m, and this is the default value provided by SMS. If measurements were taken with an anemometer at a different height, this height should be entered here so that CMSM2D will convert the wind speed to wind speed at 10 m. Units for anemometer height are meters. Figure27. CMSM2D Model Control: Model Parameters dialog Rho_atm/Rho_water. Ratio of density of air to density of water. The default value is 0.0012 and generally should not be modified. Latitude throughout Grid. CMSM2D applies the cellspecific latitude to compute the Coriolis term in the momentum equations. If a standard coordinate system is specified for a CMSM2D grid, such as State Plane or UTM, the SMS will determine the latitude at the center of each CMSM2D cell. If a local (userdefined) coordinate system is specified, the SMS does not have sufficient information to determine the cell latitudes. If cell latitudes cannot be determined by the SMS or if the user prefers to apply a single value of latitude over the grid, then a value for Average latitude can be entered that will be applied over the entire grid. Setting the latitude to zero over the entire grid will turn the Coriolis term off. Momentum Equation. This area of the dialog allows the user to independently turn on or off the advective and mixing terms in the momentum equations. To include the advective terms, the box adjacent to Include advective terms must be checked. To include the mixing terms, the box adjacent to Include mixing terms must be checked. Wall Friction. This area of the dialog allows the user to invoke wall friction, which is increased friction at cells having at least one wall. If the box adjacent to Include wall friction is checked, wall friction will be included in the calculations. Wetting and Drying. This area of the dialog allows the user to specify the depth, in meters, at which CMSM2D treats cells as dry. Typical values lie in the range of 0.03 to 0.08 m. The Time Control tab of the Model Control dialog (Figure 28) allows specification of the start date and time, simulation duration, ramp duration, and the time step. SMS can compute a theoretical maximum time step based on celerity. Practical application of CMSM2D requires that the time step be less than the theoretical maximum. A general guideline is to set the time step to half of the theoretical maximum, and then adjust the time step according to the hydrodynamic properties of the simulation. Time Variables. This area of the dialog allows the user to specify time variables. The Start Date and Start Time are optional entries that do not affect the model computations or timing. The Start Date and Start Time are used only to calculate Julian Day values for time stamps for numerical station output. Simulation Duration. The simulation duration is the total time for simulation. For example, if a simulation is to be run for 30 days, then a value of 720 hr is entered for the simulation duration. Simulation duration is given in hours. Ramp Duration. The ramp duration is the amount of time specified for model spinup. A typical ramp duration for an applied project is 1 day. Ramp duration is given in days. The Output Control dialog (Figure 29) provides options for hot starts, global output files, and numerical station output files. Figure28. CMSM2D Model Control: Time Control dialog Figure29. CMSM2D Model Control: Output Control dialog Hot Start. Two independent hot start options are available for CMSM2D. Checking the Write Hot Start Output File box allows the user to specify a time at which a file of the same format as the initial conditions file will be written. The hot start file can be later used as an initial conditions file for subsequent model runs. The user specifies a prefix for the hot start file name and the elapsed time, in hours, at which the file will be written. By checking the Automatic Recurring Hot Start File box and providing a time interval (hours), hot start files will be written at the time interval specified. Hot start files are written with file names alternating with HOTSTART1.M2I and HOTSTART2.M2I. These files can be later input as initial conditions files for a subsequent simulation. The file HOTSTART.INFO is also written and contains the name (HOTSTART1.M2I or HOTSTART2.M2I) and time of the last saved hot start file. Output Files. Global velocity and elevation output file names are specified in this section of the dialog. CMSM2D supports two types of global output, vector and scalar for each cell in the grid. Traditionally this output has been stored in ASCII files defined for the model. These ASCII files (described below), can become very large. Another option added in this version of the model is to save the same output into a binary formatted XMDF file. The user can elect to save ASCII, Binary, or both file types by checking the boxes for "Output ASCII" and/or "Output Binary." Description of the XMDF formats can be found at http://www.wes.army.mil/ITL/XMDF. Global velocity (*.m2v). By checking this toggle box, a global velocity solution will be written out by CMSM2D at the times specified in the CMSM2D Output Time Specification dialog for Vector Plot. The file extension ".m2v" is appended to the prefix specified. The global velocity file format contains a line with the time step, followed by subsequent lines for each grid cell with four values: xposition in present coordinate system, yposition in present coordinate system, ucomponent of velocity, and vcomponent of velocity. Position values have units of meters and velocity values have units of meters per second. Global elevation (*.m2s). The explanation provided for Global velocity applies here as well, with the difference being that a global elevation solution will be written out. The global elevation file format is the same as that of the global velocity solution file, with the exception that the u and vcomponent velocity values are replaced by the water level in meters at each cell. Time Series Output Files. This section allows the user to specify output options for numerical stations where watersurface elevation and/or velocity are to be saved at equal time increments. A prefix for the file containing the numerical station output must be specified. The file extension ".m2o" is appended to the specified prefix. Entering a nonzero time increment, in seconds, provides the output timing. Note that this time increment should be an integer multiple of the hydrodynamic time step. Check the variables that are to be output (u, v, or η). The ".m2o" output file will contain a header line that indicates that the first column of information is the time stamp (in Julian Day or elapsed time in days), and the list of cells at which time series values are output. The second and following lines contain the time stamp in the first column, following by values for each numerical station. Flow Rate Output Files. This section allows the user to specify output options for numerical stations where directional components of the flow rate are to be saved at equal time increments. A prefix for the file containing the numerical station output must be specified. The file extension ".m2o" is appended to the specified prefix. Entering a nonzero time increment, in seconds, provides the output timing. Note that this time increment should be an integer multiple of the hydrodynamic time step. Check the directional flow components that are to be output (x and/or ydirected flow rate). The ".m2o" output file will contain a header line that indicates that the first column of information is the time stamp (in Julian Day or elapsed time in days), and the list of cells at which time series values are output. The second and following lines contain the time stamp in the first column, following by values for each numerical station. The Tidal Constituents dialog (Figure 30) allows the user to select up to eight tidal constituents to apply as forcing in CMSM2D. The user must specify the local amplitude and phase of each tidal constituent. Amplitude and phase is held spatially constant along an entire cell string for each tidal constituent. Phase must be specified in the same time zone as other model inputs. Amplitude and phase values for the eight constituents can often be obtained from National Ocean Service harmonic analysis for local waterlevel gauges. Figure30. CMSM2D Model Control: Tidal Constituents dialog Run CMSM2DThe Run CMSM2D command makes sure the current simulation is saved to disk, and launches CMSM2D to run the present simulation. The SMS also performs a model check before launching the model. If any anomalies are detected, a warning is issued.
Steering ModuleCoupling of CMSM2D with STWAVE (or WABED) is conducted through the Steering Module. This feature controls interaction of the two models by alternating STWAVE and CMSM2D runs for a specified time called the Steering Interval, and provides mapped fields of variables to each model. The user controls the steering options by checking boxes in the Steering Module dialog for each type of interaction needed for the specific simulation (Figure 31). To invoke the Steering Module, CMSM2D and STWAVE (or WABED) grids must be loaded into SMS. All inputs and options for both models must be specified before launching the steering process. Users should consult the STWAVE User’s Manual (Smith et al. 1999, 2001) for information on setting up STWAVE in SMS. WABED can be set up with the same tools and conventions as STWAVE. The Steering Module dialog is opened from the Data dropdown menu (Figure 31). The steering interval is set by specifying the time requested by the "Run" inquiry. Interaction between the models is selected by clicking the available options in the CMSM2Dà STWAVE/WABED (meaning CMSM2D passes velocities and/or total depth to STWAVE or WABED) and STWAVE/WABEDàCMSM2D (meaning STWAVE or WABED passes wave information to CMSM2D) portions of the dialog. If sediment transport calculations are invoked, the Steering Module will always pass updated depths from CMSM2D to STWAVE or WABED so that modifications of the waves owing to morphology change will be taken into account. If the "Wave Conditions" box is checked in the CMSM2D Model Control dialog (Figure 25), the Steering Module will map fields of wave properties (height, period, wave direction, breaking index, and wave dissipation) to the CMSM2D grid for inclusion in hydrodynamic and sediment transport calculations. After the Steering Module setup is complete, clicking Start invokes the steering process. If the SMS detects that a previous steering run has been conducted for the present project, a Restart Options (Figure 32) dialog will pop up to allow the user to specify whether to continue the previous steering simulation or start at the beginning of the steering process. If the user chooses to restart from a previous steering simulation, the dialog allows options to select which model simulation and steering interval to start from. Once the steering process has been initiated, a progress screen will be shown. During steering, the SMS creates two output files that provide information on the steering process and on the model progress. The file "steeringstatus.txt" provides information on the steering options and status of the steering process. The file "screenoutput.txt" contains text that CMSM2D and STWAVE or WABED write to the screen. If the steering simulation is unsuccessful, the user is advised to examine these two files to help determine the source of the problem. Figure31. Steering Module dialog Figure32. Steering Module Restart Options dialog Saving a ProjectDuring development of a project within the SMS, numerous sets of information may be brought in and applied to grid development and simulation setup. It is common for a CMSM2D project to contain bathymetric data, Map Module information such as a grid frames and refine points, a CMSM2D grid and model setup, an STWAVE or WABED grid and model setup, and an ADCIRC (or other regional model) mesh and solution files from which CMSM2D boundary conditions have been extracted. In addition, the coordinate system in which the grids have been developed is contained with the SMS information. The SMS will save all of the information collectively as a project by using the Save Project option or Save As and then choosing the ".sms" option. When saved as a project, SMS will create a master project file with the ".sms" extension that saves all information related to the project. When a project file is loaded into SMS, all scatter data, map information, and models that were previously contained in the project will be loaded. The user may opt to save information specific to a particular module or model. For example, to save a CMSM2D model setup, the SMS will issue a Save M2D command from the File dropdown menu if a CMSM2D simulation is selected in the Data Tree. Model Setup and File StructureSetup of CMSM2D requires development of a computational grid and preparation of one or more input files. The SMS creates all model input files in the correct format so that editing or input file generation is generally not required. The exceptions to this are preparation of time series of wind speed and direction, water level, or flow rate files for input as forcing. These files can be created within the SMS, but often the user already possesses data from which these files are developed. This section describes the structure of files required to run the CMSM2D model and its output files to assist the user in understanding the file formats. All input and output files to CMSM2D are ASCII. Unless otherwise noted, files are free format. ===Input Files===</font> Required input files for CMSM2D are the grid file, control file, and one or more forcing files (boundary conditions, wind input, or radiationstress gradient input). A particular simulation may require additional input files that can include any combination of initial conditions, waterlevel time series, flow rate time series, tidal constituents, wind speed and direction, waves stress, wave properties, sediment transport options and parameters, specifications for nonerodible cells, and output specification. Structures of these input files are described here. Sample files are provided in Appendix A. Grid fileThe grid file for CMSM2D is structured such that all information pertaining to a cell is found on the same line as the cell identification number. This format is convenient for the user so that once a cell is located in the grid file, its properties are easily viewed. The grid file contains some information that is not used within CMSM2D, but is retained for user reference and postprocessing. The first line of the grid file is a header line that describes the columns of information that make up the grid. All lines after the first specify cell information. Cells are defined by their cell identification number and the cell numbers of adjacent cells, referred to by local direction (north, east, south, west). These directions are relative to the local (grid) coordinate system defined by the grid, which may or may not be aligned with global geographic coordinates. With respect to the local grid system, north refers to the positive y direction and east refers to the positive x direction. Each line describing a cell consists of the following information: Cell number, NC, EC, SC, WC, NB, EB, SB, WB, IACTV, DX, DY, H, N, ROW, COL, LAT, XDIST, YDIST Descriptions of parameters are given in Table 4 and details of the cell activity parameter (IACTV) are given in Table 5.
Cellcenter coordinates (xdist and ydist) can be given in any Cartesian coordinate system, such as State Plane or UTM. CMSM2D does not apply the cellcenter coordinates in calculations, but does export the values in global files of watersurface elevation and velocity. Because no specific coordinate system is required, the user can apply a coordinate system that is convenient for the particular application. A grid file is required for all CMSM2D projects. SMS saves CMSM2D grid files with the extension ".m2g." Model controlModel control specifications are defined in an input file called "m2d.m2c" or "projectname.m2c" where "projectname" is given to SMS by the user. SMS saves the control file as "m2d.m2c" and as "projectname.m2c." Each line of the control file contains the parameter or character string followed by a description. The description is informational and CMSM2D does not read it. File names for input and output are user specified for CMSM2D, with the exception of the alternating hotstart files, and are listed as input parameters in the control file. Names of files are limited to 50 characters and cannot contain spaces. There must be at least one space between the parameter or character string and the description. Information contained in the control file is listed in Table 6 in the required order. The format of the control file is the same for all model and project configurations. All parameters listed in Table 6 must be included in the control file. Two types of output files can be specified: timeseries of variables at specified cells, and global values of variables at specified times. To specify timeseries of variables, cell numbers are identified at locations to output information and a separate file is created to save each variable. Files denoted in Table 6 as "Cellspecification files" list cell identification numbers at which time series information is stored. Each line of a cellspecification file contains one cell identification number. Files denoted in Table 6 as "Timespecification files" are for global velocity and elevation output, and contain a list of times to save data. Times are specified as elapsed hours since the beginning of the simulation. Each line in the file contains one value of time and times must be in sequential order. The interval between successive outputs can vary through the simulation. For example, a time specification file may have output times prescribed as 0, 1, 2, 2.5, 3, 3.5, 4, 4.25, and 5 hr.
Initial conditionsAn initialconditions file provides information at the beginning of the simulation at all cells. Each line in the initialconditions file contains 15 values. The first ten are cell number, ambient depth, watersurface elevation, u and vcomponents of velocity, suspended sediment concentration, at interior cells (boundary cells have value of 0.0), at boundary cells (interior cells have value of 0.0), u’, and v’. Depth and water level are given in m, velocity components are given in m/s, values are given in m/s, and concentration is given in m^{3}/m^{3}. The 11^{th} through 14^{th} values are the cell boundary type indices (Table 4), and the 15^{th} column is the cell activity parameter (IACTV). CMSM2D writes hotstart files in the correct format for reading as initial conditions. If a timespecific hot start is specified within the SMS model control, the hotstart file name will have the extension ".m2i." If the automatic recurring hotstart capability within CMSM2D is invoked, the hotstart files will be named "HOTSTART1.M2I" and "HOTSTART2.M2I." Automatic hotstarts are invoked by setting the hotstart time interval to a value, in hours, greater than zero. Waterlevel forcing data filesTimeseries boundary forcing for CMSM2D can be specified as watersurface elevation. Two types of files containing watersurface elevation forcing information can be applied. One type contains individual time series and the other type contains multiple time series. Both individual and multiple time series forcing can be applied in the same simulation. This capability is convenient for situations in which the time increment is not equal between different sets of time series. This capability also provides flexibility for defining multiple waterlevel forcing cell strings within the SMS and specifying forcing from various sources. For example, a simulation may require that one or more cell strings are forced by data from a waterlevel gauge and use the individual forcing file, and also that one or more cell strings are forced by water levels calculated by a regional model or tidalconstituent database and saved in a multiple timeseries file. CMSM2D recognizes whether time series of water level are specified as forcing by identification of forcing cells in the grid file. If time series waterlevel driving cells are found, CMSM2D opens the HDRIVER and/or MHDRIVER files (see Table 6). The first line of the HDRIVER or MHDRIVER file contains two integer values. The first value specifies the number of files containing watersurface elevation forcing time series. The second value is the total number of cells forced by watersurface elevation values for HDRIVER files, and is the maximum number of cells forced by watersurface elevation for MHDRIVER.DAT files. More than one multiple time series file can be applied in a simulation. The maximum number of cells forced by watersurface elevation is the greatest number of cells forced for all files listed in the MHDRIVER.DAT file. The second line contains the name of a data file that contains the forcing data. The third line of the HDRIVER or MHDRIVER.DAT file contains the number of cells that are driven by the data contained in the file listed in the second line, and an interpolation parameter. The interpolation parameter specifies whether or not the forcing data are interpolated between model time steps. For example, waterlevel forcing data may be available every hour, but the model time step might be 30 s. If the interpolation parameter is set to 1, values of water level at the forcing boundaries are interpolated at each model time step. If the interpolation parameter is set to 0, no interpolation takes place. Following the first and second lines a list of cell numbers that are forced by the time series data given in the forcing data file. For the individual time series forcing files, all cells in the list are forced by the same single time series. Cells forced by water levels contained in the multiple time series file must be listed in the MHDRIVER.DAT file in the order that their corresponding time series appear in the forcing data file. If more than one forcing data file is applied for water level or discharge, information is specified exactly as previously described for all sets of forcing data and placed in the HDRIVER or MHDRIVER file below the information for the first file. If boundary input is specified as individual time series of watersurface elevation in a CMSM2D project, the SMS saves the HDRIVER file name as "hdriver_projectname.dat." If boundary input is specified as multiple timeseries of watersurface elevation in a CMSM2D project, the SMS saves the MHDRIVER file name as "mhdriver_projectname.dat." Files containing individual time series waterlevel forcing data (listed in HDRIVER.DAT) are specified to have two values on each line. The first value is the time stamp. The time is specified in hours since the beginning of the simulation. So, at t = 0, the time stamp would be 0.0 and at t = 1 day, the time stamp would be 24.0. The second value is watersurface elevation (m) relative to the same datum as the grid for waterlevel forcing data, or flow rate (m^{3}/s) for discharge data. Time stamps must start at 0.0 and end at or after the ending time of the simulation. Files containing multiple timeseries waterlevel forcing data (listed in MHDRIVER.DAT) must have on each line a time stamp followed by a waterlevel value for each of the cells listed that correspond to the particular forcing file. Thus, if J cells are to be forced with a particular multiple time series file, then J+1 columns must be present in the forcing file. Columns of waterlevel values must be listed in the same order as the cell numbers are listed in the MHDRIVER.DAT file. The time is specified in hours since the beginning of the simulation. So, at t = 0, the time stamp would be 0.0 and at t = 1 day, the time stamp would be 24.0. Watersurface elevation (m) is provided relative to the same datum as the grid for waterlevel forcing data. Time stamps must start at 0.0 and end at or after the ending time of the simulation. The SMS contains dialogs in which time series of watersurface elevation and flow rate can be prescribed for CMSM2D. If these dialogs are accessed to create the time series files, they will be saved with the extension ".wl." Velocity forcing data filesForcing by velocity information can be applied in conjunction with the multiple time series waterlevel forcing. The velocity format is also a multiple time series. Velocity time series cannot be specified without waterlevel forcing at the same cells. CMSM2D recognizes whether time series of combined waterlevel and velocity values are applied as forcing by identification of forcing cells in the grid file. If time series combined waterlevel and velocity driving cells are found, CMSM2D opens the MHDRIVER and MVDRIVER files (see Table 6). The file format for the MVDRIVER file is identical to that of the MHDRIVER file described in the previous section of this chapter. SMS saves the MVDRIVER file as "mvdriver_projectname.dat." Files containing multiple time series velocity forcing data (listed in MVDRIVER.DAT) must have on each line a time stamp followed by four velocity values for each of the cells listed that correspond to the particular forcing file. Velocities written for each cell are those on the cell faces and are written in the following order: u_{left}, u_{right}, v_{bottom}, v_{top} where the subscripts left, right, bottom, and top denote the cell faces in the grid coordinate system. Thus, if J cells are to be forced with a particular multiple time series file, then 4*J+1 columns must be present in the forcing file. Columns of sets of velocity values must be listed in the same order as the cell numbers are listed in the MVDRIVER.DAT file. The time is specified in hours since the beginning of the simulation. So, at t = 0, the time stamp would be 0.0 and at t = 1 day, the time stamp would be 24.0. Time stamps must start at 0.0 and end at or after the ending time of the simulation. The SMS contains a dialog in which time series of combined watersurface elevation and velocity can be prescribed for CMSM2D in which the boundary values are obtained from the solution of a largerdomain model. The SMS automatically maps the solution to the CMSM2D cells. Flow rate forcing data filesFlow rate is forced by files containing individual time series information. CMSM2D recognizes whether time series flow rate values are applied as forcing by identification of forcing cells in the grid file. If time series flow rate driving cells are found, CMSM2D opens the QDRIVER file (see Table 6). The first line of the QDRIVER file contains two integer values. The first value specifies the number of files containing flow rate forcing time series. The second number is the total number of cells forced by flow rate. The second line contains the name of a data file that contains the forcing data. The third line of the QDRIVER file contains the number of cells that are driven by the data contained in the file listed in the second line, and an interpolation parameter. The interpolation parameter specifies whether or not the forcing data are interpolated between model time steps. For example, flow rate forcing data may be available every hour, but the model time step might be 30 s. If the interpolation parameter is set to 1, values of flow rate at the forcing boundaries are interpolated at each model time step. If the interpolation parameter is set to 0, no interpolation takes place. Following the first and second lines of the QDRIVER file is a list of cell numbers that are forced by the time series data given in the forcing data file. If more than one forcing data file is applied for flow rate, information is specified exactly as previously described for all sets of forcing data and placed in the QDRIVER file below the information for the first file. If time series of watersurface elevation is specified in a CMSM2D project, the SMS saves the QDRIVER file name as "qdriver_projectname.dat." Files containing flow rate forcing data are specified to have two values on each line. The first value is the time stamp. The time is specified in hours since the beginning of the simulation. So, at t = 0, the time stamp would be 0.0 and at t = 1 day, the time stamp would be 24.0. Time stamps must start at 0.0 and end at or after the ending time of the simulation. The second value is flow rate given in m^{3}/s. This flow rate is specified at every cell designated as forced by the input series in the QDRIVER file. Thus, if three cells were specified as flow rate forcing cells and the value of the flow rate was 9 m^{3}/s, then each of the three cells would have 9 m^{3}/s flowing through it. The flow rate is not distributed among the three cells. The SMS contains a dialog in which time series of flow rate can be prescribed for CMSM2D. If this dialog is accessed to create the time series files, they will be saved with the extension ".q." Wind speed and directionWind speed and direction are given in the userspecified wind file listed in the model control file (*.m2c). The windforcing file contains three values on each line. The first value is the time stamp in hours since the beginning of the simulation. The second value is the wind speed in m/s and the third value is direction in deg. The convention for the input wind direction is 0 deg indicates wind blowing from the north, and 90 deg indicates wind blowing from the east. Wind speed must be positive. Conversion to the winddirection convention given for Equations 2 and 3 is conducted internally within CMSM2D. The SMS contains a dialog in which time series of wind speed and direction can be prescribed for CMSM2D. If this dialog is accessed to create the time series file, it will be saved with the extension ".m2w." Tidal constituentsThe tidalconstituent forcing file contains nine lines. The first line is a header that can identify the source of the tidalconstituent information. The header line is ignored by CMSM2D. Each of the remaining lines contain the local amplitude (m) and phase (deg) of the water level for a specific tidal constituent. The constituents specified on lines 2 through 9 are (in order of appearance): M_{2}, N_{2}, S_{2}, K_{2}, K_{1}, O_{1}, M_{4}, and M_{6}. If specific constituents are not to be specified as forcing, then their amplitude values must be set to zero. Wave stressesWave stresses are given in the userspecified radiationstress file listed in the model control file. The radiationstress file consists of sets of wave stresses prescribed at specific times. The first line in the file contains the text "TIME:" and is followed by the time in hours since the beginning of the simulation. Lines 2 through NCELLS + 1 contain three values. The first value is the cell identification number and the second and third values are the x and y components of the wave stress, respectively. Wave stresses must be given in order of ascending cell identification numbers. Sets of information that include the time step and wave stresses for each cell are included in the file for each time step for which wave stresses are available. Because CMSM2D will conduct its calculations at a different time interval than the wave stress time interval, the stresses are linearly interpolated within CMSM2D over time. If the last time stamp in the wave stress file specifies a time before the end of the CMSM2D simulation, CMSM2D will apply values of zero for the radiation stresses after the time of the last available wave information (no interpolation to zero is conducted). If the Steering Module is invoked to couple CMSM2D with STWAVE (or WABED), SMS will write files containing wave stresses that have been mapped from those calculated by the wave model. SMS gives the extension ".rad" to the wave stress file. The same file extension is also given to radiation stress files for STWAVE. CMSM2D files can be distinguished from the STWAVE files by the prefix. CMSM2D wave stress files contain the text "m2steer" and the STWAVE files contain "swsteer." Wave properties fileThe wave properties file contains a list of five file names with each line containing one file name. The files must be listed in the order of wave height, wave period, wave direction, wave breaking index, and wave dissipation. Each of the files listed contains fields of the specified wave property. If SMS generates the wave properties file, it specifies an extension of ".mwv." Wave height, period, direction, breaking index, and dissipation are provided as time series of fields in unique files (one wave property per file). Each file consists of sets of the wave property prescribed at specific times. The first line in the file contains the text "TIME:" and is followed by the time in hours since the beginning of the simulation. Lines 2 through NCELLS + 1 contain two values. The first value is the cell identification number, and the second value is the wave property. Values of wave properties must be given in order of ascending cell identification numbers. Sets of information that include the time step and wave properties for each cell are included in the file for each time step that wave properties are available. Because CMSM2D will conduct its calculations at a different time interval than the wave property time interval, the property is linearly interpolated within CMSM2D over time. Sediment transport and morphology change specifications fileThe file providing the sediment transport and morphology change specifications contains information on timing control for transport and morphology change calculations, specification of the transport formulation to apply, general parameter settings, and parameter settings specific to the selected transport formulation. Because each transport formulation requires a unique set of inputs, the format for this file varies depending on the chosen formulation. This file is required to have the name "sedparams.dat." If the Watanabe sediment transport formulation is specified, the sedparams.dat file will contain ten lines, each having a single value. The first line will have an integer value of 1, which is an index that informs CMSM2D to apply the Watanabe transport formula. The second and third lines contain the sediment transport rate time step (sec) and the morphology change time step (hr), respectively. The fourth, fifth, and sixth lines contain the median grain size (mm), sediment density (kg/m^{3}), and the water density (kg/m^{3}), respectively. The seventh line contains the transport rate slope coefficient D_{s} (unitless) of Equations 112 and 113. Line 8 contains the critical threshold for sediment movement transport. Lines 9 and 10 contain the transport rate coefficient A_{0} of Equations 112 and 113, and sediment porosity p, respectively. If the LundCIRP sediment transport formulation is specified, the sedparams.dat file will contain 12 lines, each having a single value. The first line will have an integer value of 2, which is an index informing CMSM2D that the LundCIRP transport formula is to be applied. The second and third lines contain the sediment transport rate time step (sec) and the morphology change time step (hr), respectively. The fourth, fifth, and sixth lines contain the median grain size (mm), sediment density (kg/m^{3}), and water density (kg/m^{3}), respectively. Line 7 contains the water temperature (deg C). Line 8 contains the transport rate slope coefficient D_{s} (unitless) of Equations 112 and 113. Line 9 contains the flag denoting whether or not ripples are included in the calculations; a value of 0 indicates that ripples are not included, and a value of 1 indicates that ripples will be included. Line 10 contains the sediment porosity. Lines 11 and 12 contain the scaling factors for the bed load and suspended load, respectively. If the AD equation is selected as the sediment transport formulation, the sedparams.dat file will contain 13 lines, each having a single value. The first line will have an integer value of 3, which is an index informing CMSM2D that the AD equation is to be applied to compute the sediment transport rate. The second and third lines contain the sediment transport rate time step (sec) (time step at which the AD equation is solved) and the morphology change time step (hr), respectively. Lines 4 through 7 contain the median particle diameter (mm), sediment density (kg/m^{3}), water density (kg/m^{3}), and water temperature (deg C), respectively. Line 8 contains the slope coefficient for Equations 115 and 116. Line 9 contains the flag denoting whether or not ripples are included in the calculations; a value of 0 indicates that ripples are not included, and a value of 1 indicates that ripples will be included. Line 10 contains the sediment porosity. Line 11 contains an index that specifies the type of suspended concentration profile in which a value of 1 denotes an exponential profile with the depthaveraged mixing coefficient of Van Rijn, a value of 2 denotes a Van Rijn profile with Van Rijn’s mixing coefficient, and 3 denotes an exponential profile from the LundCIRP formulation. Lines 12 and 13 contain the scaling factors for the bed load and suspended load, respectively. Nonerodible cell specifications fileThe nonerodible cell specifications file contains the number of nonerodible cells in the computational grid, followed by a listing of the hardbottom cell identification number and depth of hard substrate. One cell identification number and its corresponding hard substrate depth are listed on each line. If hardbottom cells do not exist on the grid, the file will contain a value of zero for the number of nonerodible cells. This file is required to have the name "noerode.dat." Selected cell output specification fileUserspecified observation cells can be selected for time series output of variables or terms in the governing equations. A listing of these cells is provided in a cell output specification file. The file contains a list of cell identification numbers with one number per line. If observation cells are selected within the SMS and saved as part of a CMSM2D project, the SMS gives the cell listing file the extension of ".ts."
Global output time specification filesGlobal watersurface elevation, velocity, depth, and sediment transport rates are written to files at times specified in the global output timespecification files. These files consist of a list of times, in hours since the beginning of the simulation, at which global output is to be written. Each line in these files consists of one time value. Separate global output timespecification files are required for watersurface elevation and velocity, providing the option to save only one global file. Times listed in the global output timespecification files can be at constant or varying time intervals. Requirements for the times listed in the file are that they are sequential, start at values of zero or greater, and values are not repeated. If global output times are specified within the SMS, a series of equalincrement output times can be generated. In addition, individual times can also be specified. If scalar and vector global files are to be written, the output times from one of these variables can be written to the other so that the global output will take place at the same times. SMS writes the global output timespecification files with an extension of ".m2t." Output FilesTwo types of output files can be specified for CMSM2D. These file types are time series of a variable at station locations and global variable files. Descriptions of these file types are given here. For both types of output files, each variable is reported from its computational location in the model. Thus, watersurface elevation is reported from the cell center, the xcomponent of velocity is reported from the left cell face center, and the ycomponent of velocity is reported from the bottom cell face center.
Time series at station locationsTime series output files for specific station locations contain a header line followed by the calculated time series values. The header specifies the cell numbers (where output is taken) above columns of output. Cell numbers in the header are written as "C#" where # denotes the cell number. The "C" is placed in the header to distinguish the cell number from data in plotting packages (software will read the information in as a character string). Lines following the header contain a time stamp (fractional days) and values of the variable. Watersurface elevation and the two components of velocity are each written to separate files for a total of three possible station output files. The user can specify any combination of time series station output files to be written. Global output filesGlobal files can be created for watersurface elevation, velocity, sediment transport rate, and depth. File formats consist of sets of global variable values output at times specified by the user. Each set of information in the file contains a line with the time stamp, followed by lines containing the x,y position of each cell followed by the value of the variable(s) being output, i.e., watersurface elevation, depth, velocity components, or transport rate components. If transport rates are output, the instantaneous total load values are saved to the file specified by the user, and the averaged transport rates are saved to a file having "AVG" appended to the file name prefix. If the transport formulation applied by CMSM2D computes suspended load and bed load separately, then two additional transport rate files will be saved, one containing the suspended load transport rate and the other containing the bed load transport rate. These two files have the letters "BED" and "SUS" appended to the file name prefix to indicate whether they contain the bed load or suspended load, respectively. Global information is saved for each cell in the grid and written in ascending order of cell identification number. File extensions of .m2s are assigned to scalar fields and .m2v to vector fields. Units for time series and global files are standard metric. Watersurface elevation and depth are given in m, velocity is given in m/s, and sediment transport rates are given in m^{3}/s/m. Time stamps are given in hours since the beginning of the simulation.
Example ApplicationsIn this chapter, applications are described for an idealized channel and two coastal inlets in the United States to demonstrate the performance and capabilities of CMSM2D. The idealized channel example demonstrates calculation of channel infilling. The example for Ocean City Inlet, MD, demonstrates combined circulation, wave, and sediment transport modeling for a storm condition. The example for Sebastian Inlet, FL, demonstrates functioning of the hardbottom capability under tide and wave forcing.
Channel Infilling ExampleSimulations of 1D channel infilling were conducted to compare results of the total load (TL) sediment transport formulation and the AD formulation. The channel infilling process is a clear example demonstrating effectiveness of the AD formulation. To simulate channel infilling, representation of advection and diffusion of suspended sediment load is necessary because suspended sand having high concentration outside the channel can be transported by the current and settle to areas of weak current, such as the bottom of a channel or bay. Irie et al. (1985) reported that morphology change of this kind is difficult to reproduce by total load models that calculate the sediment transport rate depending only on the local shear stress and do not include the AD process. A simple channel infilling test was conducted under the situation shown in Figure 33. Water depth outside the channel is 5 m and that inside the channel is 10 m. In this situation, a current of 0.9 m/s (directed from left to right in the figure) was generated by specifying a watersurface elevation of 0.05 m at the left boundary cells and that of 0.05 m at the right boundary cells. Sediment grain size was specified to be 0.2 mm, and sediment density was set to 2,650 kg/m^{3}. Figure 34 shows the spatial distributions of each variable calculated by the AD formulation with the LundCIRP formula, together with the depth profile. From top to bottom, water elevation, current velocity, depthaveraged concentration, and initial bed profile are plotted. Because of the AD process, sediment concentration is asymmetrically distributed about the center of the channel, even though water elevation and current velocity are almost symmetric. Figure33. Configuration for channel infilling tests
Results of the channel infilling simulation are shown in Figure 35 (AD) and Figure 36 (TL). The AD formulation reproduces general channel deformation processes such as bank encroachment and infilling. On the other hand, the TLmodel is inadequate, being capable of producing only channel bank encroachment and channel migration, but not channel infilling. Bank encroachment arises primarily from bed load transport and channel infilling primarily from suspended load transport. Thus, accurate calculation of suspended load as through an AD formulation is essential for simulating the channel infilling process. Figure35. Channel profile change by AD formulation, grain size = 0.2 mm Figure36. Channel profile change by TL formulation, grain size = 0.2 mm Figure 37 compares the channel shapes after 10 days of simulation time. Because the both simulations apply the same transport rate formula (LundCIRP formula), the total amount of sediment transported into the channel is almost identical, but the resultant channel shape is different. The reason for the difference is that the AD formulation calculates the advection and diffusion of suspended sediment, which the TL formulation neglects. Figure37. Channel shape comparison between AD and TL formulations, grain size = 0.2 mm, 10day simulation time Figures 38 and 39 show the results of channel deformation for sediment grain size of 0.4 mm. In this situation, bed load transport becomes dominant as compared to the case of 0.2mm sand grains, and the calculated channel shape is almost identical between AD and TL formulations. In summary, if suspended load is dominant, the AD formulation can more accurately describe channel infilling, whereas if bed load is dominant, a TL formulation might be more accurate and is more efficient in terms of the allowable morphology time step. Also, from the point of view of computational costs, a TL formulation is more efficient than the AD. In the CMSM2D system, therefore, users can select a sediment transport formulation depending on the situation. In particular, in preliminary runs, a TL formula might be selected, with the final production runs switching to an AD formulation. Figure38. Channel profile change by AD formulation, grain size = 0.4 mm Figure39. Channel profile change by TL formulation, grain size = 0.4 mm Ocean City Inlet, MDOcean City Inlet is a dualjettied Federal inlet located on the coast of the Delmarva Peninsula. In August 1933, the inlet was opened as a breach in Fenwick (barrier) Island, and jetties were soon constructed to stabilize the entrance. Dean and Perlin (1977) discuss coastal and inlet processes at the site. For the present example, a December 1992 northeaster was selected to simulate hydrodynamic and sediment transport processes during a severe storm. The example of Ocean City Inlet is provided to demonstrate the following capabilities of the CMS: Model Steering: coupling between CMSM2D and STWAVE CMSM2D forcing: extraction of boundary conditions from a regional model Sediment transport: application of the AD transport equation. CMSM2D and STWAVE grids were developed for the Ocean City Inlet system so that interaction between tidal, wave, and morphology change processes could be calculated. The CMSM2D computational domain with bathymetry and grid is shown in Figure 40. The corresponding STWAVE domain (Figure 41) is slightly larger than the CMSM2D domain in the Atlantic Ocean, but is truncated in the bay. The STWAVE grid configuration in the Atlantic Ocean portion area is slightly larger than the CMSM2D grid to avoid extrapolation of wave properties and radiation stresses over and near the CMSM2D boundary. Within the bay area, the CMSM2D grid is larger than the STWAVE grid because significant wave energy is not expected to propagate from the bay side of the inlet toward the north or south. Figure40. Bathymetry and CMSM2D computational grid for Ocean City Inlet Figure41. Bathymetry and STWAVE computational grid for Ocean City Inlet The CMSM2D grid contains 14,886 ocean cells that have dimensions ranging from 26.5 to 127.8 m. Greatest detail is specified in the inlet and nearshore area, including the ebb shoal. The STWAVE grid contains 81,102 computational cells having dimensions of 44.9 m on each side. For simulation of the December 1992 northeaster, a regional ADCIRC solution was available that could be applied as CMSM2D boundary forcing. Simulation of the storm started on 8 December 1992 and ran for 8 days. The ADCIRC domain (Figure 42) is large enough to represent the storm surge propagation. Therefore, by applying the ADCIRC solution to force CMSM2D at its ocean and bay boundaries, temporal and spatial variations in the sea surface owing to the combined wind, atmospheric pressure, and tidal forcing were preserved. An example of the spatial distribution in watersurface elevation is shown in Figure 43, during the peak surge along the Maryland coast. Figure42. Regional ADCIRC mesh and bathymetry for Maryland coast Figure43. Calculated peak watersurface elevation along Maryland coast for December 1992 storm The 8day CMSM2D simulation was forced with watersurface elevation values along the ocean boundary and bay boundaries extracted from the regional ADCIRC solution for the December 1992 storm. A ramp duration of 0.5 day was specified. Wave properties at 1hr intervals were obtained from measurements and applied as input to STWAVE. The steering interval was specified to be 1 hr. Sediment transport was computed by the AD equation with the LundCIRP profile option. The advectiondiffusion equation was solved every 10 s and the morphologic time step was 0.25 hr. An example of the current field during strong storm forcing is shown in Figure 44, when the surge level was 1.06 m, offshore wave conditions were height of 4.8 m, period of 14 s, and direction of 62 deg south of east. The velocity field shows a strong current generated along the outer edge of the ebb shoal from wave shoaling and breaking. A welldeveloped longshore current is directed toward the north. Figure44. Calculated velocity field at Ocean City Inlet during 4.8 m wave condition, December 1992 storm A time series of current fields at 10hr intervals is shown in Figure 45. The starting image at hour 60 corresponds to 10 December 1992 at noon. In this series of plots, changes in strength, pattern, and direction of the currents are responses to the temporal and spatial properties of the waves and to a lesser extent, the storm surge. Initially, waves propagate from the south east and drive a northdirected longshore current (through hour 90). As the wave direction rotates over the duration of the storm, the northdirected longshore current becomes weaker (hours 90–110) then turns toward the south for the remainder of the storm. Over the duration of the storm, waves reaching the ebb shoal drive currents toward the north on the northern outer portion of the shoal and toward the south and shoreward on the southern outer portion of the shoal.
An example sedparams.dat file for the LundCIRP total load formulation option is provided in Figure A12. The first line contains a value of 2, which informs CMSM2D that the LundCIRP total load formulation is to be applied. The remaining lines contain the input options and parameters required by the LundCIRP formulation and morphology change calculations.
An example sedparams.dat file for the AD equation option is provided in Figure A13. The first line contains a value of 3, which informs CMSM2D that the AD equation is to be applied. The remaining lines contain the input options and parameters required by the AD equation and morphology change calculations. In this example, a value of 3 for the suspended concentration profile denotes that the LundCIRP formulation will be applied. A value of 1 for the suspended concentration profile denotes that the exponential model will be applied and a value of 2 denotes that the van Rijn model will be applied. Figure A13. Example sedparams.dat input file for AD equation
Figure A14. Example time series numerical station output file
Figure A15. Example global elevation output file Figure A16. Example global velocity output file
Appendix B 
This appendix contains a listing of publications known to the authors to date that document M2D and its applications. Citations are listed in reverse chronological order.
Buttolph, A. M., Reed, C. W., Kraus, N. C., Ono, N., Larson, M., Camenen, B., Hanson, H., Wamsley, T., and Zundel, A. K. (2006). "Twodimensional depthaveraged circulation model CMSM2D: Version 3.0, Report 2: Sediment Transport and Morphology Change," ERDC/CHL TR06__, U.S. Army Engineer Research and Development Center, Vicksburg, MS (this volume).
Lin, L., Mase, H., Yamada, F., and Demirbilek, Z. (2006). "WaveAction Balance Equation Diffraction (WABED) Model; Part 1: Tests of wave diffraction and reflection at inlets," Coastal Inlet Research Program Technical Note ERDC/CHL CHETNIII73, U.S. Army Engineer Research and Development Center, Vicksburg, MS.
Offshore & Coastal Technologies, Inc. (2005). "An assessment of jetty shortening alternatives for Goldsmith Inlet, bay and adjacent shorelines," Project report for Town of Southold, NY, 66 pp.
Offshore & Coastal Technologies, Inc. (2005). "Ocean City hot spot study: Reassessment of design criteria and approaches," Engineering Appendix for U.S. Army Engineer District, Baltimore, General Reevaluation Report, 109 pp.
Reed, C. W., and Militello, A. (2005). "Waveadjusted boundary condition for longshore current in finitevolume circulation models," Ocean Engineering 32, 21212134
Hanson, H., and Militello, A. (2005). "Representation of nonerodible (hard) bottom in twodimensional morphology change models," Coastal and Hydraulics Engineering Technical Note ERDC/CHL CHETNIV63, U.S. Army Engineer Research and Development Center, Vicksburg, MS.
Bounaiuto, F., and Militello, A. (2004). "Coupled circulation, wave, and sediment transport modeling for calculation of morphology change, Shinnecock Inlet, New York," Proceedings 8^{th} 'International Estuarine and Coastal Modeling Conference, ASCE, 819838.
Lin, L., Kraus, N. C, and Barcak, R. G. (2004). "Modeling sediment transport at the Mouth of the Colorado River, Texas," Proceedings 8^{th} 'International Estuarine and Coastal Modeling Conference, ASCE, 9881006.
Militello, A., Reed, C. W., Zundel, A. K., and Kraus, N. C. (2004). "Twodimensional depthaveraged circulation model M2D: Version 2.0, Report 1: Documentation and user’s guide," ERDC/CHL TR0402, U.S. Army Engineer Research and Development Center, Vicksburg, MS.
Militello, A., and Zundel, A. K. (2003) "SMS Steering Module for coupling waves and currents, 2. M2D and STWAVE," Coastal and Hydraulic Engineering Technical Note ERDC/CHL CHETNIV60, U.S. Army Engineer Research and Development Center, Vicksburg, MS.
Militello, A., and Kraus, N. C. (2003). "Numerical simulation of sediment pathways at an idealized inlet and ebb shoal," Coastal Sediments 2003, CD ROM: Numerical simulation of sediment pathways at an id.pdf.
Militello, A., Parry, R. M., and Arden, H. T. (2003). "Numerical simulation of navigation channel infilling, Bay Center, Washington," Proceedings Dredging 2002 Conference, ASCE, CD ROM 40680034003, ISBN 0784406804.
Militello, A., and Zundel, A. K. (2002). "Coupling of regional and local circulation models ADCIRC and M2D," Coastal and Hydraulics Engineering Technical Note ERDC/CHL CHETNIV42, U.S. Army Engineer Research and Development Center, Vicksburg, MS.
Militello, A., and Zundel, A. K. (2002). "Automated coupling of regional and local circulation models through boundary condition specification," Proceedings 5^{th} 'International Conference on Hydroinformatics, International Association of Hydraulic Research, IWA Publishing, London, 156161.
Militello, A. (2002). "Willapa entrance and Bay Center modeling," in "Study of navigation channel feasibility, Willapa Bay, Report 2," N. C. Kraus, H. T. Arden, and D. P. Simpson, eds. Technical Report ERDCCHLTR006, U.S. Army Engineer Research and Development Center, Vicksburg, MS.
Militello, A., and Kraus, N. C. (2001). "Generation of harmonics by sea breeze in nontidal water bodies," Journal of Physical Oceanography 31(6), 1,6391,647.
Militello, A. (2000). "Hydrodynamic modeling of a seabreeze dominated shallow embayment, Baffin Bay, Texas," Proceedings 6^{th} 'International Estuarine and Coastal Modeling Conference, ASCE, 795810.
Kraus, N. C., and Militello, A. (1999). "Hydraulic study of multiple inlet system: East Matagorda Bay, Texas," Journal of Hydraulic Engineering 125(3), 224232.
Militello, A., and Kraus, N. C. (1998). "Numerical simulation of hydrodynamics for proposed inlet, East Matagorda Bay, Texas," Proceedings 5^{th} 'International Estuarine and Coastal Modeling Conference, ASCE, 805818.
Militello, A. (1998). Hydrodynamics of winddominated, shallow embayments. Ph.D. dissertation, Division of Marine and Enviromental Systems, Florida Institute of Technology, Melbourne, FL.
Brown, C. A., and Militello, A. (1997). "Packery Channel feasibility study: Circulation and water level; Report 2 of a twopart series," TAMUCCCBI9607, Conrad Blucher Institute for Surveying and Science, Texas A&M UniversityCorpus Christi, Corpus Christi, TX.
Kraus, N. C., and Militello, A. (1996). "Hydraulic feasibility of the proposed Southwest Cut, East Matagorda Bay, Texas," TAMUCCCBI9603, Conrad Blucher Institute for Surveying and Science, Texas A&M UniversityCorpus Christi, Corpus Christi, TX.
Militello, A., and Kraus, N. C. (1995). "Investigation of the current and sediment movement in the Lower Laguna Madre, Texas, and implications for dredging in the Gulf Intracoastal Waterway," Proceedings Western Dredging Association 16^{th} 'Technical Conference, Center for Dredging Studies, Texas A&M University, College Station, TX, 143162.
Brown, C. A., Kraus, N. C., and Militello A. (1995). "Hydrodynamic modeling for assessing engineering alternatives for elevating the Kennedy Causeway, Corpus Christi, Texas," Proceedings 4^{th} 'International Estuarine and Coastal Modeling Conference, ASCE, 681694.
Brown, C. A., Militello, A., and Kraus, N. C. (1995). "Hydrodynamic assessment for elevation of the JFK Causeway, Corpus Christi, Texas," Proceedings Texas Water ’95, Texas Section of the American Society of Civil Engineers, ASCE Press, NY, 3141.
Brown, C. A., Militello, A., and Kraus, N. C. (1995). "Hydrodynamic assessment for elevation of the JFK Causeway, Corpus Christi, Texas," TAMUCCCBI9507, Conrad Blucher Institute for Surveying and Science, Texas A&M UniveristyCorpus Christi, Corpus Christi, TX.
Militello, A., and Kraus, N. C. (1995). "Numerical simulation of the circulation in the Lower Laguna Madre, Texas, and implications for dredging of the Gulf Intracoastal Waterway," Estuarine Research Federation 13^{th} 'Biennial International Conference, Abstracts, 88.
Militello, A., and Kraus, N. C. (1994). "Reconnaissance investigation of the current and sediment movement in the Lower Laguna Madre between Port Isabel and Port Mansfield, Texas," TAMUCCCBI9404, Conrad Blucher Institute for Surveying and Science, Texas A&M UniversityCorpus Christi, Corpus Christi, TX.
Appendix C
Slosh Tests
This appendix describes the performance of CMSM2D for slosh tests. This set of numerical integrity tests evaluates mass conservation and numerical damping properties of the model. Approximations to the full equations of motion truncate terms to some order in a manner that depends on the numerical solution method. Truncation of terms is known to introduce numerical viscosity (Roache 1976),^{[1]} which is manifested as damping of a signal. The slosh test provides a means of examining the damping properties of numerical computation methods. In a slosh test, the initial condition of a tilted water surface is imposed, and the basin is allowed to freely propagate the resulting wave through reflection at both ends. External forcing and bottom frictional stress are set to zero so that there is no masking of the freesurface oscillations. Timeseries of water elevation over the duration of the simulation exhibit model damping properties. Tests described here were patterned after those by Cialone (1989).
The slosh test was performed to examine damping properties and mass conservation for two grid configurations. Both grid configurations were rectangular, with the grid being longer parallel to the xaxis than parallel to the yaxis. A test consisted of applying a tilted water surface as the initial condition, where the direction of tilt was parallel to the xaxis. The initial deviation from stillwater depth was symmetric about the channel center and increased or decreased sinusoidally along the main channel axis (Figure C1).
No variation in water level was specified across the width (parallel to the yaxis) of the channel. Initial current velocity was set to zero, and no boundary forcing, bottom friction, or wind stress was applied. The Coriolis term and lateral mixing were set to zero. Simulation duration was set to 30 days (720 hr) and the time step was set to 5 s. General grid configurations and inclusion of advective terms are given in Table C1. Conducting identical tests with and without inclusion of the advective terms allows isolation of their contribution to damping and mass conservation.
Figure C1. Slosh test initial condition
Table C Slosh Test Configurations  
Test  Bottom  Advection 
1  Flat  No 
2  Flat  Yes 
3  Sloped  No 
4  Sloped  Yes 
Mass conservation was calculated as percent change in water volume over the numerical grid between time t = 0 and the end of the simulation period. Percent change in water volumewas calculated as:
(C1) 
where is the final volume,is the initial volume, the subscript i indicates cell number, and n is the total number of cells in the grid.
Tests 1 and 2 were conducted to evaluate damping and mass conservation of the model for a flatbottomed, constantspaced grid, with and without the advective terms included in the calculations, respectively. Grid configurations and numerical parameters for Tests 1 and 2 are given in Table C2, and the grid is shown in Figure C2. Tests 1 and 2 resulted in 5 ´ 10^{6} and 1 ´ 10^{5} percent changes in volume, respectively.
Table C2 Slosh Test Grid Configurations and Numerical Parameters for Tests 1 and 2  
Numerical Parameter  Value  
D'''s''', m  500  
D'''t''', s  5  
h, 'm'  10  
Length, m  10,000  
Width, m  2,500 
Figure C2. Computational grid for Tests 1 and 2
Damping properties for Tests 1 and 2 are shown by time series of water level in Figures C3 and C4, respectively. Water levels shown for each plot were taken 0.5 Dx from the boundary and centered with respect to channel width. Time series shown for all other tests are also taken at the same cell. Axis breaks (x‑axis) were inserted into the plots so that time series at the beginning and ending portions of the simulations could be easily viewed. Test 1 does not exhibit damping over the duration of the simulation. Weak nonlinear motion owes to the nonlinear form of the continuity equation. Test 2 exhibits weak damping over the 1month simulation. Development of nonlinearities is slightly stronger than for Test 1 owing to the contribution by the advective terms. Tests 1 and 2 were repeated with an initial surface deviation 10 times smaller than described here (results not shown). Motion induced by this smaller watersurface deviation was not sufficient to develop nonlinearities and the resulting slosh motion for both cases (with and without advection) showed no variation in peak water level, and no damping was exhibited.
The fundamental seiche period for a rectangular basin is given by:
(C2) 
where l is the length of the basin. For a wave traveling parallel to the xaxis of the sloshtest grid, T = 0.02337 day, corresponding to a frequency of 42.8 cycles/day (cpd). Spectrums of water levels shown in Figures C3 and C4 for Tests 1 and 2 are displayed in Figures C5 and C6, respectively. Peak amplitudes occur at 42.8 cpd. Small peaks (slightly visible in Figures C5 and C6) are contained in the spectra at 85.6 cpd, indicating the presence of a weak harmonic of the primary seiche frequency. These tests indicate that the discretized equations applied for calculation of water level in Tests 1 and 2 do not introduce erroneous frequencies into the solution.
Figure C3. Time series of water level for Test 1
Figure C4. Time series of water level for Test 2
Figure C5. Spectrum of water level for Test 1
Figure C6. Spectrum of water level for Test 2
Tests 3 and 4 were designed to determine how damping and mass conservation properties respond to a grid with sloped bottom and constant cell sizes. Grid configurations and numerical parameters for Tests 3 and 4 are given in Table C3 and the grid is shown in Figure C7. Changes in volume of 5 ´ 10^{6} and 1 ´ 10^{5} percent were calculated for Tests 3 and 4, respectively.
Table C Slosh Test Grid Configurations and Numerical Parameters for Tests 3 and 4  
Numerical Parameter  Value  
D'''s''', m  500  
D'''t''', s  5  
h, 'm'  Min = 9 m, Max = 11 m, Dh /Dx = 0.0002  
Length, m  10,000  
Width, m  2,500 
Figure C7. Computational grid for Tests 3 and 4
Damping properties for Tests 3 and 4 are shown by time series of water level in Figures C8 and C9, respectively. Starting maximum water level for both tests was 0.01 m at 0.5Dx from the end of the grid. Test 3 does not exhibit damping over the duration of the simulation. Water levels from Test 4 are slightly damped by properties of the numerical algorithm for the advective terms. In both tests, water levels are weakly nonlinear, as described for Tests 1 and 2.
Spectrums of water levels for Tests 3 and 4 are displayed in Figures C10 and C11, respectively. Peak amplitudes occur at 42.4 cpd. Small peaks (slightly visible in Figures C5 and C6) are contained in the spectra at 84.8 cpd, indicating the presence of a weak harmonic of the primary seiche frequency. These spectra demonstrate that the discretized equations applied for calculation of water level in Tests 3 and 4 do not introduce erroneous frequencies into the solution.
Figure C8. Time series of water level for Test 3
Figure C9. Time series of water level for Test 4
Figure C10. Spectrum of water level for Test 3
Figure C11. Spectrum of water level for Test 4
Appendix D
Wind Set Up Tests
This appendix describes tests designed to evaluate model performance under wind forcing. Two tests were performed to examine model response. The first test compares the results of numerical calculations to those of an analytical solution for a rectangular channel. The second test evaluates model response to wind forcing in a basin of arbitrary shape.
Wind set up in a rectangular channel for steadystate conditions is maintained by a balance of the pressure gradient, wind forcing, and bottom friction. For 1D flow, the momentum equation (Equation 2) can be reduced to (Bretschneider 1966)^{[2]}:
(D1)

where T_{w} is the wind stress, and T_{b} is the bottom stress. In the absence of bottom friction, Equation D1 of Bretschneider can be rewritten as:
(D2)

where κ=3.3x10^{6}. The coefficient k was derived from wind and bottomstress coefficients determined in a study of Lake Okeechobee, FL (Saville 1953). Application of Equation D2 to the present study required modification of k to be equal to the windstress coefficient applied in CMSM2D, which varies with wind speed, so that analytical and numerical solutions could be compared. Integration of Equation D2 gives:
(D3)

where C is a constant of integration that is determined by the position of the channel origin if no bottom is exposed, and by the position of the waterland interface if drying has occurred. The parabolic form of Equation D3 indicates a locally windforced water surface in a rectangular channel does not have a linear distribution along the channel axis. Instead, the water surface will be curved, with the curvature being dependent on the channel length and depth, and the wind speed.
For comparison of the analytical and numerical solutions of Equation D2, a 1D grid was developed that had a total length of 9,500 m and was 95 cells long. Each square cell had side dimensions of 100 m. The stillwater depth was set to 2 m and the time step was 10 s. The wind speed set to 10 m/s and held constant. A 10m/s wind speed corresponds to
. Figure D1 compares water level computed analytically from Equation D2 and numerically by CMSM2D, under steadystate conditions. The numerical solution well reproduces the steadystate, windinduced set up and set down of the analytical solution for simulations applied to shallow water.
Figure D1.  Comparison of analytical and numerical solutions of steadystate, windinduced set up, no exposed channel bottom

To test the response of the model to wind forcing in a basin of arbitrary geometry, a modified version of the hourglass test developed for a curvilinear grid (Spaulding 1984) was examined. An hourglassshaped grid was developed with constant cellside lengths set to 500 m and an ambient depth of 5 m. The time step was set to 30 s. Two tests were performed, one for wind blowing from the west (from the negative xaxis) and the other for wind blowing from the north (from the positive yaxis). For each test, the wind was ramped up over a 24hr interval and held constant at 10 m/s for the remainder of the 100hr simulation.
Watersurface elevation for the west wind test is shown in Figure D2. The set up and set down are symmetric between the upper and lower portions of the grid. The watersurface elevation contours for the north wind test are shown in Figure D3. The watersurface elevation for the north wind test is equally distributed between the left and right portions of the grid. Symmetry in both tests demonstrates that there is no inconsistency in calculations at wall boundaries. The results of this test demonstrate that the model responds to wind forcing with qualitatively correct patterns of watersurface deviation. Wind set up calculated by CMSM2D is qualitatively similar to results displayed graphically by Spaulding (1984) and by Cialone (1989).
Figure D2. Watersurface elevation contours for west wind
Figure D3. Watersurface elevation contours for north wind
Appendix E
Advection Test
Advective terms were examined by developing a grid with an idealized jettied inlet and displaying the current field during ebb flow. Inclusion of the advective terms in the momentum equations allows the model to properly simulate eddies and an ebb jet as the ebb flow exits the inlet. Eddies and jets will not develop without advective terms represented in the calculations.
The idealized inlet grid was specified to have a flat bottom with a stillwater depth of 5 m. Inlet dimensions were 300 m wide and 800 m long. Cellside lengths were 25 m on all sides in the inlet and nearshore areas. Cell size increased to 50 m offshore. The time step was set to 1 s. Water level was forced with a sine wave having amplitude of 0.5 m and period of 12.42 hr.
Two simulations were conducted, one without advective terms included in the computations and one with them. Figure E1 shows the current field from the test without the advective terms during the ebb tidal cycle. No eddies are present and flow exiting the inlet spreads laterally, but does not form a jet. However, with the advective terms included in the computations (Figure E2), a welldeveloped ebb jet is formed and eddies are present on each side of the jet. The ebb jet and eddies are symmetrical about the axis of the inlet, demonstrating that there is no directional bias in the advection algorithm.
Figure E1. Ebb current field for advection test, no advective terms
Figure E2. Ebb current field for advection test, with advective terms
Appendix F
Wetting and Drying Tests
Tests were performed on a slopedbottom grid to determine the stability properties of the wetting and drying algorithms. One and twodimensional tests were conducted to demonstrate the behavior of the flooding and drying algorithms under different sources of hydrodynamic forcing and basin geometries. A list and short description of the tests are given in Table F1. Comprehensive descriptions and model results are provided for specific tests.
Table F1 List and Description of Flooding and Drying Tests  
Test Number  Title  Description 
1  Channel with sloping bottom  Test wetting and drying of a 1D canal forced by timevarying wind. 
2  Depression in a square grid  Test stability for wetting dry cells surrounding a ponded area. 2D grid. 
Test 1: Channel with Sloping Bottom
A 1D test was conducted to examine the flooding and drying algorithms for a channel with simple geometry. The test consisted of a channel with a sloping bottom that was forced by a timevarying wind. Channel length was 150,000 m with 101 cells along the main channel axis (parallel to the xaxis) and 1 gridcell wide. Cells were square with side lengths of 1,500 m. The time step was 100 s. Channel bottom slope was
with maximum and minimum stillwater depths of 3 m and 0.5 m, respectively. Forcing consisted of a wind that blew along the channel from the shallow end toward the deep end. Wind was ramped up over 10 hr to a maximum speed of 10 m/s and held constant from hour 10 to hour 100. Wind was turned off at 101 hr and remained off for the remainder of the 200hr simulation.
Time series of water elevation for the slopingbottom test are shown in Figure F1 in 10hr intervals. Twentysix cells on the shallow (left) end of the grid are shown out of 101 cells in the grid. Dry cells are shown as white. When wind stress is applied to the channel (0 to 100 hr), water is forced out of the shallow area so that successive drying of cells occurs from left to right. A maximum of 21 cells dried during the simulation. After the wind was turned off (hour 101), water flowed from right to left, successively inundating the dry cells.
Figure F1. Demonstration of flooding and drying of sloped channel
Test 2: Depression in Square Grid
A source of instability in some flooding and drying algorithms is rewetting of dry cells that surround an area that has formed a pond. A robust flooding algorithm will remain stable with any pattern of wet and dry cells. This test was designed to determine the behavior of the wetting and drying algorithms where ponding takes place.
A square grid consisting of 400 50 ´ 50m cells was developed in which the central area contained a square ring of shallow cells surrounding deeper cells (Figure F2). Outside the shallow ring, the depth was set to 2 m everywhere. Cells in the shallow ring were specified with depths of 0.3 m, with adjacent interior cells having depths of 0.5 m, and adjacent outer cells having depths of 1.0 m. Four cells in the center of the depression were 1m deep.
Figure F2. Grid with central depression surrounded by shallow area
The grid was forced with watersurface elevation at six cells located on the left side of the grid, denoted by the red line in Figure F2. A sinusoidal forcing was applied having amplitude of 1 m and period of 12 hr. The depth at which cells are deemed dry was specified as 0.05 m. The model was run for duration of 50 hr, with a ramp of 1 day and time step of 5 s. Plots of water level and circulation are shown in Figures F3 through F10 at hourly intervals starting at hour 42. During hours 43 to 47, the water level was lowered to expose the ring of shallow cells. The dry cells are denoted by white with no current vectors. A pond was formed within the interior of the ring of dry cells.
Water level rises from hours 45 through 49. At hour 46 (Figure F7), cells on the outer portion of the shallow ring (with ambient depths of 1 m) have rewetted. By hour 48 (Figure F9), all previously dry cells have rewetted. During the process of flooding and drying, no instabilities were encountered. Thus, the wetting and drying algorithms in CMSM2D function properly for the situation of flooding around a ponded area.
Figure F3. Water level and circulation pattern at hour 42
Figure F4. Water level and circulation pattern at hour 43
Figure F5. Water level and circulation pattern at hour 44
Figure F6. Water level and circulation pattern at hour 45
Figure F7. Water level and circulation pattern at hour 46
Figure F8. Water level and circulation pattern at hour 47
Figure F9. Water level and circulation pattern at hour 48
Figure F10. Water level and circulation pattern at hour 49
Appendix G
WaveAdjusted Boundary Condition Test
This appendix demonstrates the waveadjusted boundary condition for an idealized beach. In the example, wave forcing is applied to calculate a longshore current. The waveadjusted boundary condition modifies the water level and velocity on boundaries forced by watersurface elevation to account for the presence of wave forcing. Thus, the prescribed boundary forcing is applied after being adjusted for the presence of waves. This adjustment promotes realistic circulation patterns and wave set up and set down at the boundaries, making values at the lateral boundaries compatible with values calculated within the calculation domain near the boundaries. A simulation without the waveadjusted boundary condition is also shown, which illustrates the necessity of the modification of water level and velocity at the boundary.
An idealized beach computational grid was developed (Figure G1) having grid spacing of 50 m in each horizontal direction, and depths ranging from 1.13 m at the shoreline to 18.4 m at the seaward boundary. CMSM2D and STWAVE domains were identical for the idealized beach simulations.
Forcing for the models was specified as:
a.  STWAVE: Wave height of 2.0 m, period of 10.0 s, and wave angle of 25.0 deg. Spectral spreading parameters werey=3.3 and nn = 4. 
b.  CMSM2D: Watersurface elevation set to 0.0 m along lateral and seaward boundaries. 
CMSM2D was run for 12.5 hr with a 2s time step and ramp duration of 0.02 day. Results from the simulation without the waveadjusted boundary condition are described first, followed by those with the waveadjusted boundary condition.
Figure G1. Computational grid for idealized beach
Watersurface elevation and velocity as computed by the standard watersurface elevation forcing boundary condition (boundaries not adjusted for presence of wave forcing) are shown in Figures G2 and G3, respectively. Set up is calculated at the shoreline, but decreases to zero at the lateral boundaries. A longshore current is develops in the nearshore area, but velocities at the lateral boundaries are weaker than inside the calculation domain and display unrealistic patterns. The unrealistic velocity patterns and watersurface elevations at the lateral boundaries owe to the absence of the wave stresses there.
Watersurface elevation and velocity as computed by the waveadjusted boundary condition are shown in Figures G4 and G5, respectively. Set up is calculated at the shoreline and extends nearly uniformly across the entire grid. An alongshore current is well developed in the nearshore area, both near the lateral boundaries and away from them. Because the boundary conditions were adjusted for the presence of wave forcing, the circulation patterns are realistic. Water can flow onto and off of the grid along the lateral boundaries without incompatibility between the boundary condition and interior hydrodynamic processes.
Figure G2.  Watersurface elevation calculated with standard water surface elevation boundary condition 
Figure G3.  Velocity calculated with standard watersurface elevation boundary condition 
Figure G4.  Watersurface elevation calculated with waveadjusted boundary condition 
Figure G5. Velocity calculated with waveadjusted boundary condition
Appendix H
Surf Zone Verification Tests
To verify CMSM2D’s response to wave forcing, calculations were compared to laboratory data collected by Visser (1982).^{[3]} Because the laboratory experiments were conducted with monochromatic waves and the bathymetry was uniform alongshore, CMSM2D was modified to include a 1D monochromatic wavetransformation model. This model applies linear wave theory to compute wave transformation and computes wave height of depthlimited breaking and broken waves by the wave stability relationship of Dally et al. (1985). It also includes representation of the wave roller as described by Dally and Brown (1995) and Dally and Osiecki (1994). Water levels calculated by CMSM2D are passed to the wave transformation model to allow waves to respond to the set up and set down.
Larson and Kraus (2002) provide succinct descriptions of the wave stability relationship and roller model together with comparisons of calculated and measured longshore current, including comparisons to the Visser (1982) data, with and without the roller model. Their results demonstrate that inclusion of the roller momentum for calculation of the longshore current and wave set up increases accuracy. Without the roller momentum, peak longshore current was calculated to be seaward of the measured peak, whereas including the roller shifted the peak toward the beach and aligned it with the measured peak. This adjustment of the crossshore distribution of the longshore current modified the set up with an increased set up with the roller as compared to without it.
Calculation of longshore current and set up are conducted for two of the Visser (1982) data sets, Cases 4 and 7. Wave properties for each case are listed in Table H1, and crossshore profiles and roughness information are listed in Table H2. The major difference between these two cases is the bottom roughness. Case 4 was run on a smooth concrete bottom, whereas bottom roughness elements were introduced for Case 7, with the wave conditions held to be the same as much as possible. By choosing these two tests, performance of CMSM2D in the surf zone over a great difference in bottom roughness can be demonstrated.
Table H1 Wave Properties at Offshore End of Basin and BreakertoDepth Ratio for Selected Visser (1982) Laboratory Experiments  
Case  Wave Height, m  Wave Period, s  Wave Angle, deg  Breaker to Depth Ratio 
4  0.076  1.02  19.9  0.83 
7  0.078  1.02  18.4  0.74

Table H2 CrossShore Profiles and Roughness Information for Selected Visser (1982) Laboratory Experiments  
Case  Distance Across Shore, m  Depth, m  Beach Slope^{1}  Bottom Roughness 
4  0.472 7.328 8.253 
0.040 0.350 0.350 
0.050  smooth 
7  0.472 7.328 9.503 
0.040 0.350 0.350 
0.050  rough 
^{1 }Beach slope calculated for sloping portion of basin.

Computational grids were developed for each bathymetric profile, and depths were uniform alongshore. For each grid, the cell spacing parallel to the alongshore direction (Δy) was 0.10 m. Cell spacing parallel to the crossshore direction (Δx) was 0.01 m from the offshore boundary to approximately 1 m from the shoreline. Resolution was increased nearer to the shore to capture details of the set up calculation. As an example, resolution change for the Case 7 computational grid is shown in Figure H1.
Simulations were conducted with identical parameter settings and time step, with the exception of the Manning roughness coefficient and the breakertodepth ratio for which settings were case dependent. The depth at which cells were specified as dry was 0.001 m and the time step was 0.025 s. Breakertodepth ratios for each case are provided in Table H1. The Manning roughness coefficient, serving as an adjustment parameter, was set to 0.0125 for Case 4 and to 0.022 for Case 7, after numerical experimentation. Wave calculations proceeded shoreward until a minimum wave height of 0.001 m was reached.
Figure H1.  Detail of computational grid for Case 7 showing crossshore variation in cell spacing

Comparison of measurements and calculations for wave height, longshore current speed, and set up for Case 4 are shown in Figures H2, H3, and H4, respectively. Calculated wave height compared well with measurements, except for the maximum wave height, which was underestimated by the wavetransformation model. The calculated breakpoint took place directly shoreward and nearly at the measured location.
Calculated longshore current speed well reproduced the distribution determined by the measurements (Figure H3). Peak current speeds compare well, with the calculated peak located directly seaward of the measured peak. Seaward of the breakpoint, calculated weakening of the longshore current closely follows the measured reduction in current.
Set up calculations also compare favorably to the measurements (Figure H4). The slope of the set up is slightly reduced in the calculations as compared to measurements, but the overall result indicates that the model is reproducing the waveinduced set up.
Comparison of calculated and measured wave height and longshore current speed for Case 7 (artificial roughness) are shown in Figures H5 and H6, respectively, and calculated set up is shown in Figure H7 (set up measurements are not available for Case 7). Calculated peak wave height underpredicts the measured peak wave height. However, because measured wave heights before breaking are not available, there is no indication of whether strong nonlinear shoaling took place. Calculated longshore current speed closely matches measurements over the peak and offshore reduction in speed.
Figure H2. Wave height comparison for Case 4
Figure H3. Longshore current comparison for Case 4
Figure H4. Waveinduced set up comparison for Case 4
Figure H5. Wave height calculated by roller model for Case 7
Figure H6. Longshore current calculated by M2D for Case 7
Figure H7. Waveinduced set up calculated by M2D for Case 7
In conclusion, calculations with CMSM2D well reproduced the qualitative and quantitative features of accurate measurements of the longshore current in the laboratory. This test validates the overall equation solution scheme of the model and contributions of several terms, including the radiation stresses, bottom friction, and mixing.
Appendix I
HardBottom Tests
Functioning of the hardbottom algorithm within CMSM2D is demonstrated through two idealized tests that are designed to show calculation properties of the capability. Specifically, demonstrated properties are:
a.  Hardbottom cells do not erode below the depth of the nonerodible substrate. 
b.  Symmetry in depth change calculations for symmetric flow and bathymetry. 
c.  Hardbottom cells can accrete and erode sand above the nonerodible substrate. 
d.  Sand volume is conserved. 
Both tests applied the Watanabe total load sediment transport formulation, and sand size was specified as 0.2 mm.
Test 1: HardBottom Calculations Under Symmetric Conditions
Test 1 was designed to demonstrate that the hardbottom algorithm does not allow erosion of hard substrate, but does allow accumulation of sand over the nonerodible surface. This example also demonstrates symmetry of the methodology and capability to represent complex configurations of nonerodible cells. The bathymetric configuration (Figure I1) was specified to be a plane horizontal bottom with a pyramidshaped shoal in the center. The configuration was subject to sediment transport generated by a constant and uniform current in four different simulations where the current originated from each of the four sides of the square. All simulations gave the same symmetrical result relative to the main current direction, so that results from only one direction are provided.
Figure I1. Model bathymetry with cells shown
Figure I2 shows the simulation where the current is directed from the left side. Because of the presence of the pyramidal sediment mound, the current bends around the structure as indicated in the figure. Under the influence of the current, the pyramid erodes.
Figure I3 shows a magnification of the center of the grid. Cells with triangles are specified as having a nonerodible bottom at the initial cell depth (i.e., no sediment cover on the hardbottom layer). Two sets of runs are compared. In the first set, the hard bottom is not in place, i.e., allowing the cells to erode. In the second set, the hardbottom cells are in place, limiting erosion to a specified hardbottom depth. Erosion below the hardbottom level is allowed in these cells during the first set of runs, but not during the second set.
The result of this comparison is shown in Figure I4, displaying the change in depth (blue denotes erosion, and yellow/red denote accretion) after 7 hr of simulation with no hardbottom cells present (triangles are retained in the image for reference to previous figure). Cells specified as hard bottom in the following set of simulations erode in the present simulation, indicating that the hydrodynamic conditions cause the bottom to erode below the level of the hardbottom depth specified in the following simulation. The depth change pattern is symmetric. Figure I5 shows the same situation, but with the hard bottom in place. The calculations show that there is no erosion below the hardbottom cells. Also, symmetry is preserved.
Figure I2. Velocity field over the schematized bottom
Figure I3.  Magnification of bathymetry at the center of grid. Cells with triangles are specified as having hard bottom 
Although not shown here, other simulations with the current originating from the other three sides of the square gave the same symmetrical results relative to the main current direction. In all simulations, sand volume was conserved.
Figure I4.  Change in depth after 7 hr of simulation without hardbottom cells (triangles are left in image for reference to previous figure). Blue denotes erosion; yellow/red denote accretion 
Figure I5.  Change in depth after 7 hr of simulation with hardbottom cells. Blue denotes erosion and yellow/red denote accretion 
Test 2: Erosion and Accretion of Sand Over Hard Substrate
A computational grid was developed representing a canal with a shallow region located in its center (Figure I6). Grid depths vary along the xaxis and are uniform along the yaxis. In Figure I6, cells having hard substrates are denoted with triangles. During the simulation, these cells will erode to the hardbottom surface, then undergo deposition and erosion. The hard bottom depth was specified to be 0.7 m, and initial grid depths at these cells were 0.5 m, meaning that 0.2 m of sand covered the hard substrate at the beginning of the simulation.
Figure I6.  Computational grid and bathymetry for demonstration of erosion and deposition of sand over hard substrate. Triangles denote hardbottom cells 
A 400hr simulation was conducted in which the current flowed to the right (positive) for 200 hr and then to the left (negative) for 200 hr, establishing conditions for both erosion and deposition at the hardbottom cells. Time series of current velocity and depth at one hardbottom cell are shown in Figure I7. During the first 90 hr of the simulation, scour of the sand layer takes place. Once the hardbottom substrate is reached, scour ceases and the depth remains constant at 0.7 m until current velocities are weak enough for shoaling to start (approximately hour 210). Sand accumulates until the current is strong enough to begin erosion (approximately hour 280), and the erosion continues until the hard substrate is reached again. Thus, the hardbottom algorithm functions correctly for situations in which sand overlays the hard substrate and erosion takes place to the level of the hard bottom, and for situations in which conditions become depositional at hardbottom cells.
Figure I7.  Time series of depth of bottom and velocity for demonstration of scour and accumulation of sand over hard substrate 
 ↑ References cited in this appendix are included in the References section at the end of the main text of this report.
 ↑ All references cited in this appendix are included in the References section at the end of the main text.
 ↑ All references cited in this appendix are included in the References section at the end of the main text.