Closed achubaty closed 2 years ago
I'm not sure about the spinup param / method call because at the bgclib level, the only thing that makes the go and spinup phases different is the provided ini file. Maybe @cboisvenue can add some more insight
The only differences (as far as I know/can tell) between a go INI file and a spinup INI file is the RESTART block, the OUTPUT_CONTROL block, and the DAIL_OUTPUT block. So, in my view, have a "toggle" or a logical parameter that can control the type of run would be a very useful tool. The INI file of the spinup has 0 in the two *_OUTPUT blocks and has c(0,1,1)
instead of c(0,1,1)
. Let me know if there are other concerns about making the control of the type of run (go or spinup) a logical parameter.
Implemented in commit 1ad6f6ce9f59f1cc0e99232cb8b6a2b261ed21d3. However, I did not find how to make the bgcExecuteInternal function "internal" as desired and it is still exported by the package. @achubaty do you know a simple way to do this ? Not closing because not complete yet.
to keep it internal, don't export it.
I removed [[Rcpp::export]]
added @keyword internal
and re-documented the package in 9d6279c75d46348965f8ce4c8376a0fce0e2aa2b.
Ahh apparently need to keep the Rcpp::export so R can use that function. Sorry about that.
It's not exported by R, so does this achieve what you were hoping?
Yes this is what was needed. Thanks. Closing as everything seems done concerning this.
bgcExecute()
==>.bgcExecute()
and make internalbgcExecute()
as a wrapper for.bgcExecute()
, passing defaultargv = "-a"
(others?)spinup
(logical) to this wrapper, or possibly create a similar wrapper to explicitly run the spinup (e.g.,bgcSpinup()
) ?