-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include install instructions for Python BMI example (#84)
* Split cells for editing * Add install instructions for Python BMI example * Don't forget to activate ivy environment
- Loading branch information
Showing
1 changed file
with
42 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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", | ||
|
@@ -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)" | ||
] | ||
}, | ||
{ | ||
|
@@ -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 | ||
} |