Skip to content

Commit

Permalink
Include install instructions for Python BMI example (#84)
Browse files Browse the repository at this point in the history
* Split cells for editing

* Add install instructions for Python BMI example

* Don't forget to activate ivy environment
  • Loading branch information
mdpiper authored Oct 14, 2022
1 parent 16f9a22 commit 6f4eee3
Showing 1 changed file with 42 additions and 7 deletions.
49 changes: 42 additions & 7 deletions lessons/bmi/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,40 @@
"source": [
"# The Basic Model Interface (BMI)\n",
"\n",
"The Basic Model Interface (BMI) is a set of functions for querying, modifying, and running models. A BMI is added, noninvasively, to a model. We'll explore how BMI works with a pair of Jupyter Notebooks.\n",
"The Basic Model Interface (BMI) is a set of functions for querying, modifying, and running models. A BMI is added, noninvasively, to a model. We'll explore how BMI works with a pair of Jupyter Notebooks."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"*Note:* The notebooks in this lesson require the *heat* package from the [Python BMI example](https://github.com/csdms/bmi-example-python) repository.\n",
"Unlike other models and tools used in Ivy, we have to install this package from source.\n",
"\n",
"*Note:* The *heat* package from the [Python BMI example](https://github.com/csdms/bmi-example-python) repository is required for these examples.\n",
"Start by activating the `ivy` environment:\n",
"```\n",
"$ conda activate ivy\n",
"```\n",
"Recall than on Linux and macOS, you may have to use `source` instead of `conda`.\n",
"\n",
"Next, change to your home (or another convenient) directory and clone the example repository:\n",
"```\n",
"$ cd\n",
"$ git clone [email protected]:csdms/bmi-example-python.git\n",
"```\n",
"Then change to the repository directory and install the package with `pip`:\n",
"```\n",
"$ cd bmi-example-python\n",
"$ pip install -e .\n",
"```\n",
"\n",
"The example has already been installed on the OpenEarthscape JupyterHub.\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* [Run the *Heat* model](bmi-run-model.ipynb)\n",
" * View model source code\n",
" * Set up the model\n",
Expand All @@ -27,13 +57,18 @@
" * View model BMI source code\n",
" * Set up the model through its BMI\n",
" * Run the model\n",
" * View output\n",
"\n",
" * View output"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Additional information:\n",
" * [BMI documentation](https://bmi.readthedocs.io)\n",
" * [BMI repository](https://github.com/csdms/bmi)\n",
" * [Python BMI specification](https://github.com/csdms/bmi-python)\n",
" * [Python BMI example](https://github.com/csdms/bmi-example-python)\n"
" * [Python BMI example](https://github.com/csdms/bmi-example-python)"
]
},
{
Expand All @@ -60,9 +95,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.6"
"version": "3.9.7"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}

0 comments on commit 6f4eee3

Please sign in to comment.