Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/UpdateWaterBudget.R
This function determines the specified-flow boundary conditions for the groundwater-flow model. These boundary conditions include: (1) natural and incidental groundwater recharge at the water table, (2) groundwater pumping at production wells, and (3) groundwater underflow in the major tributary valleys. Specified-flow values are saved to disk by rewriting the MODFLOW Well Package file (‘.wel’). Note that this function is executed after each iteration of PEST.
1 2 3 4 5 6 7 8 9 10 11 12 13 | UpdateWaterBudget(
dir.run,
id,
qa.tables = c("none", "si", "english"),
ss.interval = NULL,
iwelcb = ifelse(interactive(), 50L, 0L),
canal.seep = wrv::canal.seep,
efficiency = wrv::efficiency,
gage.disch = wrv::gage.disch,
pod.wells = wrv::pod.wells,
tributaries = wrv::tributaries,
...
)
|
dir.run |
character. Path name of the directory to read/write model files. |
id |
character. Short identifier (file name) for model files. |
qa.tables |
character. Indicates if quality assurance tables are written to disk; by default "none" of these tables are written. Values of "si" and "english" indicate that table values are written in metric and English units, respectively. |
ss.interval |
Date or character.
Vector of length 2 specifying the start and end dates for the period used to
represent steady-state boundary conditions.
That is, recharge values for stress periods coinciding with this time period are
averaged and used as steady-state boundary conditions.
The required date format is YYYY-MM-DD.
This argument overrides the |
iwelcb |
integer.
A flag and unit number.
If equal to zero, the default, cell-by-cell flow terms resulting from
conditions in the MODFLOW Well Package will not be written to disk.
A value of 0 is appropriate for model calibration,
where MODFLOW run times are kept as short as possible.
If greater than zero, the cell-by-cell flow terms are written to disk.
See the MODFLOW Name File (‘*.nam’) for the unit number associated with
the budget file (‘*.bud’).
The default value is 50 (value specified in the |
canal.seep |
data.frame.
See |
efficiency |
data.frame.
See |
gage.disch |
data.frame.
See |
pod.wells |
SpatialPointsDataFrame.
See |
tributaries |
SpatialPolygonsDataFrame.
See |
... |
Arguments to be passed to |
Files read during execution, and located within the dir.run
directory,
inlcude the MODFLOW hydraulic conductivity reference files ‘hk1.ref’,
‘hk2.ref’, and ‘hk3.ref’ corresponding to model layers 1, 2, and 3, respectively.
Hydraulic conductivity values are read from a two-dimensional array in
matrix format with ‘white-space’ delimited fields.
And a binary data file ‘model.rda’ containing the following serialized R objects:
rs
, misc
, trib
, tr.stress.periods
, and ss.stress.periods
.
rs
is an object of RasterStack class with raster layers “lay1.top”,
“lay1.bot”, “lay2.bot”, and “lay3.bot”.
These raster layers describe the geometry of the model grid; that is,
the upper and lower elevation of model layer 1, and the bottom elevations of model layers 2 and 3.
Missing cell values (equal to NA) indicate inactive model cells lying outside of the model domain.
misc
is a data.frame object with miscellaneous seepage,
such as from the ‘Bellevue Waste Water Treatment Plant ponds’ and the ‘Bypass Canal’.
This object is comprised of the following components:
lay, row, col are integer values specifying a
model cell's layer, row, and column index, respectively; and
ss, 199501, 199502, ..., 201012 are numeric values of
elevation during each stress period, respectively,
in meters above the North American Vertical Datum of 1988.
trib
is a data.frame object with default values for the
long-term mean underflows in each of the tributary basins.
The object is comprised of the following components:
Name is a unique identifier for the tributary basin;
lay, row, col are integer
values of a
model cell's layer, row, and column index, respectively; and
ss, 199501, 199502, ..., 201012 are numeric values of
underflow during each stress period, respectively, in cubic meters per day.
tr.stress.periods
is a vector of Date values giving the start and end dates for
stress periods in the model simulation period (1995–2010).
ss.stress.periods
is a vector of Date values giving the start and end dates for
stress periods used to define steady-state conditions.
reduction
is a numeric default value for the signal amplitude reduction algorithm,
a dimensionless quantity.
d.in.mv.ave
is a numeric default value for the number of days in the
moving average subset.
Returns an object of difftime class, the runtime for this function. Used for the side-effect of files written to disk.
A MODFLOW Well Package file ‘<id>.wel’ is always written to disk; whereas, parameter estimation files ‘seep.csv’, ‘eff.csv’, and ‘trib.csv’, and a script file ‘UpdateBudget.bat’, are only written if they do not already exist. The script file may be used to automate the execution of this function from a file manager (such as, Windows Explorer).
The ‘seep.csv’ file stores as tabular data the canal seepage fraction for each of the irrigation entities. Its character and numeric data fields are delimited by commas (a comma-separated-value [CSV] file). The first line is reserved for field names “EntityName” and “SeepFrac”.
The ‘eff.csv’ file stores as tabular data the irrigation efficiency for each of the irrigation entities. Its character and numeric data fields are delimited by commas. The first line is reserved for field names “EntityName” and “Eff”.
The ‘trib.csv’ file stores as tabular data the underflow boundary conditions for
each tributary basin.
Its character and numeric data fields are delimited by commas.
The first line is reserved for field names “Name” and “Value”.
Data records include a long-term mean flow multiplier for
each of the tributary basins (name is the unique identifier for the tributary),
a record for the amplitude reduction (reduction
), and
a record for the number of days in the moving average (d.in.mv.ave
).
If the qa.tables
argument is specified as either “si” or “english”,
quality assurance tables are written to disk as CSV files (‘qa-*.csv’).
Volumetric flow rate data within these tables is described in the
‘Value’ section of the RunWaterBalance
function;
see returned list components natural.rech
, inciden.rech
, and pumping.rech
.
The well configuration data are described in the ‘Value’ section of the
GetWellConfig
function.
J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center
RunWaterBalance
, GetSeasonalMult
1 2 3 4 5 6 | ## Not run:
dir.run <- file.path(getwd(), "model/model1")
UpdateWaterBudget(dir.run, "wrv_mfusg", qa.tables = "si",
ss.interval = c("1998-01-01", "2011-01-01"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.