Make Surface Water (mksw)



The mksw program was developed to distribute estimates of surface water return flows developed on a ditch to individual cells.

During the model development, Colorado and Kansas estimated surface water return flows on a ditch by ditch basis based on diversion records. The groundwater model, however, requires cell by cell pumping. The mksw program was developed to distribute the return flows based on the ditch service areas.

From 2001 onwards, Kansas developed the program swrechv2 to perform this task. Colorado continues to use the mksw program.

The mksw program reads a parameter file that contains instructions as to which files to read and write. The file for Colorado is typically called co.sw.par. The instructions can appear in any order. The following table lists the instructions that may appear in the parameter file.

CommandDescription
FILE Directory RechargeExt AcresExt [BIN] Specify the directory and file name extensions for output files
TRANSIENT StartYear EndYear Specify the start and ending year to process
IBOUND file Specify file defining the active model domain
AREA Name CellFile|* x y acres Define the ditches and service areas
RETURN ReturnFlowFile Define the surface water return flows file

Principles of Operation

The mksw program takes surface water return flow estimates on a ditch basis and distributes it to individual model cells proportional to a cell by cell acreage.

Ditch by ditch surface water return flow amounts are read from the file specified on the RETURN command. This file contains month by month surface water return flow estimates. Ditch totals are distributed to individual wells proportional the acreage associated with each cell.

Surface water acreage is calculated based upon the ditch service areas.

Command Reference

FILE Directory RechargeExt AcresExt [BIN]

The FILE command is used to set the output file directory and file extensions. The FILE command must be followed by a subdirectory name. All output files will be saved in this subdirectory. Subdirectories should be named for the state in question since output files have no other means of identifying the state to which they belong. For Colorado this should be co and for Kansas it should be ks.

Following the directory name should be the file extensions to use for the surface water return flow and acreage files. The rrpp program expects these extensions to be rcs and asw, respectively.

The output files will be ASCII text unless the optional parameter BIN is specified, in which case binary output files are produced. This feature was used to improve efficiency during the calibration phase.

The recharge output files will be named dir/yyyy.mm.rcs where dir is the specified directory, yyyy is the year, mm is the month and rcs is the recharge file extension. The acreage file, will be named dir/yyyy.asw.

The recharge output files contain volumes for the corresponding periods in acre-feet. The acreage files contain areas in acres.

When an output file would consist of all zeroes, no output file is produced.

TRANSIENT StartYear EndYear

The TRANSIENT command is used to set the period for which the program operates. Both the start and end year must be specified even when they are the same.

The program produces output files for all months in all years from the first to the last year.

Note that the input files typically cover a much larger period than requested. Colorado's input files, for example, cover from 1940 to present day. The TRANSIENT command is used to select only that subset of these years of interest.

IBOUND file

The IBOUND command is used to select the active model domain. The file referenced should always be the MODFLOW-2000 IBOUND file ../static/02.ibound. The MODFLOW-2000 IBOUND file is always read using a FORTRAN format of (999I2).

AREA Name CellFile|* x y acres

The AREA command is used to define the ditches and service area for each ditch. The AREA command should be repeated to specify all the ditches. AREA commands must occur before the
RETURN command so that the ditches are known.

The AREA command is always followed by the name of the ditch. The name is not case sensitive and should not contain any spaces.

For ditches that cover more than one model cell, the name should be followed by the name of a file that contains the number of acres served by this ditch for every cell in the model. The first line of this file is ignored. The rest of the file is read in free format, but each model row should start on a new line. The program calculates the total service area of the ditch by summing the acres under the ditch in the active model domain and distributing the surface water returns proportional to the acres in each cell. As such, the cell by cell values can be any value that provides the correct proportion of the ditch service area. However, the values are also used to set the surface water acreage to be used for the precipitation recharge credit on irrigated lands, and as such must be in acres.

For small ditches that fall in a single cell, the file name may be replaced by an asterisk (*). The program will then read an x and y coordinate and acreage following the *. The x and y values must be in model coordinates and will be used to locate the ditch in a model cell. All the surface water return flow will be assigned to that cell. The acreage is also added to the surface water acreage in that cell.

RETURN ReturnFlowFile

The RETURN command is used to specify the surface water return flow file. The RETURN command must be followed by the name of the file containing the month by month surface water return flows.

The first line of the surface water return flow file must contain column headers. The first column should be the month. Subsequent columns should be the ditch names in the same order as they appear on the AREA commands. An error will be generated if the columns are not in the correct order.

Subsequent lines should contain the month and one return flow value for each ditch. The month should be specified in the format yyyymm where yyyy is the year and mm is the month.

The return flow values should contain the monthly total for the ditch in acre-feet. The units are not significant to this program, but subsequent programs expect volumes to be in acre-feet.

A # can be used to insert comments.

Example: Colorado Surface Water Return Flows 2002

The following example generates Colorado pumping, recharge and groundwater acreage files for 2002 in the sub-directory co.

The service areas for the Hale, Laird and Pioneer canals are saved in the files hale.dat, laird.dat and pioneer.dat, respectively. Since the service area does not change from year to year, the files are saved in the ../data0/co directory.

Monthly return flow amounts which are simply 40 percent of the diverted amount for that month are saved in the file surf.dat. Since these amounts are updated every year, the file is stored in the ../data/co directory. Note that this file contains values from October 1939 to the present day. Since in 2002 diversions occurred only from April to October, no output files are created for January through March, November and December.

Note the use of blank lines and comment lines which start with a # to make the command file more easily readable.

#  Output
FILE co rcs asw
TRANSIENT 2002 2002

#  Domain
IBOUND ../static/02.ibound

#  County areas
AREA Laird    ../data0/co/laird.dat
AREA Pioneer  ../data0/co/pioneer.dat
AREA Hale     ../data0/co/hale.dat

#  Irrigation returns
RETURN ../data/co/surf.dat

Example: Kansas Surface Water Returns 1940 - 2000

This example from V12p7 demonstrates the use of mksw with small ditches. These ditches are named by township, range and section. For each of these ditches, an (x,y) location and acreage is specified instead of a file name. Only the Almena canal uses a cell by cell acreage file.

The ditch by ditch return flows are specified in ks-data/surf.dat for all ditches regardless of their size.

#  Output
FILE ks12b rcs asw
TRANSIENT 1940 2000

#  Domain
IBOUND 02.ibound

#  County areas
AREA Almena  ks-data/almena.dat
AREA T01R06WS01 * 1937014 14525761 232.64
AREA T01R06WS02 * 1931722 14525652 115.42
AREA T01R06WS03 * 1926441 14525592 165.95
AREA T01R06WS05 * 1915865 14525460  39.03
AREA T01R07WS01 * 1905987 14525388  70.27
AREA T01R07WS02 * 1900825 14525390  77.44
AREA T01R07WS03 * 1895662 14525387  29.75
AREA T01R19WS01 * 1524908 14524397 273.09
AREA T01R19WS05 * 1503853 14524500 102.40
AREA T01R19WS06 * 1498697 14524527  58.75
AREA T01R19WS14 * 1519619 14513883  36.54
AREA T01R19WS17 * 1503843 14513918  25.02
AREA T01R19WS18 * 1498672 14513997  16.48
AREA T01R20WS25 * 1493485 14503495   3.20
AREA T01R20WS26 * 1488301 14503505 110.48
AREA T01R20WS33 * 1477767 14498294 121.39
AREA T01R20WS34 * 1483037 14498240 288.34
AREA T01R24WS06 * 1342030 14525767  16.80
AREA T01R25WS01 * 1336774 14525844  51.26
AREA T01R25WS09 * 1320861 14520709  34.05
AREA T01R25WS10 * 1326104 14520661  77.58
AREA T02R22WS23 * 1425235 14477484   9.82
AREA T02R22WS24 * 1430460 14477479  20.10
AREA T02R22WS26 * 1425195 14472214  78.11
AREA T02R22WS27 * 1419932 14472256  63.63
AREA T02R22WS28 * 1414660 14472263   4.47
AREA T02R33WS31 * 1060749 14472753 164.42
AREA T02R34WS14 * 1050743 14488805  12.37
AREA T03R19WS05 * 1503742 14461288  34.04
AREA T03R23WS03 * 1388253 14461827   4.50
AREA T03R23WS04 * 1382980 14461891   0.44
AREA T03R23WS08 * 1377589 14456682 116.06
AREA T03R25WS23 * 1329952 14446705  17.40
AREA T03R25WS24 * 1335200 14446671  13.35
AREA T03R34WS01 * 1055425 14467642  76.63
AREA T03R34WS33 * 1039019 14441781   1.98
AREA T03R35WS26 * 1018371 14447627   1.84
AREA T03R40WS02 *  860834 14473214  42.58
AREA T04R26WS01 * 1306104 14431200  66.75
AREA T04R34WS19 * 1027809 14421128  17.29
AREA T04R41WS16 *  816988 14432390  24.78
AREA T04R41WS19 *  806191 14427422 113.30
AREA T04R42WS26 *  795452 14422477  91.71
AREA T04R42WS34 *  790008 14417338 168.50
AREA T05R35WS06 *  995750 14406147  44.60
AREA T05R36WS19 *  963453 14391123  69.18
AREA T06R30WS01 * 1184651 14370133   3.41
AREA T06R37WS07 *  938015 14370954  36.52
AREA T06R38WS15 *  921956 14366079  22.02

#  Irrigation returns
RETURN ks-data/surf.dat

Home | Index | Previous | Next

Model Units
Directory Structure
Programs
Static Files
Precipitation Data Entry
Colorado Data Entry
ET Data Entry
Stream Data Entry
Kansas Data Entry
Nebraska Data Entry
Running the Model