plotWater {SoPhy}R Documentation

Plotting the result of SWMS2D

Description

the function plots the H, Q, theta, vx, vz, or conc, stored in a list as in the output of SWMS2D

Usage

plotWater(h, instance,
          what=c("H", "Q", "theta", "vx", "vz", "Conc", "logH"),
          col.txt="black",
          col.simu=if (is.null(h$col.simu)) rainbow(100) else
                   if (what.nr == 7) rev(h$col.simu) else h$col.simu,
          col.exception = c("yellow", "darkred"), lim=1,
          titl=TRUE, line=0.2, quadratic=TRUE, cex=1, cex.leg=0.8,
          legend = TRUE, ylim, zlim)

Arguments

h a list as returned by swms2d or a list as returned by xswms2d; usually create.waterflow has been called beforehand.
instance the number of the time point for which the data should be plotted. If missing or NULL the last one is taken.
what character. what gives the parameter to be plotted:
H
water potential H,
Q
discharge/recharge rates Q for internal sink/sources,
theta
water contents theta,
vx
x-components of the Darcian flux vector vx,
vz
z-components of the Darcian flux vector vz,
Conc
solute concentration
logH
log of -H,
The parameter what allows also the numbers 1,...,7 corresponding to “H”,...,“logH”.
col.txt colour of the title
col.simu colour spectrum of the simulated field of H, Q, theta, vx, vz, or conc; areas of stones or air are white.
col.exception vector of 2 components; colour plotted values that are below or above the given range, see zlim; for what="logH" and positive water potential, col.exception[1] is plotted.
lim value in [0,1] that is used only if zlim is missing or NULL; the range zlim of the plotted values depends on what. Let q(p) be the p-quantile of the values. Then
  • H : zlim=[q(1-lim); 0]
  • theta : zlim=range({0, theta_{s,i}}, max(h$hQThFlC)), where the i runs over all horizons and polygons. That is, the range is independent of the value of lim. See xswms2d for theta_s.
  • Conc : zlim=[0, q(lim)]
  • logH : zlim=[q(1-lim), 1]
  • otherwise : zlim=[q(1-lim), q(lim)]

quantile for the upper bound of the values of the random field; this variable should be less than 1 if the random field contains some extreme values, since the colour scale is linear
titl logical or character. If TRUE a title is plotted using the colour col.txt
line parameter of function title
quadratic logical. If TRUE the figure matrix is enlarged and filled with NA symmetrically in x-direction or on the bottom in y-direction such the matrix (and the figure) become quadratic
cex A numerical value giving the amount by which the title text, the points indicating the root segments, the axes and labels of the axes should be scaled relative to the default
cex.leg A numerical value giving the amount by which the legend text should be scaled relative to the default
legend logical. If TRUE a legend is added.
ylim missing or vector of two components. If missing the range of the simulation is used.
zlim missing or vector of two components. Values below zlim[1] are plotted in col.exception[1], values above zlim[2] are plotted in col.exception[2]. If missing or NULL the vector zlim is calculated by means of lim.

Details

For all variables the plot is over the whole range except for the following cases. If theta is plotted, the minimum is 0 and the maximum the maximal field capacity, If H is plotted, the maximum is at most 0.

Value

matrix of the plotted values if no error has occured and an error message otherwise.

Author(s)

Martin Schlather, martin.schlather@math.uni-goettingen.de http://www.stochastik.math.uni-goettingen.de/institute

See Also

plotRF, xswms2d

Examples

   ## see  create.waterflow
  

[Package SoPhy version 1.0.34 Index]