csdms / bmi

The Basic Model Interface is a standardized set of functions allowing coupling of models to models and models to data
https://bmi.csdms.io
MIT License
49 stars 17 forks source link

Questions related to making the terrainbento BMI #44

Closed kbarnhart closed 4 years ago

kbarnhart commented 5 years ago

@mdpiper @mcflugen

I'm working on the PyMT compatible BMI for terrainbento (PR 137 in that repo). I'm basing it off of

I have a couple of questions...

1) Is it reasonable to expect that eventually this repository will be packaged and distributed so that I can include it as a dependency and ensure I am always using an up-to-date bmi.py via something like from bmi import BMI (where bmi is the installed package)? 2) Based on conversations with @mcflugen I was under the impression that it was necessary to expose information about the input parameters (as opposed to state variables) to each model (as well as default values, reasonable ranges, etc). But I don't see anything like this in bmi.py. Can I get a recommendation? 3) If I create a bmi that inherits from bmi.py is it by definition compatible with PyMT. Or are there additional things I should expect to do?

mdpiper commented 4 years ago

@kbarnhart I think we've addressed the questions you've raised.

  1. The csdms/bmi-python repo is used to create the bmipy package, which can be installed from pip, conda, or source. The Python BMI can be imported from this package with from bmipy import Bmi. The package is versioned, so you'll know which version of BMI you're using.
  2. Model parameters only need to be described in pymt, not in the model BMI.
  3. The bmipy package isn't used yet in our workflow for building pymt components, but it will be. I think it's safe to state that using bmipy will ensure that your model BMI is pymt-compatible.
mdpiper commented 4 years ago

The three questions posed by @kbarnhart have been addressed. Closing.