Contains abstract super class which implements the basic model interface (bmi) in R.
See https://github.com/eWaterCycle/grpc4bmi for the Python server/client implementation.
From R
devtools::install_github("eWaterCycle/bmi-r")
For Python runner
pip install grpc4bmi[R]
First the model should be wrapped in a basic model interface be subclassing the AbstractBmi class. Then the server can be started with:
run-bmi-server --lang R --path <path to r script with bmi class> --name <bmi class name>
So for example for WALRUS model, see its Dockerfile.
The config file for the bmi initialize function should be put in current working directory and the initialize function should be called with /data/<config filename
.
Rscript -e "devtools::document(roclets=c('rd', 'collate', 'namespace'))"
Rscript -e 'devtools::document()'
R CMD INSTALL .