read.WEL: Read well (WEL) package file

Description Usage Arguments Value Examples

Description

Reads information from a MODFLOW WEL package file. The WEL package assigns fixed sink/ source fluxes to individual cells and as such is particularly appropriate for representing wells of known abstraction or injection rate.

Usage

1
read.WEL(filename, nSP, MF2k = TRUE)

Arguments

filename

character string; WEL package file

nSP

integer [1] or DIS.MFpackage object; number of stress periods or corresponding DIS package from which this can be read

MF2k

logical [1]; is this a MODFLOW 2000+ WEL package?

Value

list [2] of class WEL.MFpackage, with elements:
$header:
..$MXACTW the maximum number of active wells in a stress period
..$IWELCB unit number to which well flux array is saved (if > 0)
$spheaders:
headers for each stress period, a data.frame with columns:
..$ITMP (int): number of active wells in stress period, or (if < 0)
indicates to read from previous stress period
..$NP (int): number of parameters to read for this stress period (always 0 if MF2k = FALSE)
$read: logical vector of length nSP indicating for which stress periods well information is to be read
$data:
a data.table with the following columns
..$sp (int): stress period (key)
..$C (int): column
..$R (int): row
..$L (int): layer
..$Q (num): flux (negative indicates abstraction, positive indicates injection)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
fnms <- system.file(c("rflow_mf_demo.dis",
                      "rflow_mf_demo.wel"), package = "Rflow")

# get model information from DIS package file
dis <- read.DIS(fnms[1L])

wel <- read.WEL(fnms[2L], dis)
# or, if you already know how many stress periods there are
wel <- read.WEL(fnms[2L], 15L)

class(wel)
str(wel)

CJBarry/Rflow documentation built on June 16, 2019, 12:35 p.m.