Running the Model



Running the RRCA Groundwater Model for a year after the necessary data files are created is quite straight forward. The run is performed in a directory named for the year of the simulation.

Instructions to run all the programs are contained in a file named run.

Create Year Specific Files

The first step is to create sub-directories for the precipitation and state by state output files named ppt, co ks and ne, respectively.

The next step is to create initial heads for the historical and impact simulations. This is done using the mkshead program which reads the (binary) head file of a previous simulation and writes the starting heads to appropriately named starting head files. For simulations up to 2000, starting heads are extracted from the V12p7 run. For annual update simulations, the starting heads are read from the simulation corresponding to previous year.

The MODFLOW-2000 ET and stream packages are created by the mket and mkstr program, respectively. The mket program reads monthly maximum phreatophyte ET from ../data/monet.dbf and ET areas from ../data0/etarea.dat to produce the ET package. The mkstr program reads the stream network from ../data0/12s.str and reservoir stage from ../data/reservoir.dbf to produce the stream network. For simulations prior to 2001, the mkstr program can be instructed to use the V12p7 stream network by using the -12p flag, in which case the stream network is read fro ../data0/12.str.

Finally the mkinp program is used to create a discretization package file and basic package and name package input files for the historical and impact runs. The program also produces input files for the Colorado surface and groundwater pre-processor packages, and input files for the rrpp program for the historical and impact runs. For simulations prior to 2001 where the V12p7 stream network is used, the -12p flag can be used to instruct mkinp to produce the appropriate file references.

Run Colorado Pre-Processors

Groundwater pumping, recharge and acreage for Colorado is processed using the mkgw program. Surface water return flows and acreage for Colorado is processed using the mksw program. The programs are controlled by the co.gw.par and co.sw.par parameter files, respectively, both of which are generated by the mkinp program. The output from mkgw and mksw are written to the co sub-directory.

The mkgw program reads county by county annual pumping, groundwater return flow fraction and groundwater acreage from the files ../data/co/pumping.dat, ../data/co/returns.dat and ../data/co/gwacres.dat, respectively. It then distributes the pumping, recharge and acreage to model cells according to the well database ../data/co/nohipl.dat.

The mksw program reads ditch by ditch monthly surface water return flows from the file ../data/co/surf.dat. It then distributes the return flows ans surface water acreage to model cells according to the service areas in the files ../data0/co/hale.dat, ../data0/co/laird.dat and ../data0/co/pioneer.dat.

Colorado M&I simply repeats the year 2000 pumping by copying the year 2000 file.

Run Kansas Pre-Processors

Groundwater pumping, recharge and acreage for Kansas is processed using the pumprechv5 program. Surface water return flows and acreage for Kansas is processed using the swrechv2 program. The programs read the year from the command line and saves the output in the ks sub-directory.

The pumprechv5 program reads authorized acres by overlap group from ../data/ks/gw/authacresYYYY.txt, groundwater pumping and irrigated acreage from the file ../data/ks/gw/pumprechYYYY.txt and the monthly pumping distribution factors by county are read from the file ../data/ks/sw/monthlyfactorsbycounty.txt. Groundwater diversion points within or adjacent to the Almena district and area factor (percentage of groundwater only land within district) are read from the file ../data/ks/gw/almenapdivsYYYY.txt. M&I net pumping data are read from the file ../data/ks/gw/YYYYmi.txt.

The swrechv2 program reads return flow factors for different system types from the file ../data/ks/sw/swrech.par. Authorized acreage by overlap group are read from the file ../data/ks/sw/authacresYYYY.txt, while surface water diversion and acreage data are read from the file ../data/ks/sw/swrechYYYY.dat and monthly pumping distribution factors by county are read from the file ../data/ks/sw/monthlyfactorsbycountyYYYY.txt.

Both pumprechv5 and swrechv2 read the location of overlap groups from ../data/ks/40coords.dat and use the cell to county mapping in ../data0/cty.flg.

Run Nebraska Pre-Processors

Groundwater pumping, groundwater return flows and surface water return flows, as well as groundwater, surface water and commingled irrigated acreage is processed by the mknedat program. The program expects a year as the command line argument and saves its output in the subdirectory ne.

The program reads groundwater exclusive pumping from the dBase file ../data/ne/export/GWonlyExport.dbf and groundwater commingled pumping from ../data/ne/export/GWCoExport.dbf. Each record in these files define a year, model cell (row and column), county, irrigated area and annual volume. The program produces pumping files reflecting the annual total pumping for exclusively groundwater and commingled lands distributed to months using a fixed temporal distribution. In addition, groundwater return flows equal to 20 percent of the pumped amount for each month are generated on groundwater exclusive lands. On commingled lands, groundwater return flows generated are equal to the surface water return flow fraction for that system. The groundwater only acreage is saved as the groundwater irrigated acreage. The commingled groundwater acreage is totaled and only used as a cross check against the county commingled surface water acreage.

The dBase files ../data/ne/export/SWOnlyExport.dbf and ../data/ne/export/SWCoExport.dbf are read for the exclusively surface water and commingled surface water application volumes. Each record in these files contain the year, model cell by row and column, county, irrigated area, annual volume and system identifier. The system identifier is used to determine the surface water return flow fraction. The program generates cell by cell files of monthly surface water return flows and surface water only and commingled irrigated acreage.

The program also produces the file necounty.dat which summarized the volumes, rates and areas of irrigation by type for every county.

The mknecanal program reads cell by cell canal leakage by month and simply rewrites the information to files suitable for rrpp to read. The program expects a year as a command line argument. It then looks for files named ../data/ne/canal/clyy_m.txt where yy are the last two digits of the year and m is the month. The month is a single digit for January to September and two digits for October to December. The data is then rewritten to files in the ne directory.

Nebraska M&I simply repeats the year 2000 pumping by copying the year 2000 file.

Run Republican River Pre-Processor

The Republican River Pre-Processor rrpp is used to create MODFLOW-2000 well pumping and recharge files. The program is run five times, once for the historical run and once for each impact scenario, namely Colorado pumping, Kansas pumping, Nebraska pumping and Nebraska surface water imports also known as the Nebraska mound.

The program reads instructions from parameter files named for the year and the impact scenario. For example, for the year 2002, the files for the historical, Colorado pumping, Kansas pumping, Nebraska pumping and Nebraska mound would be called 2002.par, 2002a.par, 2002b.par, 2002c.par and 2002d.par, respectively. These parameter files are generated by the program mkinp.

The rrpp calculates precipitation recharge based on annual precipitation measurements stored in ../data/ppt.dat at stations named in the file ../data/loc.dat. The precipitation recharge curves developed for V12p7 are stored in the parameter files by mkinp. Soil types, spatial multipliers and terrain flags used in the precipitation recharge calculations are read from ../data0/soil.12o, ../data0/terrain.12p and ../data0/terrain.flg, respectively. A state by state precipitation recharge budget is calculated based on the state boundaries designated in ../data0/states.flg.

Agricultural pumping by state are read for each month from files named ss/yyyy.mm.pmp where ss is the state (co, ks or ne), yyyy is the year and mm is the month. M&I pumping by state for each year are read from files named ss/yyyy.mi. Groundwater recharge, surface water recharge and canal leakage for each month are read for each month from files named ss/yyyy.mm.rcg, ss/yyyy.mm.rcs and ss/yyyy.mm.rcc, respectively. Groundwater, surface water and commingled acreages are read from files named ss/yyyy.agw, ss/yyyy.asw and ss/yyyy.aco, respectively. The pumping and recharge files contain volumes in acre-feet per cell for the period represented. The acreage files contain the areas in acres per cell. If a file is not present, the corresponding volume or area is set equal to zero.

The program sums the pumping and recharge for all the states to produce a pumping an recharge distribution for each run. For the pumping impact runs, the M&I pumping, agricultural pumping, groundwater return flows and groundwater irrigated acreage are set equal to zero for each state in turn. For the Nebraska mound run, the surface water return flows, canal leakage and surface water acreage are set equal to zero in those cells indicated by the file ../data0/moundarea.flg. Note that the commingled acreage is unaffected by the impact runs.

The program rrpp generates well and recharge packages for each of the five runs. For the year 2002, the historical and impact well package files would be named 2002.wel, 2002a.wel, 2002b.wel, 2002c.wel and 2002d.wel, while the recharge package files would be named 2002.rch, 2002a.rch, 2002b.rch, 2002c.rch and 2002d.rch.

It is of interest to note that the well package files for the historical and Nebraska mound runs will always be identical since the Nebraska mound simulation effects only surface water. However, in the interest of simplicity and clarity, the Nebraska mound well file is produced and used like any of the other impact simulations.

Run MODFLOW

The MODFLOW-2000 program is used to solve the groundwater flow equations and evaluate the impacts of various stresses on the stream flows. The program is run five times, once to evaluate historical conditions and once each to evaluate the impacts of Colorado, Kansas and Nebraska pumping and the Nebraska mound.

The MODFLOW-2000 program reads a set of file names to use during the simulation from a parameter file also known as a name file. These name files are produced by the mkinp program. For the year 2002, for examples, these files are named 2002.nam, 2002a.nam, 2002b.nam, 2002c.nam and 2002d.nam, respectively.

Some of the input files specified in the name files are common to all years and all simulations. These files are sometimes referred to as the static files. In particular, the following files are used in all simulations:

Input files for the discretization, stream and ET packages specific to the year are generated by the mkinp, mkstr and mket programs, respectively, and are common to the historical and impact runs. For the year 2002, for example, these files would be named 2002.dis, 2002.str and 2002.evt, respectively.

The stream package used in the RRCA model for years from 2001 onwards are different than for years prior to 2001. This is the result of a correction to the stream package. The MODFLOW-2000 HYDMOD package is used to extract flows from the stream network at specific points in order to perform post-processing for the impact analysis. When the V12p7 stream package is used, the HYDMOD input file ../static/12.hyd is used. When the V12s (corrected) stream package is used, the HYDMOD input file ../static/12s.hyd is used.

A basic package and starting heads specific to each year and impact run are used. The basic package files are produced by the mkinp program and for the year 2002, for example, would be named 2002.bas, 2002a.bas, 2002b.bas, 2002c.bas and 2002d.bas, respectively. The starting head files are produced by the mkshead program and for the year 2002, for example, would be named 2002.shead, 2002a.shead, 2002b.shead, 2002c.shead and 2002d.shead, respectively.

The MODFLOW-2000 program is run for the historical and each of the impact runs. For each run, the program produces a listing output file, a head output file and a HYDMOD output file.

For the year 2002, the listing output files would be named 2002.out, 2002a.out, 2002b.out, 2002c.out and 2002d.out, for the historical and four impact scenarios, respectively. The listing output file contains water budgets for every time step in the simulation as well as output indicating the number of iterations of the PCG solver and similar information. The input read from the data files are not echoed in the output file.

The head output file contains the calculated aquifer heads at the end of each stress period (month) in the simulation. For the year 2002, the head files are named 2002.head, 2002a.head, 2002b.head, 2002c.head and 2002d.head, respectively. The heads at the end of the twelfth month would be used as by the mkshead program as the starting heads for the next year.

The HYDMOD output files contain instantaneous stream flows for each time step at a set of points along the stream network. Some of these points are for calibration and diagnostic purposes, while others are used as accounting points for the impact analysis. For the year 2002, the HYDMOD files are named 2002.sfi, 2002a.sfi, 2002b.sfi, 2002c.sfi and 2002d.sfi, respectively.

Cell by cell values for evapotranspiration, stream leakage, spring/drain flow and constant heads are written to a cell by cell flow file.

The starting head files, head output, cell by cell flow and HYDMOD output files are binary files. By using binary files for the heads, starting and stopping the model simulations for each year produces absolutely identical results compared to a single multi-year simulation because heads are transferred from one annual run to the next at full machine precision. If text files were to have been used instead, the head values would be rounded at the year-to-year transfer, so that the results would not be absolutely identical to a multi-year simulation.

Binary files are in general not transportable across machine architectures and operating systems and compilers. Therefore, care should be taken to not mix binary files across machines. It is also important to compile all programs with the same compiler switches. For example, better results are obtained by running the MODFLOW-2000 simulation in double precision. However, this also results in the binary output files being written in double precision, and therefore pre- and post-processing programs must also read and write binary files in double precision.

Run accounting post-processor

The accounting post-processing program acct is used to calculate impacts by computing differences in stream flows between the historical and impact runs.

The program reads the different stream segments to use in the accounting from a definition file. For the V12p7 stream network, the definition file is named ../data0/acct.12p. For the V12s stream network used starting in 2001, the definition file is named ../data0/acct.12s.

The program reads the stream flows calculated by MODFLOW-2000 from the HYDMOD files. For the year 2002, these files are named 2002.sfi, 2002a.sfi, 2002b.sfi, 2002c.sfi and 2002d.sfi, for the historical and each of the impact runs, respectively. It then calculates the difference in the stream flow between the historical run and each impact run in turn, and accumulates the differences on an annual basis.

The program then produces an HTML formatted output file that summarizes the impacts by stream segment for each of the impact runs in acre-feet. For the year 2002, the output file is named 2002.htm.

The impacts for the year are subsequently used to perform the RRCA accounting.

In addition to the impact accounting, the mkcty program is run to summarize aquifer stresses by county. The mkcty program uses a cell to county mapping ../data0/cty.flg. It summarizes the annual total M&I pumping, agricultural pumping, recharge from precipitation, groundwater returns, surface water returns and canal leakage and irrigated acres by county by reading the files in the ppt, co, ks and ne sub-directories. The model predicted evapotranspiration, stream gain/loss, spring/dreain flow and constant head flow is read from the cell by cell flow file. The output is saved in a file named yyyy.cty.

Example: Run the model for the year 2002

This example is run in a sub-directory 2002. Before executing these instructions, the appropriate data files are created or updated in the data directory to update the basic data for the year.

The appropriate pre-processors are run to create initial heads, ET and stream packages for the year, as well as basic, discretization, name and pre-processor parameter files.

Next the pre-processing programs appropriate to each state are run, followed by five Republican River Pre-Processor runs for the historical and impact runs. MODFLOW-2000 is then run to solve the flow equations.

Finally, acct is run to summarize the impacts.

#  Create directories
mkdir -p ppt co ks ne
#  Make starting heads
../bin/mkshead 2002
#  Make ET package
../bin/mket 2002 > 2002.evt
#  Make stream package
../bin/mkstr 2002 > 2002.str
#  Make BAS, DIS, NAM and PAR files
../bin/mkinp 2002
#  Run Colorado pre-processor
cp -a ../2000/co/2000.mi co/2002.mi
../bin/mkgw  co.gw.par
../bin/mksw  co.sw.par
#  Run Kansas pre-processors
../bin/pumprechv5 2002
../bin/swrechv2   2002
#  Run Nebraska pre-processors
cp -a ../2000/ne/2000.mi ne/2002.mi
../bin/mknecanal 2002
../bin/mknedat   2002
#  Run rrpp
../bin/rrpp 2002.par
../bin/rrpp 2002a.par
../bin/rrpp 2002b.par
../bin/rrpp 2002c.par
../bin/rrpp 2002d.par
#  Run MODFLOW
../bin/mf2k 2002
../bin/mf2k 2002a
../bin/mf2k 2002b
../bin/mf2k 2002c
../bin/mf2k 2002d
#  Summarize stresses by county
../bin/mkcty 2002
#  Run accounting
../bin/acct 2002

Example: Run the model for the year 1995

This example illustrates running the model for a year previously run as part of V12p7.

The -d../v12p7 flag on the mkshead program is used to extract starting heads for the year 1995 from the V12p7 simulation instead of a simulation in the 1994 directory.

The -12p flag on the mkstr, mkinp and acct programs is used to indicate that the V12p7 stream network should be used instead of the V12s stream network. This is necessary in order to reproduce V12p7 results.

Finally note that instead of running the pre-processing programs to produce the state by state input files, links (shortcuts) to the existing V12p7 files are created in the appropriate sub-directories. This approach is required because the Nebraska pre-processing programs only work for 2000 onwards and the Kansas pre-processing programs only work for 2001 onwards. The Colorado pre-processing programs will work for any year, but it is simpler to follow the same approach for all states.

#  Create directories
mkdir -p ppt co ks ne
#  Make starting heads
../bin/mkshead -d../v12p7 1995
#  Make ET package
../bin/mket 1995 > 1995.evt
#  Make stream package
../bin/mkstr -12p 1995 > 1995.str
#  Make BAS, DIS, NAM and PAR files
../bin/mkinp -12p 1995
#  Reuse V12p7 state files
ln -f ../v12p7/co12b/1995.* co
ln -f ../v12p7/ks12b/1995.* ks
ln -f ../v12p7/ne12b/1995.* ne
#  Run rrpp
../bin/rrpp 1995.par
../bin/rrpp 1995a.par
../bin/rrpp 1995b.par
../bin/rrpp 1995c.par
../bin/rrpp 1995d.par
#  Run MODFLOW
../bin/mf2k 1995
../bin/mf2k 1995a
../bin/mf2k 1995b
../bin/mf2k 1995c
../bin/mf2k 1995d
#  Summarize stresses by county
../bin/mkcty 1995
#  Run accounting
../bin/acct -12p 1995

Home | Previous

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