rmf_plot.modflow plots a 2D section through a MODFLOW model showing the IBOUND array and discrete boundary conditions.

# S3 method for modflow
rmf_plot(
  modflow,
  i = NULL,
  j = NULL,
  k = NULL,
  omit = NULL,
  to_k = FALSE,
  gridlines = TRUE,
  prj = rmf_get_prj(modflow),
  legend = "",
  crop = FALSE,
  size = 1,
  ...
)

Arguments

modflow

RMODFLOW modflow model

i

row number to plot

j

column number to plot

k

layer number to plot

omit

character vector with MODFLOW ftypes specifying which packages to omit from the plot. Defaults to plotting all packages.

to_k

logical; if a layer section is plotted (k is given), reproject all boundary conditions (not IBOUND) to the layer? Defaults to FALSE.

gridlines

logical; should grid lines be plotted? alternatively, provide colour of the grid lines. Defaults to TRUE.

prj

projection file object

legend

character denoting the legend of the plot. Defaults to ''.

crop

logical; should plot be cropped by dropping NA values; defaults to FALSE

size

numeric; size of the HFB line if present in modflow. Default to 1.

...

parameters provided to plot.rmf_3d_array

Value

ggplot2 object or layer; if plot3D is TRUE, nothing is returned and the plot is made directly

Details

Only the IBOUND and the locations of the discrete boundary condition packages are plotted. to_k only reprojects boundary condition cells, not IBOUND cells, to layer k. It is not used when k is not defined. This is useful to plot all boundary condition cells even if they are not present in the current layer k, e.g. wells in deeper layers.

Examples

m <- rmf_example_file('water-supply-problem.nam') %>% rmf_read(verbose = FALSE) rmf_plot(m, k = 1)
rmf_plot(m, j = 33, gridlines = FALSE)
m2 <- rmf_example_file('rocky-mountain-arsenal.nam') %>% rmf_read(verbose = FALSE) rmf_plot(m2, k = 1, legend = 'Type')
rmf_plot(m2, k = 1, legend = 'Type', omit = 'WEL')
m3 <- rmf_example_file('example-model.nam') %>% rmf_read(verbose = FALSE) rmf_plot(m3, k = 1)
rmf_plot(m3, k = 2)
# reproject boundary conditions (all in layer 1) to layer 2 rmf_plot(m3, k = 2, to_k = TRUE)