1997 Annual Report
DSM2 Model Development
The Delta Simulation Model 2 (DSM2) is a computer model of river, estuary, and land processes that are combined in a package of three main modules: Hydrodynamics (Hydro), water quality (Qual), and particle tracking (PTM). The three modules share a common input and output system, and hydrodynamic information from Hydro is passed to Qual and PTM via a Fortran binary file which contains instantaneous and time-averaged stage and flow data. The origins of the models are fully described in the Delta Modeling Section's 1993 Annual Progress Report. This chapter describes changes to and tests of the models during the last year, including source code modification, sensitivity analyses, calibration efforts, and application of the model.
Many code revisions, improvements, and corrections were done to DSM2 during the past year. While only significant modifications are summarized here, almost all changes are now being tracked in ChangeLog files, available through our WWW Home Page. Source code for all three modules, as well as Intel-NT and Sparc-Solaris executable binaries, are now available on the Home Page. The source code was improved to allow error-free compilation on both the Sparc-Solaris platform using Sun's Fortran 77 compiler, and the Intel-NT platform using Digital Visual Fortran 5.0
All source code written by the Department, or heavily modified from the original version, is copyrighted by the Department, registered with the U. S. Copyright Office, and licensed with the Gnu's Not Unix General Public License (GNU GPL). This allows other interested parties to freely copy, modify, and redistribute the code, and receive payment for doing so. The GNU GPL prevents others from restricting the distribution of the code and keeps DSM2 freely available for use by all.
Changes to the Input/Output system affect all three modules. While no new significant capability was added, errors were corrected to make the current I/O system more stable and accurate. Input is split into fixed input (that which does not vary with time), and time-varying input, which is stored in Data Storage System (DSS) files. Time-varying output can be written to text and DSS files.
Graphical User Interface
The Hydrologic Engineering Center Graphical User Interface (HECGUI) project is a collaboration between the U.S. Army Corps of Engineers Hydrologic Engineering Center (HEC), the California Department of Water Resources (DWR), and the Metropolitan Water District of Southern California (MWD). HEC is providing technical expertise and programming help, DWR is providing programming help and some financial aid, and MWD is assisting with substantial financial help to hire contract programmers and engineers. The goal is to develop a state-of-the-art graphical user interface to view and manipulate physical, chemical, and biological data stored in DSS files or relational databases. A contract was written and signed by HEC and MWD in the last quarter of 1996, for work to be performed in three phases over one year. Conceptual design was performed in the first quarter of 1997, and programming work on the first phase was started in the second quarter.
Intermediate products should be available throughout development, with the final product due at the end of 1997. The final product will be capable of examining a variety of measured and computed data--including stage, flow, precipitation, water quality concentrations, and biological parameters--using different plot types: time-series, scatter, contour, profile, and animations. Furthermore, it will be able to modify data to correct errors and set data quality flags. The majority of the GUI will be written in Java, a fairly new programming language specifically designed to be portable between different hardware and operating systems, and to be secure on the Web. This means that users should be able to view data from remote databases, as well as local databases, allowing easy collaboration between users.
Hydrodynamics Module (Hydro)
Apart from correcting errors and making minor improvements to the Hydro module, a significant change was made to the method for handling irregular cross sections in Hydro. The original method of dealing with irregular cross sections required each cross section in a channel to have the same number of layers, and interpolated in two directions during runtime. The new method allows any number of cross sections, with any number of layers; interpolates along the channel before runtime; checks for possible sources of error before the run; and uses output from the Bathymetry Data Display (BDD) program as its input. With the new system in place, the user will typically draw cross sections using the BDD and save the raw data to a file. A pre-processor converts the raw BDD data to another format readable by DSM2. DSM2 reads the irregular cross section data and assigns cross sections to channels. Rectangular cross sections are used in channels with insufficient irregular cross section data. Before the hydrodynamic time loop is started, intermediate ("virtual") cross sections are generated at computational points along the channel in Hydro by interpolating horizontally between actual cross sections. Then, during the run, the virtual cross sections are interpolated vertically using the calculated stage at each computational point.
Another change to Hydro and Qual allows head-difference flows, and pumping, between reservoirs. This change was needed to study CALFED alternatives.
Hydro source code was made publicly available via the Internet during May 1996.
Water Quality Module (Qual)
The significant advancements to Qual in the past year were the connection of the non-conservative constituent routines to the I/O system, and the addition of the capability to model multiple conservative constituents from different sources. At this time, Qual can simulate conservative constituents from different sources in a single run, and the following non-conservative constituents: water temperature, dissolved oxygen, organic nitrogen, ammonia nitrogen, nitrate nitrogen, nitrite nitrogen, phosphate phosphorus, organic phosphorus, algae, and biochemical oxygen demand.
Qual source code was made publicly available via the Internet during November 1996.
Particle Tracking Module (PTM)
The Particle Tracking Module was completely rewritten last year in C++ for use in DSM2. The original PTM code was written in Fortran 77 for use in DSM1, the Fisher-based Delta simulation model. During the attempt to convert that code to DSM2, we realized a significant revision would be needed to connect to DSM2, improve clarity, and to remove errors. At that time, we decided to try object-oriented techniques in programming, which meant using a new computer language. Little new functionality is available beyond the first Fortran version, but because of the object-oriented approach, it should be much easier to add new functionality, such as reading water quality output from Qual and adding particle behavior based on flows or water quality.
After we rewrote the PTM in C++, a new object-oriented language named Java became popular and appears destined to become perhaps the most widely used object-oriented language. Java offers several advantages over C++. For example, there are no pointers, so learning the language is easier and memory errors are less common. Java offers built-in array bounds checking, which also helps to reduce memory-related errors. A Java program will run without change on many different computer platforms. It is Web-aware, which means it can easily be used across the Internet. Because of these advantages, the PTM may be rewritten in Java soon.
PTM source code was made publicly available via the Internet during December 1996.
Land Processes Module (DICU)
In 1995, a project was initiated to improve the Delta Island Consumptive Use (DICU) model and to develop a new model to estimate drainage water quality from Delta islands. This project was contracted out to Professor Kenneth K. Tanji from UC Davis. Details of this modeling activity are available in a report prepared by Professor Tanji and his student. The main focus of this study was to improve the physical representation of the interaction between the water bodies and the agricultural lands. The following is a brief summary of the assumptions and mathematical development of the proposed model.
Each island is divided into a three-compartment, water-flow pathway: root (soil) zone, shallow groundwater, and open drain. Seepage enters directly into shallow groundwater where it is partitioned into rising groundwater into the root zone, into open drains, and into storage in the shallow groundwater. Irrigation water is classified as surface and sub-surface. For surface irrigation, the root zone drainage and surface runoff act as inputs into the groundwater and the open drain, respectively. Subsurface irrigation water is routed directly into the root zone, and any excess water flows to the surface and is routed into open drains. Precipitation and leaching irrigation flow into the root zone, and any excess water from the root zone enters into the groundwater. Runoff from precipitation and leaching irrigation is routed directly into open drains.
For the salt-balance, the root zone is divided into four quartiles to account for the fact that roots of crops extract different amounts of water at different depths. Based on the various data available, it is assumed that about 40% of evapotranspiration (ET) is extracted from the top quartile, 30% from the second, 20% from the third, and 10% from the fourth quartile. During the simulation, the salt concentration for each quartile is calculated and updated. It is further assumed that each quartile has an independent interaction with the root zone. A parameter is introduced by the name Leaching Fraction (LF). Leaching Fraction has the opposite relationship to the Efficiency Factor used in the DICU Model. Thus, if in a given time period, 90% of the water in a given quartile is absorbed by the root (LF=0.1), its assigned salinity is increased by tenfold. This is done to model the build-up of salt in the soil layers. Based on the description offered in the report, the drainage salinity seems to be very sensitive to the value assigned to LF. This is probably an area which needs some modifications.
Applied water either enters from the top (surface irrigation) or from the bottom (subsurface irrigation) of the root zone. For surface irrigation, salt concentration of the water increases as the water travels from one quartile to next, leaving the highest salt concentration in the bottom. For subsurface irrigation, water enters from the bottom quartile and works its way up. In this case, the salt concentration has the opposite pattern with the highest concentration at the top.
The time step proposed for the model is one month (the same as DICU). During the simulation, the salt concentration of water and soil in each quartile is computed, taking into account all of the processes described above. The model was delivered to DWR in the form of a spreadsheet. The results of the model were compared to field data obtained during a study about corn's salt tolerance on Terminous Island in 1981. There are some instances where the model shows fairly good agreement with the field data, and some where the results differed greatly. One reason for the discrepancy may be that the model seems to be highly sensitive to assumptions for LF.
An initial attempt was made to develop a model to simulate the DOC production in Delta soils. There is only limited data available from a current USGS-DWR study. These data were collected during flooded conditions. More comprehensive data are needed to fully test and calibrate the model. The proposed model is based on a first-order rate equation. The magnitude of the rate coefficient was estimated to be about 1.16 mg/l per month. Professor Tanji explains that decomposition of organic matter in soil is dependent upon temperature, but it is not included in the mathematical formulation for this initial development. The best match with the data was found when the rate coefficient was set to 0.5, which was different from the laboratory-estimated value. Professor Tanji explains that more data for DOC concentrations within the soil profile are necessary to extend this model beyond winter leaching conditions.
Calibration of DSM2 began with the Hydro module. First we identified the times when various Ultrasonic Velocity Meter (UVM) flow measurement devices were operational, and when the various barriers and gates in the Delta were operating (Tables 2-1 a, b, and c). Then, based on that information, we developed four different periods to run Hydro: May 1988, December 1992-January 1993, May-July 1994, and October 1994. These periods allow us to calibrate and verify the flows and stages during a variety of flow conditions and gate positions.
There are three main areas of importance in the Delta that have UVM flow meters installed: the North Delta around Steamboat/Sutter Sloughs, the Cross Channel, and Georgiana Slough; Three Mile Slough and Jersey Point; and central Delta flow through Old and Middle Rivers. Data from a fourth area, the San Joaquin River near Stockton, was not available when calibration began. Also, further flow comparisons around the Delta can be made from May 1988 tidal cycle measurements.
When sufficient data are available (i.e. several days of continuous UVM measurements), we believe it is important to show residual flow comparisons, as well as instantaneous flow comparisons. Residual flows can be computed by taking a moving average of about one tide cycle or multiple of tide cycles, which are about 25 hours in length. Residual flows are important to show long-term flow affects on salinity, which are not evident in instantaneous flow plots.
Stages can be important to show how tidal energy, as evidenced by stage amplitude, is carried from the downstream boundary landward through the Delta. Absolute comparison of stage measurements between observed and computed data is probably less important because of uncertainties in the historical datum used when collecting stage measurements.
After this first stage of calibrating Hydro based only on flow data, we started using Qual. A fairly short (6 month) run was set up using real tides from Hydro, as well as a 23 year period, using the 19-year mean stage and monthly averaged hydrologies. The real tide run period, January through July of 1992, was chosen to see how the model reacted to an initial low flow/high salinity condition, followed by high flows, then decreasing flows and increasing salinities. The multiple year run tests the model over a wide variety of hydrologic conditions in a mode similar to that used for planning studies.
It was evident during this second phase of calibration that the use of Qual provides very important feedback to Hydro. Ideally, before calibrating Qual, Hydro would be fully calibrated using only flow and stage data, and the only adjustments made to Qual would be in the dispersion coefficients. In practice, information from Qual must be used to change parameters in Hydro because of the lack of complete flow data.
A fundamental problem was noticed in DSM2 that also exists in the Section's current Delta model, DSM1. When Manning's n values are such that stage amplitude at Martinez, the downstream boundary, is carried upstream in a manner similar to observed amplitude, far too much salt is moved into the Suisun Bay area. This results in approximately correct salt concentrations in the lower Sacramento River, and too high concentrations in the San Joaquin River and central Delta. On the other hand, when amplitudes are dampened with higher Manning's n values in the Western Delta, then the Suisun Bay, lower San Joaquin, and central Delta salinities are correct, but lower Sacramento salinities are far too low.
We conducted several experiments with different parameters to find a controlling factor to correct this problem. We tried changing the volume in rectangular and irregular channels, adjusting the flow coefficients into and out of reservoirs, and changing the datum of the downstream forced stage at Martinez. None of these tests had a significant effect in correcting the problem noted above.
Therefore, in this first major phase of calibration of DSM2, we decided to split the difference in error between the Suisun Bay and lower Sacramento. Manning's n was increased slightly in channels in the Suisun Bay and dispersion set to zero. In the lower Sacramento River, Manning's n values were decreased and dispersion increased in an attempt to move salt upstream. In the San Joaquin River, only dispersion was adjusted. This results in too high salinities in the Suisun Bay/Western Delta, too low salinities in the lower Sacramento, and about correct salinities in the San Joaquin River and central Delta.
Comparison plots between DSM2 and observed data are in Figures 2-31 to 2-36 for real tide runs, and Figures 2-37 to 2-42 for 20 year runs with a 19-year mean tide and monthly hydrologies. Neither the Andrus Island levee break of 1972 nor the 1976-1977 drought are fully modeled, and thus will show a significant discrepency from observed data.
Summary of Calibration and Verification
Important findings during the calibration and verification process were:
At this time, DSM2 may have reached the limits of the accuracy of the input data. While further calibration could be done, it might result in the model producing "correct" answers for the wrong reasons.
Based on these observations, we recommend the following:
After the above tasks are completed, it would be appropriate to conduct a second calibration, which would incorporate accurate geometry, and possibly more accurate treatment of channel roughness and water density, as described above. This should result in a model that probably is near the capabilities of a one-dimensional formulation.
We tested the model to check the sensitivity of DSM2 (both Hydro and Qual) to changes in some of the basic input parameters. The goal of this testing was to determine what values (or range of values) should be assigned to each parameter and to ensure that the model response is fairly stable with respect to changes in those parameters. In addition, some further tests were done to ensure the validity of the model results.
The following is a list of input parameters which was used in the testing. All of these parameters are part of a group called scalars, which can be easily modified by the user.
The model was tested using three values of
Flow and stage were compared at various locations in the Delta. The
model response was very similar for all the runs. There was only a
small difference in results between the first and second tests
The time step was tested at 3, 5, and 10 minutes, with all the other input parameters set at standard values. The run length was set to 25 hours. There were very small differences observed during the first 4 hours, but after that the results did not vary much. Because of the need to output a tidefile every 15 or 60 minutes, and also because of the possibility that the model might be used in cases where more transient situations may be encountered, it was decided to use a time step of 5 minutes.
All other input parameters were standard values. The run length
was 25 hours. The results did not show any noticeable differences
among the three tolerance combinations, and there was only a little
difference between the CPU time.
Hydro has to solve a set of simultaneous equations for every
time-step and every iteration. But this is a time-consuming
The effect of a one hour pulse of flow from the Sacramento and San Joaquin rivers was examined. The flow was suddenly raised to a high value and, after one hour, the flow was set to zero. The tide at Benicia was set to a constant stage. All inflows into and diversions from the Delta were set to zero. The results showed that the flows gradually damped out to zero and, after some fluctuations, the stage stayed constant at the tide level at Benicia.
Currently, most of the variables used in Hydro are single precision numbers. Because of the high number of simultaneous equations involved, numerical precision could become a potential problem, which may require the use of double precision variables. However, that solution is very undesirable, because it will double the memory requirement and may increase the CPU time accordingly.
Two tests were conducted of the single precision variables. In the both tests, all the parameters were set to standard levels. In the first test, channels numbered in a standard manner so as to reduce array sizes. In the second test, the channels were renumbered randomly, thus changing the order in which the computations were taking place. In theory, if numerical precision is a problem, then the results would be somewhat different if the order of the computations is changed. The tests showed only a very small difference. The maximum difference observed was about 0.04%, thus suggesting that the use of double precision variables is not justified.
Three sensitivity tests were applied to Qual: time step, Hydro tide output interval in relation to Qual time step, and maximum number of parcels within a channel.
The time step was tested at 5, 10, 15, and 30 minutes with the tide output interval set at 30 minutes. All other input parameters were set at standard values. The run length was 8 days. The results showed that the difference between the first three runs (5, 10, and 15 minutes) is fairly small (about 1 percent), but the results for the 30 minute time step showed a noticeably bigger difference. Based on the above results, a Qual time step of 15 minutes is recommended.
The Qual time step was fixed at 15 minutes, while the tide output interval was set to 15, 30, and 60 minutes. The tide output interval controls how often hydrodynamic results are stored in the binary tide file. DSM1 is currently using 1 hour tide intervals. All other input parameters were set at standard values with a run length of 8 days. The results showed small differences, but no trends were observed. It is assumed that a tidefile interval of 15 minutes is more accurate, but that accuracy comes at a cost of much bigger files. For example, the sizes of the binary tidefiles for an 8 day run were 11.7 MB and 2.9 MB for tidefile intervals of 15 minutes and 60 minutes, respectively. For a short duration model run (two to three weeks), it may be satisfactory to use a 15 minute tide interval, but for longer periods, a higher number is suggested. For a model run exceeding a few months, the use of a 60 minute tide interval is recommended.
Qual is based on a Lagrangian coordinate system. Each channel is divided into a series of parcels. During each time step, parcels are added and removed at each end of a channel. The model has the capability to set a maximum number of parcels within a channel. Four tests were conducted with the maximum number of parcels set at 10, 16, 22, and 30. All other input parameters were set at standard values. The run length was 8 days. The results for runs with a maximum number of parcels of 16 and 22 were within 2 percent of the run with a maximum number of parcels of 30, but the run based on maximum number of parcels equal to 10 showed a bigger difference. Since the CPU time between 16 and 22 parcels varied by less than 5 percent, the maximum channel parcel of 22 remained standard.
In March, 1997, six preliminary Delta alternatives, as described in CALFED Bay-Delta Program Draft Delta Conveyance and Storage Component dated January 30, 1997, were analyzed using DWR's Delta Simulation Model (DSM1). The results of this study were later published and presented in CALFED's Storage and Conveyance Workshop on March 20, 1997.
In April 1997, the Delta Modeling Section repeated the simulation of five of the six alternatives using Hydro (the Chain of Lakes alternative was not simulated). The time period for the simulation was April-May 1989. Both DSM1 and Hydro used daily varying flow input, and daily varying tide at the downstream boundary (Martinez). The descriptions of the five alternatives are summarized in Table 2-2.
Table 2-2. Summary of Five CALFED Alternatives
All of the alternatives, except for the base case, involved enlarging certain channels in the Delta, by widening and/or dredging a specified amount. The changes in geometry for DSM1 were fairly straightforward, since DSM1 is based on rectangular cross sections. However, Hydro is capable of simulating irregular cross sections and non-prismatic channels. The base case geometry has been developed using a database of hundreds of thousands of data points to capture the conditions in the field. To make the dredgings more realistic, a procedure similar to the one used by ISPD in Old River was followed. The following basic guidelines were used in the dredging:
The geometry for the CUWA alternative has been developed by Metropolitan Water District based on the DSM1 Suisun Marsh version. To maintain consistency between the alternatives for the DSM2 model run, the additional channels and nodes in the Suisun Marsh area and differences in Manning's coefficient due to MWD's input data were ignored. Furthermore, it was assumed that Tyler Island is basically flat, so that rectangular cross sections could be used for making the island into a through-Delta conveyance.
Discussion of Results
Figures 2-48 through 2-55 show DSM1 generated flows. Figures 2-56 through 2-63 show the corresponding Hydro results. Each figure shows the maximum seaward, maximum landward, and daily residual flows for all five alternatives at the given location. Almost all of the plots indicate that Hydro's results are very consistent with those of DSM1, including the variations of daily flow patterns for all the alternatives.
In general, Hydro's results indicate the same trends as those of DSM1, with the CUWA alternative causing the highest incremental changes at most locations (compared to base condition). This is not surprising because the CUWA alternative requires the biggest changes in geometry. Table 2-3 provides a summary of the flow results at each location. The numbers in parentheses are the channel numbers used in DSM1 and Hydro.
Table 2-3. Comparison of Hydro Results to DSM1 at Eight Delta Locations
Hydro Application Summary
Many projects and tasks are planned for DSM2; these are usually listed in our home page at http://wwwdelmod/docs/dsm2/dsm2.html#Future Directions. Some of the more important tasks are listed here.
Goto: Next Chapter
Goto: 1997 Annual Report
Goto: Annual Reports
[ Back | Home ]
© 2000. California Department
of Water Resources. All rights reserved.
Webmaster: Tawnly Pranger
The URL is http://modeling.water.ca.gov/delta/reports
Last modified: June 22, 2000 .