When properly linked, data and results flow back and forth between WEAP and MODFLOW for each calculation timestep. The following description provides details of exactly what information is passed between WEAP and MODFLOW, and how the process happens.
WEAP reads information from the MODFLOW packages before calculations begin, along with the linkage information that links MODFLOW cells to WEAP objects. Thereafter, at each calculation timestep, WEAP will write out a new set of MODFLOW package files, run MODFLOW, then read the results from the MODFLOW output files. (If you select the option to save all MODFLOW input and output files, the new MODFLOW package files created will be named with !MF! as a prefix and a suffix unique for each scenario, year and timestep. For example, if the original Recharge filename is Zabadani.rch, the new Recharge file written for the Current Accounts (scenario number 1) for March 2000 would be !MF!Zabadani_S01_2000_03.rch. This allows you to inspect or modify the input files and rerun MODFLOW yourself, outside of WEAP. This could be an aid in debugging. However, keep in mind that all these files (any filename starting with !MF!) will be deleted and recreated the next time WEAP calculates results.)
A MODFLOW model consists of many different "packages," most of which are optional. However, not all packages are used or allowed by WEAP.
Used by WEAP: BAS6 (Basic), BCF6 (Block-Centered Flow), DIS (Discretization), DRN (Drain), ETS (Evapotranspiration Segments), EVT (Evapotranspiration), GHB (Ground-Water Flow Process General-Head Boundary), HUF2 (Hydrogeologic Unit Flow), LPF (Layer Property Flow), NAM (Name), OC (Output Control), RCH (Recharge), RIV (River), SWI2 (Seawater Intrusion), UPW (Upstream Weighting), WEL (Well). WEAP reads information from each of these, and will write new versions of the following: NAM, DIS, OC, RCH, RIV, WEL, as explained in MODFLOW Link Technical Details. (The original files will not be changed.) WEAP only requires NAM, DIS, BAS6 and one of BCF6/HUF2/LPF/UPW -- all other packages are optional.
Allowed but not used by WEAP: ADV2 (Advective-Transport Observation), CHD (Time-Variant Specified Head), DE4 (Direct Solution), GAGE, HFB6 (Ground-Water Flow Process Horizontal Flow Barrier), HYD (HYDMOD), IBS (Interbed-Storage), KDEP (Hydraulic-Conductivity Depth-Dependence Capability of the HUF2), LMG (Link-AMG), LVDA (Model-Layer Variable-Direction Horizontal Anisotropy capability of the HUF2), MULT (multiplier), NWT (Netwon Solver), PCG (Preconditioned Conjugate-Gradient), SIP (Strongly Implicit Procedure), SOR (Slice-Successive Over-Relaxation), SUB (Subsidence and Aquifer-System Compaction), ZONE.
Commented out in new name file: (Observation files might reference stress periods after the first, which no longer exist) CHOB (Constant-Head Flow Observation), DROB (Drain Observation), DTOB Drain Return Observation), GBOB (General-Head-Boundary Observation), HOB (Head-Observation), LMT6 (Link-MT3DMS), OBS (Observation Process), RVOB (River Observation), STOB (Streamflow-Routing Observation)
The following describes how WEAP interacts with the MODFLOW packages from the "Used by WEAP" group:
The Name File specifies the names of the input and output files, associates each file name with a unit number and identifies the packages that will be used in the model. WEAP reads the name file first to know which packages are used and which file each one is in. WEAP will write a new NAM file for each timestep it calculates, and include in it new entries for an initial head file, output head file, and a cell-to-cell-flow (CCF) file.
WEAP reads the following information from the Discretization file:
Number of rows, columns and layers
Row and column widths
Time and length units
Number and length of stress periods.
Models with more than one stress period are allowed, but only data from the first stress period will be used by WEAP, with the exception of the GHB package (see below). Time-varying parameters and multiple stress periods are fundamentally opposed to the WEAP-MODFLOW linkage approach, which is that MODFLOW will be run for one stress period, then the results will go back to WEAP, which will write new MODFLOW input files, and then run MODFLOW for the next stress period. When WEAP writes the new DIS package, the length of the stress period will be changed to match the length of the WEAP timestep being calculated. The number of MODFLOW timesteps is not changed. Tip: If the original MODFLOW stress period length is much longer than the WEAP timestep (e.g., annual vs. monthly), you probably want to reduce the number of MODFLOW timesteps per stress period -- it will calculate faster and create smaller files. For example, if the MODFLOW stress period is 365 days and the number of timesteps per stress period is 12 (one per month), because WEAP will change the stress period length to monthly, you probably want to reduce the number of timesteps per stress period to 1 so that it is still monthly.
Which layers have Quasi-3D confining beds below. This information is only used to initially establish individual aquifers in a multi-aquifer system. However, it is up to the user to decide how many aquifers exist and which layers are in which aquifers.
A MODFLOW model can be either transient or steady state. A steady state model is not a good fit to link to WEAP, because it cannot fully capture the changes from the WEAP model.
WEAP reads from the Basic package the locations of active, inactive, and specified head cells and the initial heads in all cells. In addition, BAS specifies if FREE or FIXED formats are used in other packages, and the numeric code to use for no-flow cells (e.g., -999). WEAP writes the initial cell heads to a new binary file, for use in the first WEAP timestep as the initial head for the simulation, and changes the BAS file to refer to this EXTERNAL file. Thereafter, the head results from one WEAP timestep will be used in the next timestep as the initial heads, and the BAS file will be changed to refer to the newly created head file.
The XSECTION tag is not allowed.
The Well package is used to simulate a specified flux to individual cells and specified in units of volume/time. (Values greater than 0 represent flux into the cell (recharge); values less than 0 represent flux out of the cell (pumping).) WEAP reads from the Well package the number and location of well cells, to which it adds any other cells that are linked to land use or demand site pumping or return flow injection in WEAP but not already included in the Well file. You may choose to model some or all pumping, such as pumping for irrigation, as negative recharge (specify 0 as the Pump Layer) in the Recharge package instead of as pumping in the Well package. Conversely, you may choose to model recharge as negative pumping in the Well package instead of as recharge in the Recharge package (specify the layer(s) as the Injection Layer, for demand sites only). When writing the pumping flows in the new Well file for each WEAP timestep, cells that are linked to land use or demand site pumping will have pumping rates calculated by WEAP, whereas cells that are not linked will have the flow rate as specified in the original Well file. The Well package is also modified so that cell-by-cell flow terms will be written to the new CCF file. It is OK if the Well package does not exist in the original MODFLOW model -- WEAP will create a new one.
A demand site cannot pump from a cell that is dry. If all of a demand site's linked cells are dry, then it will not be able to pump any water. If some of the cells are dry and some are not dry, it will automatically pump from the non-dry cells. In the timestep that a cell becomes dry, WEAP will be inconsistent with MODFLOW: WEAP assumes that it is able to pump water from that cell in that timestep, whereas MODFLOW assumes no pumping. (Both are probably incorrect -- there will be some pumping from the cell in that timestep but likely less than the full demand.) If you have linked a demand site's sub-branches to different cells, only those sub-branches linked to dry cells will have their pumping affected.
When linking sub-branches, the abstraction rates for each sub-branch will be proportional to the demand for the sub-branch and the area of cells linked. For example, there are 2 branches A and B. A is linked to 10 cells and B to 4 cells (each cell has equal area). The demand for A is 20; B is 2. A will pump 20 from its 10 cells, while B will only pump 2 from its 4 cells. Therefore, the abstraction rate for A’s cells (2 per cell) will be four times as high as B’s cells (0.5 per cell).
The Recharge package is used to simulate a specified flux distributed over the top of the model and specified in units of length/time. (Values greater than 0 represent flux into the cell (recharge); values less than 0 represent flux out of the cell (pumping).) Within MODFLOW, these rates are multiplied by the horizontal area of the cells to which they are applied to calculate the volumetric flux rates. You may choose to model some or all pumping, such as pumping for irrigation, as negative recharge (specify 0 as the Pump Layer) in the Recharge package instead of as pumping in the Well package. Conversely, you may choose to model recharge as negative pumping in the Well package instead of as recharge in the Recharge package (specify the layer(s) as the Injection Layer, for demand sites only). Initial values of recharge from the Recharge package are ignored, to be replaced by recharge values calculated by WEAP. The Recharge package is also modified so that cell-by-cell flow terms will be written to the new CCF file. It is OK if the Recharge package does not exist in the original MODFLOW model -- WEAP will create a new one. In this case, the recharge will be applied to the highest active cell in each vertical column.
Demand Site return flows and Catchment infiltration become recharge in the Recharge package, to the cells linked to the demand sites (or their sub-branches) or land use branches, in the same proportion (among cells if more than one linked to a demand site or branch) as pumping for demand.
The Drain package is used to simulate head-dependent flux boundaries. In the Drain package if the head in the cell falls below a certain threshold, the flux from the drain to the model cell drops to zero. WEAP reads from the Drain package the number and location of drain cells. The only change made to the Drain package is to specify the new CCF file that cell-by-cell flow terms will be written to.
The River package is used to simulate head-dependent flux boundaries. In the River package if the head in the cell falls below a certain threshold, the flux from the river to the model cell is set to a specified lower bound. The River package includes stage height and river bottom elevation, which are used by MODFLOW to calculate fluxes. In each timestep, WEAP will calculate the stage in the river at each reach linked to a river cell and write a new River file with this new stage value. WEAP's flow-stage-width curve can either specify the stage in relative (where 0 is the river bottom) or absolute terms. If in relative terms, WEAP will add the elevation of the river bottom (RBOT) from the original River file to the calculated stage to derive the absolute stage level. River cells that are not linked to WEAP reaches are written back out unchanged. The River package is also modified so that cell-by-cell flow terms will be written to the new CCF file.
The General-Head Boundary package is used to simulate head-dependent flux boundaries. In the General-Head Boundary package the flux is always proportional to the difference in head. WEAP reads from the GHB package the number and location of general head boundary cells.
By default, as with all MODFLOW packages, WEAP will only use the first stress period of data from the GHB file. However, the GHB package has the option of using some or all of the subsequent stress period data. This could be useful in cases where there are measured or modeled variations in these parameters over time. To use these stress period data, insert one or more comments at the top of the GHB file, using the following syntax. (All MODFLOW comments start with # in column one, and must be the first lines in the file.)
This option tells WEAP to start with the stress period number listed.
# WEAPOPTION:STRESSPERIOD:LAST:<stress period
This option tells WEAP to stop with the stress period number listed. Use -1 to indicate the last stress period in the file.
Use data from every stress period in the file. If there are fewer stress periods than WEAP timesteps in the full planning horizon (Base Year to End Year), WEAP will default to using the last stress period's data for all subsequent WEAP timesteps (defaults to REPEATLAST option). This is equivalent to FIRST:1 and LAST:-1
Use data from the first twelve stress periods in the file (or however many WEAP timesteps are in one year), and repeat it for each year (defaults to CYCLE option). This is equivalent to FIRST:1 and LAST:12 and CYCLE (for a monthly model)
This option tells WEAP to repeat the stress periods' data, in conjunction with the ALL or ANNUAL or FIRST or LAST options.
This option tells WEAP to use the final stress period's data for all subsequent WEAP timesteps if there are fewer stress periods of data in the file than WEAP timesteps. This is the default setting (except if using ANNUAL).
The ALL and ANNUAL options are mutually exclusive, as are the CYCLE and REPEATLAST options.
Some examples and the resulting sequences of stress period data to use (all assuming 18 stress periods of data, and a monthly WEAP model from 2020-2023):
No options specified. Note:
this is equivalent to FIRST:1 and
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,18,18,18,... (defaults to REPEATLAST)
1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,... (defaults to CYCLE)
One and only one of these packages may be used. The only information that WEAP needs from these files is the numeric code for dry cells, e.g., -888. The only change made is to specify the new CCF file that cell-by-cell flow terms will be written to. The UPW package requires MODFLOW-NWT, and if used, the CCF file will automatically be assigned file unit 740. When using the UPW package, MODFLOW will reduce the amount that can be pumped from a cell as the cell's head approaches the bottom of the cell, according to the setting of the PHIRAMP parameter in the WEL package. If the setting (in General, Basic Parameters) for "MODFLOW Pumping if Dry or Inactive Cells" is "Reapportion pumping from dry or inactive cells," then WEAP will ignore these pumping reductions; if the setting is "Do not reapportion," then the reductions will cause WEAP to pump less, resulting in Unmet Demands for the Demand Site or Catchment pumping from the cell. See the Pumping Reduction by Demand Site and Pumping Reduction by Groundwater Node reports to see how much pumping has been reduced due to dry or drying cells.
When an EVT or ETS package is included in a linked MODFLOW model, WEAP will read the evapotranspiration flows from the cell-to-cell flow results file, modify the groundwater mass balance for the linked groundwater nodes accordingly, and include these flow in the Groundwater Inflows and Outflow results. There are also two new MODFLOW results in the Results View: MODFLOW Evapotranspiration Volume and MODFLOW Evapotranspiration Depth. Note: do not link WEAP’s catchment objects to any groundwater cells that are included in the EVT or ETS packages because this will double count the evapotranspiration.
The seawater intrusion (SWI2) Package allows modeling of three-dimensional vertically integrated variable-density groundwater flow and seawater intrusion in coastal multi-aquifer systems. WEAP reads from this package the number of active surfaces and the initial elevations (Zeta) of these active surfaces (Each surface separates different variable density zones.) WEAP writes the initial elevations to new binary files (one for each surface), for use in the first WEAP timestep as the initial elevations for the simulation, and changes the SWI2 file to refer to these files using OPEN/CLOSE. Thereafter, the elevation results from one WEAP timestep will be used in the next timestep as the initial elevations, and the SWI2 file will be changed to refer to the newly created elevations files (one for each surface). WEAP will adjust the fluxes in the cell-by-cell flow file by the terms SWIADDTOFLF, SWIADDTOFRF, and SWIADDTOFFF (which are computed by the SWI2 package), for the lower face (LF), right face (RF), and front face (FF), respectively. Also, the volumetric budget for the entire model includes one new term, SWIADDTOCH, which WEAP will add to the CONSTANT HEAD term, to obtain the correct value for constant head. The results for the Zeta Surface Elevations are available in the Results View as 3-D surface charts. Note: the SWI2 package cannot be used with MODFLOW 2000.
WEAP ignores the original Output Control package (if it exists) and instead creates a new Output Control file, specifying that head and budget results should be saved (for the final MODFLOW timestep), and the file unit to which they are saved.
Parameters are handled in all packages, but will not be written to the new package files. This is because time-varying parameters and multiple stress periods are fundamentally opposed to the WEAP-MODFLOW linkage approach, which is that MODFLOW will be run for one stress period, then the results will go back to WEAP, which will write new MODFLOW input files, and then run MODFLOW for the next stress period.
All MODFLOW format options are supported: FREE and FIXED formats, as well as CONSTANT, INTERNAL, EXTERNAL, LOCAT (fixed) and OPEN/CLOSE.