This class implements a test to check the balance closure of water and nitrogen in the simulations. It checks if the initial and final balances of water and nitrogen are equal (or NA) for each USM. If there are discrepancies, it logs a warning with the details of the issue.

Methods


BalanceClosureTest$new()

Create a new BalanceClosureTest object.

Usage

BalanceClosureTest$new(config)

Arguments

config

A Configuration object containing the necessary parameters for the test.


BalanceClosureTest$run()

Run the balance closure test on the simulations. This method loads the simulations data for the specified USMs and checks the balance closure for each USM. It logs the results of the test, including any USMs that have balance closure issues.

Usage

BalanceClosureTest$run()


BalanceClosureTest$clone()

The objects of this class are cloneable with this method.

Usage

BalanceClosureTest$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

if (FALSE) { # \dontrun{
config <- Configuration$new(
  stics_exe = "/path/to/stics",
  metadata_file = "metadata.csv",
  usms_workspace = "path/to/usms_workspace"
)
BalanceClosureTest$new(config)$run()
} # }