View source: R/utility_tools.R
build_GOTM | R Documentation |
This function compiles GOTM-FABM with FABM source code generated by gen_fabm_code(). It assumes that you allready have run cmake within the build directory
build_GOTM(build_dir, src_dir, fabm_file, funs_file = NULL)
build_dir |
build directory |
src_dir |
GOTM source directory. The directory the GOTM source code was cloned into from github |
fabm_file |
forthran source file for FABM created by gen_fabm_code() |
funs_file |
Path to additional text files containing functions that should be compiled alon with the generateds fortran files |
Johannes Feldbauer
## Not run:
library(readODS)
library(rodeoFABM)
# copy example ods file
example_model <- system.file("extdata/simple_model.ods", package= 'rodeoFABM')
dir.create('example') # Create example folder
file.copy(from = example_model, to = 'example',recursive = TRUE)
setwd('example') # Change working directory to example folder
# read in example ods file
odf_file <- "simple_model.ods"
vars <- read_ods(odf_file,1)
pars <- read_ods(odf_file,2)
funs <- read_ods(odf_file,3)
pros <- read_ods(odf_file,4)
stoi <- read_ods(odf_file,5)
# generate fabm code
gen_fabm_code(vars,pars,funs,pros,stoi,"simple_model.f90",diags = TRUE)
# build GOTM
build_GOTM(build_dir = "../build",fabm_file = "simple_model.f90",
src_dir = "../gotm")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.