Skip to content

Commit

Permalink
Merge pull request #94 from csdms/tian-fix_demo_notebooks
Browse files Browse the repository at this point in the history
Tian fix demo notebooks
  • Loading branch information
mdpiper committed Oct 8, 2019
2 parents 1d91ce1 + b1c0821 commit 54bdd80
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 87 deletions.
21 changes: 10 additions & 11 deletions docs/demos/child.ipynb
Expand Up @@ -4,8 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## CHILD Landscape Evolution Model",
"\n",
"## CHILD Landscape Evolution Model\n",
"* Link to this notebook: https://github.com/csdms/pymt/blob/master/docs/demos/child.ipynb\n",
"* Install command: `$ conda install notebook pymt_child`\n",
"\n"
Expand Down Expand Up @@ -71,9 +70,9 @@
}
],
"source": [
"from pymt import plugins\n",
"import pymt.models\n",
"\n",
"model = plugins.Child()"
"model = pymt.models.Child()"
]
},
{
Expand Down Expand Up @@ -542,7 +541,7 @@
"source": [
"for t in range(10):\n",
" model.update()\n",
" print(model.get_current_time())"
" print(model.time)"
]
},
{
Expand Down Expand Up @@ -594,7 +593,7 @@
],
"source": [
"model.update_until(201.5, units='year')\n",
"print(model.get_current_time())"
"print(model.time)"
]
},
{
Expand Down Expand Up @@ -887,7 +886,7 @@
"outputs": [],
"source": [
"dz_dt = .02\n",
"now = model.get_current_time()\n",
"now = model.time\n",
"times, dt = np.linspace(now, now + 5000., 50, retstep=True)\n",
"for time in times:\n",
" model.update_until(time)\n",
Expand Down Expand Up @@ -951,7 +950,7 @@
}
],
"source": [
"model.update_until(model.get_current_time() + 5000.)\n",
"model.update_until(model.time + 5000.)\n",
"model.quick_plot('land_surface__elevation', edgecolors='k', vmin=-200, vmax=200, cmap='BrBG_r')"
]
},
Expand Down Expand Up @@ -986,9 +985,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (pymt)",
"language": "python",
"name": "python3"
"name": "pymt-dev"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -1000,7 +999,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.1"
"version": "3.7.3"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 54bdd80

Please sign in to comment.