Description Usage Arguments Value Examples
Run one or several MACRO Simulation(s)
1 2 3 4 5 6 7 8 9 10 11 12 13 | rmacroliteRun(x, f = NULL, export = TRUE, verbose = 1L, ...)
## S3 method for class 'character'
rmacroliteRun(x, f = NULL, export = TRUE,
verbose = 1L, ...)
## S3 method for class 'macroParFile'
rmacroliteRun(x, f = NULL, export = TRUE,
verbose = 1L, indump = TRUE, run = TRUE, rename = FALSE, ...)
## S3 method for class 'macroParFileList'
rmacroliteRun(x, f = NULL, export = TRUE,
verbose = 1L, ...)
|
x |
A |
f |
Single character string. When |
export |
Single logical value. If |
verbose |
Single integer value. If set to a value |
... |
Additional parameters passed to specific methods. |
indump |
Single logical value. If |
run |
Single logical value. If |
rename |
Single logical value. If |
Returns a data.frame
with the simulation results,
a column date
and if relevant a column runId
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | library( "rmacrolite" )
# # Setup MACRO directory (if needed)
# rmacroliteSetModelVar( "C:/swash/macro" )
# Import a par-file
# Path to an example par-file
par_file_path <- system.file( "par-files",
"chat_winCer_GW-X_900gHa_d182_1910-1911.par",
package = "rmacrolite" )
# Import the example par-file
par_file <- rmacroliteImportParFile(
file = par_file_path )
# Run the simulation
out <- rmacroliteRun( x = par_file )
# Inspect the results
# View the water and solute balance as output by MACRO
# attributes( out ) # full list of attributes
attr( x = out, which = "waterSoluteBalance" )
library( "macroutils2" )
macroPlot( x = out[, c( "Date", "WOUT_99-100_100",
"SFLOW_99-100_100" ) ], gui = FALSE, subPlots = TRUE )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.