gprc4bmi server for WALRUS hydrology model
7.0K
A gprc4bmi server for https://github.com/ClaudiaBrauer/WALRUS implemented in R.
Docker image is build automatically at https://hub.docker.com/r/ewatercycle/walrus-grpc4bmi/
Use client
from grpc4bmi.bmi_client_docker import BmiClientDocker
mymodel = BmiClientDocker(image='ewatercycle/walrus-grpc4bmi', image_port=55555)
docker run -d -p 55555:55555 -v $PWD:/data ewatercycle/walrus-grpc4bmi
wget https://github.com/grpc-ecosystem/polyglot/releases/download/v1.6.0/polyglot.jar
echo '{}' | java -jar polyglot.jar --command=call --endpoint=localhost:55555 --full_method=bmi.BmiService/getComponentName
echo '{config_file:"/data/walrus.yml"}' | java -jar polyglot.jar --command=call --endpoint=localhost:55555 --full_method=bmi.BmiService/initialize
echo '{}' | java -jar polyglot.jar --command=call --endpoint=localhost:55555 --full_method=bmi.BmiService/update
echo '{}' | java -jar polyglot.jar --command=call --endpoint=localhost:55555 --full_method=bmi.BmiService/getCurrentTime
echo '{name:"Q"}' | java -jar polyglot.jar --command=call --endpoint=localhost:55555 --full_method=bmi.BmiService/getValue
All the available methods can be found at https://github.com/eWaterCycle/grpc4bmi/blob/master/proto/bmi.proto
Walrus does not use a config file, but bmi requires it. See ./walrus.yml for example config file which works with https://github.com/ClaudiaBrauer/WALRUS/tree/master/demo/data
docker build -t ewatercycle/walrus-grpc4bmi .
Content type
Image
Digest
Size
477 MB
Last updated
over 5 years ago
docker pull ewatercycle/walrus-grpc4bmi