run.CHILD: Function to run CHILD from the R interface.

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/run.CHILD.R

Description

The function executes a CHILD model run from the R console and creates a S4-object CHILD with all output files. The function requires a compiled version of CHILD and an appropriate input-file.

Usage

1
run.CHILD(inputfile, outfiles = FALSE, path)

Arguments

inputfile

(character scalar) Name of the input file, with extention.

outfiles

(logical scalar) Argument to keep (TRUE) or delete (FALSE) the original output files of the CHILD run, default is FALSE.

path

(character scalar) Optional path to the compiled CHILD executable. If not specified, it is assumed that the executable is present in the current working directory.

Details

Currently, this function is of preliminary stage. It requires a compiled version of CHILD, present at a specified path or the current working directory. Compiled versions for MS Windows 32 Bit and some Mac OS may be downloaded from CSDMS (http://csdms.colorado.edu/wiki/Model:CHILD, scroll down to download, fill the form fields, choose a recent release version and you will find the compiled versions in ChildExercises/Executables_v10). Existing output files will be overwritten without prompting, so be careful and check before running.

Value

A S4-object with all CHILD run output files.

Author(s)

Michael Dietze

References

CSDMS website. http://csdms.colorado.edu/wiki/Model:CHILD.
Tucker, GE. 2010. CHILD Users Guide for version R9.4.1. http://csdms.colorado.edu/mediawiki/images/Child_users_guide.pdf
Tucker, GE., Lancaster, ST., Gasparini, NM., Bras, RL. 2001. The Channel-Hillslope Integrated Landscape Development (CHILD) Model. In Harmon, RS., Doe, W.W. III (eds). Landscape Erosion and Evolution Modeling. Kluwer Academic/Plenum Publishers, pp. 349-388.

See Also

read.CHILD, read.IN, write.IN

Examples

1
2
3
4
5
6
7
# To run example code uncomment it (delete hashes)

# You will need a compiled version of CHILD either in
# the working directory or under a known path.

# hillslope1 <- run.CHILD(dataset = "hillslope1", 
# inputfile = "hillslope1.in")

coffeemuggler/RCHILD documentation built on Dec. 31, 2020, 10:05 p.m.