Description Usage Arguments Author(s) See Also Examples
View source: R/write.DRNpackage.R
Writes Modflow-USG Drain Package
1 | write.DRNpackage(drndf, filename, nSPs, IDRNCB, SPwarnings = T)
|
drndf |
DataFrame/Geometry of drain nodes as returned by |
filename |
character, name/location of output file |
nSPs |
integer, number of stress periods in simulation |
IDRNCB |
integer, CBB flow flag. See details (or PBJ package manual) for more info |
SPwarnings |
T/F (optional) turn on (True) or off (False) warnings about reused or missing SP data |
Leland Scantlebury
calc_stream_drn
write.PBJpackage
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #-- Read in shapefiles
stream <- read_sf(system.file("extdata", "straight_river.shp", package = "pbjr"))
tri <- read_sf(system.file("extdata", "straight_triangles.shp", package = "pbjr"))
vor <- read_sf(system.file("extdata", "straight_voronoi.shp", package = "pbjr"))
#-- Explode polyline
stream <- line_explode(stream)
#-- Create DRNDF
drndf <- calc_stream_drn(stream = stream, voronoi = vor)
#-- Add conductance
drndf$cond1 <- calc_conductance_modflow(drndf, k_streambed = 1,
str_width = 1, thickness = 0.5)
#-- Add elevation
drndf$elev1 <- 90.0
#-- Write file
write.DRNpackage(drndf, filename = paste0(tempdir(),'/straight_model.drn'), nSPs=2, IDRNCB=50)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.