A framework to assist creation of marine ecosystem models,
generating either 'R' or 'C++' code which can then be optimised using
the 'TMB' package and standard 'R' tools. Principally designed to
reproduce gadget2 models in 'TMB', but can be extended beyond
gadget2's capabilities.
Kasper Kristensen, Anders Nielsen, Casper W. Berg, Hans Skaug, Bradley M. Bell (2016)
Gadget3 is a framework for producing marine ecosystem models. Gadget3 creates a
R or TMB objective
function for you, that can then be optimised with standard tools such as
nlminb().
Gadget3 is primarily designed to produce models matching the behaviour of gadget2, although implementing new modelling systems would be possible
This package is part of suite of tools, including:
gadget3 is available on CRAN:
> install.packages('gadget3')
You can also install the latest development version from github:
> remotes::install_github('gadget-framework/gadget3')
The gadget3 documentation is available at: https://gadget-framework.github.io/gadget3/
To get started, read the introductory vignette, which walks through the process of building a model.
For some real-life examples of gadget3 models, look in the gadget-models repository:
The documentation for the latest development version is available at: https://gadget-framework.github.io/gadget3-master/
You can install it with:
remotes::install_github("gadget-framework/gadget3")
Tests can be run with R CMD check.
By default, tests are only run against the R backend for speed.
To run against the TMB backend, set the G3_TEST_TMB environment variable, with one of:
Sys.setenv(G3_TEST_TMB = 1) ; source('tests/test-action_grow.R')make, which runs both test & integration tests with G3_TEST_TMBmake test G3_TEST_TMB="2", which runs all TMB testsReleases are made with:
make release NEW_VERSION=0.9-0
git push --tags && git push
On success, upload the tarball to https://cran.r-project.org/submit.html
Gadget3 has received funding from: