Skip to content

MAAT installation

walkeranthonyp edited this page Jul 14, 2019 · 1 revision

MAAT installation is simple with the following few easy steps. This guide assumes that you have R and Rstudio installed on your system. Rstudio is used just for unit testing. On a cluster where Rstudio is not installed the unit_testing.R scripts could be run from the command line using to see if any error messages are generated.

All bash commands below are run from within the highest level maat source code directory

To Install MAAT:

  • Fork this repo and then clone your fork to your local machine.

  • Install R package dependencies ('proto', 'XML', 'xtable', 'randtoolbox'), from the command line (or manually run the script within the R console):

Rscript install_dependencies.R
  • Run unit tests (not necessary but will help confirm code is running on your system). Change directory to the system model source directory and open unit_testing.R in RStudio or similar. Make sure RStudio is closed before opening the unit testing script as this will allow the script to be opened in the correct working directory.
cd ./src/system_models/<modelobject>/
rstudio unit_testing.R

or in a Mac terminal

open -na Rstudio unit_testing.R

where <modelobject> is the name of the system model to be tested. The unit testing script can be run line by line to run a number of tests of the model objects. An example from the leaf model object unit_testing.R script to run an ACi curve:

source('leaf_object.R')
leaf_object$.test_aci(leaf.ca_conc=seq(0.1,2000,50))

The MAAT wrapper can also be tested to ensure the wrapper is working correctly and to test the various SA/UQ ensembles provided with MAAT.

cd ./src/
rstudio unit_testing.R

or in a Mac terminal

open -na Rstudio unit_testing.R

Clone this wiki locally