Skip to content

Commit

Permalink
update for model v1.0.3 (#3)
Browse files Browse the repository at this point in the history
* updated model version number to 1.0.3

* fixed model version, re-enabled CIR & misc other fixes

re-enabled CIR snapshots; fixed some erroneous comments; added more progress_bar_loading text outputs;

* fixed model version

Now interface reads model version from model code. Moved where model version appears in interface.

* commented out code for CIR comparison
  • Loading branch information
Mason Inman committed Oct 29, 2018
1 parent 388f8ba commit 248462f
Show file tree
Hide file tree
Showing 3 changed files with 533 additions and 89 deletions.
4 changes: 2 additions & 2 deletions WCI_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#
# ## Developed by [Near Zero](http://nearzero.org)
#
# ### Version 1.0.2 (Oct 18, 2018)
# ### Version 1.0.3 (Oct 26, 2018)
#
# This model simulates the supply-demand balance of the Western Climate Initiative cap-and-trade program, jointly operated by California and Quebec.
#
Expand Down Expand Up @@ -145,7 +145,7 @@ class Prmt():

def __init__(self):

self.model_version = '1.0.1'
self.model_version = '1.0.3'

self.online_settings_auction = True # will be overridden below for testing; normally set by user interface
self.years_not_sold_out = () # set by user interface
Expand Down
27 changes: 19 additions & 8 deletions WCI_model_interface.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
{
"cell_type": "markdown",
"metadata": {
"hide_input": false
"deletable": false,
"editable": false,
"hide_input": false,
"run_control": {
"frozen": true
}
},
"source": [
"<img src=\"images/Near_Zero_logo_tiny.jpg\" alt=\"Drawing\" align=\"right\" style=\"width: 200px\"/>\n",
Expand All @@ -12,8 +17,6 @@
"\n",
"## Developed by [Near Zero](http://nearzero.org)\n",
"\n",
"### Version 1.0.2\n",
"\n",
"This model simulates the supply-demand balance of the Western Climate Initiative cap-and-trade program, jointly operated by California and Quebec.\n",
"\n",
"This interactive online version of the model allows you simulate a range of supply-demand scenarios through 2030, as determined by three core assumptions about the future:\n",
Expand Down Expand Up @@ -48,11 +51,10 @@
"\n",
"# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
"\n",
"# set new value for online parameter; overrides value that was set by model file imported above\n",
"# override values that may be in notebook file, to ensure that model runs work as desired\n",
"model.prmt.online_settings_auction = True\n",
"\n",
"# override value that may be in notebook file\n",
"model.prmt.run_hindcast = False\n",
"model.prmt.run_tests = False\n",
"\n",
"# when supply-demand button clicked, perform action\n",
"model.supply_demand_button.on_click(model.supply_demand_button_on_click)\n",
Expand All @@ -71,7 +73,7 @@
"# ~~~~~~~~~~~~~\n",
"# what appears after clear_output:\n",
"\n",
"model_results_text = \"<h3>model results for California and Quebec</h3>\"\n",
"model_results_text = f\"<h3>results for California and Quebec</h3><h4>(model version {model.prmt.model_version})</h4>\"\n",
"\n",
"model_results_header = widgets.HTML(value=model_results_text) \n",
"display(model_results_header)\n",
Expand All @@ -91,7 +93,8 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"init_cell": true
"init_cell": true,
"scrolled": false
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -123,6 +126,7 @@
},
"source": [
"---\n",
"\n",
"© Copyright 2018 by [Near Zero](http://nearzero.org). This work is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/).\n",
"\n",
"Mason Inman (minman@nearzero.org) is the project manager and technical lead for the development of this model.\n",
Expand All @@ -135,6 +139,13 @@
"\n",
"**About Near Zero**: Near Zero is a non-profit environmental research organization based at the Carnegie Institution for Science on the Stanford University campus. Near Zero provides credible, impartial, and actionable assessment with the goal of cutting greenhouse gas emissions to near zero."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit 248462f

Please sign in to comment.