DNAPLmodel.check: Check that a DNAPL model is set up correctly

Description Usage Arguments Value Note

View source: R/DNST_model.R


The set up of a DNAPL distribution and dissolution model is fairly detailed (see DNAPLmodel). This function provides an easy way to check that a DNAPL model is set up correctly. If it isn't, a vector of messages is returned that inform the user of all the things that need to be corrected. A DNAPL model that passes this check should work with DNST.


DNAPLmodel.check(d, stop.if.mistakes = TRUE)



DNAPLmodel object to be checked, as given by DNAPLmodel


logical [1]; should R stop executing if there are any mistakes (default TRUE)


A character vector explaining all mistakes in the DNAPL model (d). If there are any mistakes, the session will stop if stop.if.mistakes == TRUE and the mistakes will be printed as error messages.


Some more obscure errors will not be picked up by this function. In the spill.to slot, it is possible to define a cycle of overspilling (e.g. if domain A spills to domain B and domain B spills to domain A, all in the same layer), which could result in an infinite loop during model calculation. This error would not be detected by DNAPLmodel.check.

CJBarry/DNAPL documentation built on Aug. 2, 2017, 6:28 p.m.