Date: Tue, 26 Mar 2024 16:02:24 -0700
Subject: [PATCH 16/20] Algae Testing
13 passing tests
---
examples/model_architecture_nsm.ipynb | 601 ++++++++++--------
.../nsm1/algae/processes.py | 8 +-
src/clearwater_modules/nsm1/model.py | 2 +
src/clearwater_modules/nsm1/processes.py | 33 +-
tests/test_6_nsm_module.py | 38 +-
tests/test_7_nsm_algae_calculations.py | 545 +++++++++++++++-
6 files changed, 901 insertions(+), 326 deletions(-)
diff --git a/examples/model_architecture_nsm.ipynb b/examples/model_architecture_nsm.ipynb
index 84b6f56..0bf5dbb 100644
--- a/examples/model_architecture_nsm.ipynb
+++ b/examples/model_architecture_nsm.ipynb
@@ -48,15 +48,122 @@
},
"outputs": [
{
- "ename": "ModuleNotFoundError",
- "evalue": "No module named 'clearwater_modules'",
- "output_type": "error",
- "traceback": [
- "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
- "\u001b[1;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
- "Cell \u001b[1;32mIn[1], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mclearwater_modules\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mcwm\u001b[39;00m\n\u001b[0;32m 2\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mclearwater_modules\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01msorter\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01msorter\u001b[39;00m\n\u001b[0;32m 3\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mnumba\u001b[39;00m\n",
- "\u001b[1;31mModuleNotFoundError\u001b[0m: No module named 'clearwater_modules'"
- ]
+ "data": {
+ "application/javascript": "(function(root) {\n function now() {\n return new Date();\n }\n\n var force = true;\n var py_version = '3.3.4'.replace('rc', '-rc.').replace('.dev', '-dev.');\n var reloading = false;\n var Bokeh = root.Bokeh;\n\n if (typeof (root._bokeh_timeout) === \"undefined\" || force) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks;\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, js_modules, js_exports, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n if (js_modules == null) js_modules = [];\n if (js_exports == null) js_exports = {};\n\n root._bokeh_onload_callbacks.push(callback);\n\n if (root._bokeh_is_loading > 0) {\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls.length === 0 && js_modules.length === 0 && Object.keys(js_exports).length === 0) {\n run_callbacks();\n return null;\n }\n if (!reloading) {\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n }\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n window._bokeh_on_load = on_load\n\n function on_error() {\n console.error(\"failed to load \" + url);\n }\n\n var skip = [];\n if (window.requirejs) {\n window.requirejs.config({'packages': {}, 'paths': {'jspanel': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/jspanel', 'jspanel-modal': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/modal/jspanel.modal', 'jspanel-tooltip': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/tooltip/jspanel.tooltip', 'jspanel-hint': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/hint/jspanel.hint', 'jspanel-layout': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/layout/jspanel.layout', 'jspanel-contextmenu': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/contextmenu/jspanel.contextmenu', 'jspanel-dock': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/dock/jspanel.dock', 'gridstack': 'https://cdn.jsdelivr.net/npm/gridstack@7.2.3/dist/gridstack-all', 'notyf': 'https://cdn.jsdelivr.net/npm/notyf@3/notyf.min'}, 'shim': {'jspanel': {'exports': 'jsPanel'}, 'gridstack': {'exports': 'GridStack'}}});\n require([\"jspanel\"], function(jsPanel) {\n\twindow.jsPanel = jsPanel\n\ton_load()\n })\n require([\"jspanel-modal\"], function() {\n\ton_load()\n })\n require([\"jspanel-tooltip\"], function() {\n\ton_load()\n })\n require([\"jspanel-hint\"], function() {\n\ton_load()\n })\n require([\"jspanel-layout\"], function() {\n\ton_load()\n })\n require([\"jspanel-contextmenu\"], function() {\n\ton_load()\n })\n require([\"jspanel-dock\"], function() {\n\ton_load()\n })\n require([\"gridstack\"], function(GridStack) {\n\twindow.GridStack = GridStack\n\ton_load()\n })\n require([\"notyf\"], function() {\n\ton_load()\n })\n root._bokeh_is_loading = css_urls.length + 9;\n } else {\n root._bokeh_is_loading = css_urls.length + js_urls.length + js_modules.length + Object.keys(js_exports).length;\n }\n\n var existing_stylesheets = []\n var links = document.getElementsByTagName('link')\n for (var i = 0; i < links.length; i++) {\n var link = links[i]\n if (link.href != null) {\n\texisting_stylesheets.push(link.href)\n }\n }\n for (var i = 0; i < css_urls.length; i++) {\n var url = css_urls[i];\n if (existing_stylesheets.indexOf(url) !== -1) {\n\ton_load()\n\tcontinue;\n }\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error;\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n } if (((window['jsPanel'] !== undefined) && (!(window['jsPanel'] instanceof HTMLElement))) || window.requirejs) {\n var urls = ['https://cdn.holoviz.org/panel/1.3.8/dist/bundled/floatpanel/jspanel4@4.12.0/dist/jspanel.js', 'https://cdn.holoviz.org/panel/1.3.8/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/modal/jspanel.modal.js', 'https://cdn.holoviz.org/panel/1.3.8/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/tooltip/jspanel.tooltip.js', 'https://cdn.holoviz.org/panel/1.3.8/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/hint/jspanel.hint.js', 'https://cdn.holoviz.org/panel/1.3.8/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/layout/jspanel.layout.js', 'https://cdn.holoviz.org/panel/1.3.8/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/contextmenu/jspanel.contextmenu.js', 'https://cdn.holoviz.org/panel/1.3.8/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/dock/jspanel.dock.js'];\n for (var i = 0; i < urls.length; i++) {\n skip.push(urls[i])\n }\n } if (((window['GridStack'] !== undefined) && (!(window['GridStack'] instanceof HTMLElement))) || window.requirejs) {\n var urls = ['https://cdn.holoviz.org/panel/1.3.8/dist/bundled/gridstack/gridstack@7.2.3/dist/gridstack-all.js'];\n for (var i = 0; i < urls.length; i++) {\n skip.push(urls[i])\n }\n } if (((window['Notyf'] !== undefined) && (!(window['Notyf'] instanceof HTMLElement))) || window.requirejs) {\n var urls = ['https://cdn.holoviz.org/panel/1.3.8/dist/bundled/notificationarea/notyf@3/notyf.min.js'];\n for (var i = 0; i < urls.length; i++) {\n skip.push(urls[i])\n }\n } var existing_scripts = []\n var scripts = document.getElementsByTagName('script')\n for (var i = 0; i < scripts.length; i++) {\n var script = scripts[i]\n if (script.src != null) {\n\texisting_scripts.push(script.src)\n }\n }\n for (var i = 0; i < js_urls.length; i++) {\n var url = js_urls[i];\n if (skip.indexOf(url) !== -1 || existing_scripts.indexOf(url) !== -1) {\n\tif (!window.requirejs) {\n\t on_load();\n\t}\n\tcontinue;\n }\n var element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error;\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n for (var i = 0; i < js_modules.length; i++) {\n var url = js_modules[i];\n if (skip.indexOf(url) !== -1 || existing_scripts.indexOf(url) !== -1) {\n\tif (!window.requirejs) {\n\t on_load();\n\t}\n\tcontinue;\n }\n var element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error;\n element.async = false;\n element.src = url;\n element.type = \"module\";\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n for (const name in js_exports) {\n var url = js_exports[name];\n if (skip.indexOf(url) >= 0 || root[name] != null) {\n\tif (!window.requirejs) {\n\t on_load();\n\t}\n\tcontinue;\n }\n var element = document.createElement('script');\n element.onerror = on_error;\n element.async = false;\n element.type = \"module\";\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n element.textContent = `\n import ${name} from \"${url}\"\n window.${name} = ${name}\n window._bokeh_on_load()\n `\n document.head.appendChild(element);\n }\n if (!js_urls.length && !js_modules.length) {\n on_load()\n }\n };\n\n function inject_raw_css(css) {\n const element = document.createElement(\"style\");\n element.appendChild(document.createTextNode(css));\n document.body.appendChild(element);\n }\n\n var js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-3.3.4.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.3.4.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.3.4.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.3.4.min.js\", \"https://cdn.holoviz.org/panel/1.3.8/dist/panel.min.js\"];\n var js_modules = [];\n var js_exports = {};\n var css_urls = [];\n var inline_js = [ function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\nfunction(Bokeh) {} // ensure no trailing comma for IE\n ];\n\n function run_inline_js() {\n if ((root.Bokeh !== undefined) || (force === true)) {\n for (var i = 0; i < inline_js.length; i++) {\n\ttry {\n inline_js[i].call(root, root.Bokeh);\n\t} catch(e) {\n\t if (!reloading) {\n\t throw e;\n\t }\n\t}\n }\n // Cache old bokeh versions\n if (Bokeh != undefined && !reloading) {\n\tvar NewBokeh = root.Bokeh;\n\tif (Bokeh.versions === undefined) {\n\t Bokeh.versions = new Map();\n\t}\n\tif (NewBokeh.version !== Bokeh.version) {\n\t Bokeh.versions.set(NewBokeh.version, NewBokeh)\n\t}\n\troot.Bokeh = Bokeh;\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n }\n root._bokeh_is_initializing = false\n }\n\n function load_or_wait() {\n // Implement a backoff loop that tries to ensure we do not load multiple\n // versions of Bokeh and its dependencies at the same time.\n // In recent versions we use the root._bokeh_is_initializing flag\n // to determine whether there is an ongoing attempt to initialize\n // bokeh, however for backward compatibility we also try to ensure\n // that we do not start loading a newer (Panel>=1.0 and Bokeh>3) version\n // before older versions are fully initialized.\n if (root._bokeh_is_initializing && Date.now() > root._bokeh_timeout) {\n root._bokeh_is_initializing = false;\n root._bokeh_onload_callbacks = undefined;\n console.log(\"Bokeh: BokehJS was loaded multiple times but one version failed to initialize.\");\n load_or_wait();\n } else if (root._bokeh_is_initializing || (typeof root._bokeh_is_initializing === \"undefined\" && root._bokeh_onload_callbacks !== undefined)) {\n setTimeout(load_or_wait, 100);\n } else {\n root._bokeh_is_initializing = true\n root._bokeh_onload_callbacks = []\n var bokeh_loaded = Bokeh != null && (Bokeh.version === py_version || (Bokeh.versions !== undefined && Bokeh.versions.has(py_version)));\n if (!reloading && !bokeh_loaded) {\n\troot.Bokeh = undefined;\n }\n load_libs(css_urls, js_urls, js_modules, js_exports, function() {\n\tconsole.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n\trun_inline_js();\n });\n }\n }\n // Give older versions of the autoload script a head-start to ensure\n // they initialize before we start loading newer version.\n setTimeout(load_or_wait, 100)\n}(window));",
+ "application/vnd.holoviews_load.v0+json": ""
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/javascript": "\nif ((window.PyViz === undefined) || (window.PyViz instanceof HTMLElement)) {\n window.PyViz = {comms: {}, comm_status:{}, kernels:{}, receivers: {}, plot_index: []}\n}\n\n\n function JupyterCommManager() {\n }\n\n JupyterCommManager.prototype.register_target = function(plot_id, comm_id, msg_handler) {\n if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n comm_manager.register_target(comm_id, function(comm) {\n comm.on_msg(msg_handler);\n });\n } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n window.PyViz.kernels[plot_id].registerCommTarget(comm_id, function(comm) {\n comm.onMsg = msg_handler;\n });\n } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n google.colab.kernel.comms.registerTarget(comm_id, (comm) => {\n var messages = comm.messages[Symbol.asyncIterator]();\n function processIteratorResult(result) {\n var message = result.value;\n console.log(message)\n var content = {data: message.data, comm_id};\n var buffers = []\n for (var buffer of message.buffers || []) {\n buffers.push(new DataView(buffer))\n }\n var metadata = message.metadata || {};\n var msg = {content, buffers, metadata}\n msg_handler(msg);\n return messages.next().then(processIteratorResult);\n }\n return messages.next().then(processIteratorResult);\n })\n }\n }\n\n JupyterCommManager.prototype.get_client_comm = function(plot_id, comm_id, msg_handler) {\n if (comm_id in window.PyViz.comms) {\n return window.PyViz.comms[comm_id];\n } else if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n var comm = comm_manager.new_comm(comm_id, {}, {}, {}, comm_id);\n if (msg_handler) {\n comm.on_msg(msg_handler);\n }\n } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n var comm = window.PyViz.kernels[plot_id].connectToComm(comm_id);\n comm.open();\n if (msg_handler) {\n comm.onMsg = msg_handler;\n }\n } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n var comm_promise = google.colab.kernel.comms.open(comm_id)\n comm_promise.then((comm) => {\n window.PyViz.comms[comm_id] = comm;\n if (msg_handler) {\n var messages = comm.messages[Symbol.asyncIterator]();\n function processIteratorResult(result) {\n var message = result.value;\n var content = {data: message.data};\n var metadata = message.metadata || {comm_id};\n var msg = {content, metadata}\n msg_handler(msg);\n return messages.next().then(processIteratorResult);\n }\n return messages.next().then(processIteratorResult);\n }\n }) \n var sendClosure = (data, metadata, buffers, disposeOnDone) => {\n return comm_promise.then((comm) => {\n comm.send(data, metadata, buffers, disposeOnDone);\n });\n };\n var comm = {\n send: sendClosure\n };\n }\n window.PyViz.comms[comm_id] = comm;\n return comm;\n }\n window.PyViz.comm_manager = new JupyterCommManager();\n \n\n\nvar JS_MIME_TYPE = 'application/javascript';\nvar HTML_MIME_TYPE = 'text/html';\nvar EXEC_MIME_TYPE = 'application/vnd.holoviews_exec.v0+json';\nvar CLASS_NAME = 'output';\n\n/**\n * Render data to the DOM node\n */\nfunction render(props, node) {\n var div = document.createElement(\"div\");\n var script = document.createElement(\"script\");\n node.appendChild(div);\n node.appendChild(script);\n}\n\n/**\n * Handle when a new output is added\n */\nfunction handle_add_output(event, handle) {\n var output_area = handle.output_area;\n var output = handle.output;\n if ((output.data == undefined) || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n return\n }\n var id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n if (id !== undefined) {\n var nchildren = toinsert.length;\n var html_node = toinsert[nchildren-1].children[0];\n html_node.innerHTML = output.data[HTML_MIME_TYPE];\n var scripts = [];\n var nodelist = html_node.querySelectorAll(\"script\");\n for (var i in nodelist) {\n if (nodelist.hasOwnProperty(i)) {\n scripts.push(nodelist[i])\n }\n }\n\n scripts.forEach( function (oldScript) {\n var newScript = document.createElement(\"script\");\n var attrs = [];\n var nodemap = oldScript.attributes;\n for (var j in nodemap) {\n if (nodemap.hasOwnProperty(j)) {\n attrs.push(nodemap[j])\n }\n }\n attrs.forEach(function(attr) { newScript.setAttribute(attr.name, attr.value) });\n newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n oldScript.parentNode.replaceChild(newScript, oldScript);\n });\n if (JS_MIME_TYPE in output.data) {\n toinsert[nchildren-1].children[1].textContent = output.data[JS_MIME_TYPE];\n }\n output_area._hv_plot_id = id;\n if ((window.Bokeh !== undefined) && (id in Bokeh.index)) {\n window.PyViz.plot_index[id] = Bokeh.index[id];\n } else {\n window.PyViz.plot_index[id] = null;\n }\n } else if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n var bk_div = document.createElement(\"div\");\n bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n var script_attrs = bk_div.children[0].attributes;\n for (var i = 0; i < script_attrs.length; i++) {\n toinsert[toinsert.length - 1].childNodes[1].setAttribute(script_attrs[i].name, script_attrs[i].value);\n }\n // store reference to server id on output_area\n output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n }\n}\n\n/**\n * Handle when an output is cleared or removed\n */\nfunction handle_clear_output(event, handle) {\n var id = handle.cell.output_area._hv_plot_id;\n var server_id = handle.cell.output_area._bokeh_server_id;\n if (((id === undefined) || !(id in PyViz.plot_index)) && (server_id !== undefined)) { return; }\n var comm = window.PyViz.comm_manager.get_client_comm(\"hv-extension-comm\", \"hv-extension-comm\", function () {});\n if (server_id !== null) {\n comm.send({event_type: 'server_delete', 'id': server_id});\n return;\n } else if (comm !== null) {\n comm.send({event_type: 'delete', 'id': id});\n }\n delete PyViz.plot_index[id];\n if ((window.Bokeh !== undefined) & (id in window.Bokeh.index)) {\n var doc = window.Bokeh.index[id].model.document\n doc.clear();\n const i = window.Bokeh.documents.indexOf(doc);\n if (i > -1) {\n window.Bokeh.documents.splice(i, 1);\n }\n }\n}\n\n/**\n * Handle kernel restart event\n */\nfunction handle_kernel_cleanup(event, handle) {\n delete PyViz.comms[\"hv-extension-comm\"];\n window.PyViz.plot_index = {}\n}\n\n/**\n * Handle update_display_data messages\n */\nfunction handle_update_output(event, handle) {\n handle_clear_output(event, {cell: {output_area: handle.output_area}})\n handle_add_output(event, handle)\n}\n\nfunction register_renderer(events, OutputArea) {\n function append_mime(data, metadata, element) {\n // create a DOM node to render to\n var toinsert = this.create_output_subarea(\n metadata,\n CLASS_NAME,\n EXEC_MIME_TYPE\n );\n this.keyboard_manager.register_events(toinsert);\n // Render to node\n var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n render(props, toinsert[0]);\n element.append(toinsert);\n return toinsert\n }\n\n events.on('output_added.OutputArea', handle_add_output);\n events.on('output_updated.OutputArea', handle_update_output);\n events.on('clear_output.CodeCell', handle_clear_output);\n events.on('delete.Cell', handle_clear_output);\n events.on('kernel_ready.Kernel', handle_kernel_cleanup);\n\n OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n safe: true,\n index: 0\n });\n}\n\nif (window.Jupyter !== undefined) {\n try {\n var events = require('base/js/events');\n var OutputArea = require('notebook/js/outputarea').OutputArea;\n if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n register_renderer(events, OutputArea);\n }\n } catch(err) {\n }\n}\n",
+ "application/vnd.holoviews_load.v0+json": ""
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/html": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.holoviews_exec.v0+json": "",
+ "text/html": [
+ "\n",
+ ""
+ ]
+ },
+ "metadata": {
+ "application/vnd.holoviews_exec.v0+json": {
+ "id": "p1002"
+ }
+ },
+ "output_type": "display_data"
}
],
"source": [
@@ -110,57 +217,31 @@
},
{
"cell_type": "code",
- "execution_count": 1,
+ "execution_count": 13,
"id": "3bce5192",
"metadata": {},
"outputs": [
{
- "data": {
- "application/javascript": "(function(root) {\n function now() {\n return new Date();\n }\n\n var force = true;\n var py_version = '3.2.2'.replace('rc', '-rc.').replace('.dev', '-dev.');\n var is_dev = py_version.indexOf(\"+\") !== -1 || py_version.indexOf(\"-\") !== -1;\n var reloading = false;\n var Bokeh = root.Bokeh;\n var bokeh_loaded = Bokeh != null && (Bokeh.version === py_version || (Bokeh.versions !== undefined && Bokeh.versions.has(py_version)));\n\n if (typeof (root._bokeh_timeout) === \"undefined\" || force) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks;\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, js_modules, js_exports, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n if (js_modules == null) js_modules = [];\n if (js_exports == null) js_exports = {};\n\n root._bokeh_onload_callbacks.push(callback);\n\n if (root._bokeh_is_loading > 0) {\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls.length === 0 && js_modules.length === 0 && Object.keys(js_exports).length === 0) {\n run_callbacks();\n return null;\n }\n if (!reloading) {\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n }\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n window._bokeh_on_load = on_load\n\n function on_error() {\n console.error(\"failed to load \" + url);\n }\n\n var skip = [];\n if (window.requirejs) {\n window.requirejs.config({'packages': {}, 'paths': {'jspanel': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/jspanel', 'jspanel-modal': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/modal/jspanel.modal', 'jspanel-tooltip': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/tooltip/jspanel.tooltip', 'jspanel-hint': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/hint/jspanel.hint', 'jspanel-layout': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/layout/jspanel.layout', 'jspanel-contextmenu': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/contextmenu/jspanel.contextmenu', 'jspanel-dock': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/dock/jspanel.dock', 'gridstack': 'https://cdn.jsdelivr.net/npm/gridstack@7.2.3/dist/gridstack-all', 'notyf': 'https://cdn.jsdelivr.net/npm/notyf@3/notyf.min'}, 'shim': {'jspanel': {'exports': 'jsPanel'}, 'gridstack': {'exports': 'GridStack'}}});\n require([\"jspanel\"], function(jsPanel) {\n\twindow.jsPanel = jsPanel\n\ton_load()\n })\n require([\"jspanel-modal\"], function() {\n\ton_load()\n })\n require([\"jspanel-tooltip\"], function() {\n\ton_load()\n })\n require([\"jspanel-hint\"], function() {\n\ton_load()\n })\n require([\"jspanel-layout\"], function() {\n\ton_load()\n })\n require([\"jspanel-contextmenu\"], function() {\n\ton_load()\n })\n require([\"jspanel-dock\"], function() {\n\ton_load()\n })\n require([\"gridstack\"], function(GridStack) {\n\twindow.GridStack = GridStack\n\ton_load()\n })\n require([\"notyf\"], function() {\n\ton_load()\n })\n root._bokeh_is_loading = css_urls.length + 9;\n } else {\n root._bokeh_is_loading = css_urls.length + js_urls.length + js_modules.length + Object.keys(js_exports).length;\n }\n\n var existing_stylesheets = []\n var links = document.getElementsByTagName('link')\n for (var i = 0; i < links.length; i++) {\n var link = links[i]\n if (link.href != null) {\n\texisting_stylesheets.push(link.href)\n }\n }\n for (var i = 0; i < css_urls.length; i++) {\n var url = css_urls[i];\n if (existing_stylesheets.indexOf(url) !== -1) {\n\ton_load()\n\tcontinue;\n }\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error;\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n } if (((window['jsPanel'] !== undefined) && (!(window['jsPanel'] instanceof HTMLElement))) || window.requirejs) {\n var urls = ['https://cdn.holoviz.org/panel/1.2.3/dist/bundled/floatpanel/jspanel4@4.12.0/dist/jspanel.js', 'https://cdn.holoviz.org/panel/1.2.3/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/modal/jspanel.modal.js', 'https://cdn.holoviz.org/panel/1.2.3/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/tooltip/jspanel.tooltip.js', 'https://cdn.holoviz.org/panel/1.2.3/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/hint/jspanel.hint.js', 'https://cdn.holoviz.org/panel/1.2.3/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/layout/jspanel.layout.js', 'https://cdn.holoviz.org/panel/1.2.3/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/contextmenu/jspanel.contextmenu.js', 'https://cdn.holoviz.org/panel/1.2.3/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/dock/jspanel.dock.js'];\n for (var i = 0; i < urls.length; i++) {\n skip.push(urls[i])\n }\n } if (((window['GridStack'] !== undefined) && (!(window['GridStack'] instanceof HTMLElement))) || window.requirejs) {\n var urls = ['https://cdn.holoviz.org/panel/1.2.3/dist/bundled/gridstack/gridstack@7.2.3/dist/gridstack-all.js'];\n for (var i = 0; i < urls.length; i++) {\n skip.push(urls[i])\n }\n } if (((window['Notyf'] !== undefined) && (!(window['Notyf'] instanceof HTMLElement))) || window.requirejs) {\n var urls = ['https://cdn.holoviz.org/panel/1.2.3/dist/bundled/notificationarea/notyf@3/notyf.min.js'];\n for (var i = 0; i < urls.length; i++) {\n skip.push(urls[i])\n }\n } var existing_scripts = []\n var scripts = document.getElementsByTagName('script')\n for (var i = 0; i < scripts.length; i++) {\n var script = scripts[i]\n if (script.src != null) {\n\texisting_scripts.push(script.src)\n }\n }\n for (var i = 0; i < js_urls.length; i++) {\n var url = js_urls[i];\n if (skip.indexOf(url) !== -1 || existing_scripts.indexOf(url) !== -1) {\n\tif (!window.requirejs) {\n\t on_load();\n\t}\n\tcontinue;\n }\n var element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error;\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n for (var i = 0; i < js_modules.length; i++) {\n var url = js_modules[i];\n if (skip.indexOf(url) !== -1 || existing_scripts.indexOf(url) !== -1) {\n\tif (!window.requirejs) {\n\t on_load();\n\t}\n\tcontinue;\n }\n var element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error;\n element.async = false;\n element.src = url;\n element.type = \"module\";\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n for (const name in js_exports) {\n var url = js_exports[name];\n if (skip.indexOf(url) >= 0 || root[name] != null) {\n\tif (!window.requirejs) {\n\t on_load();\n\t}\n\tcontinue;\n }\n var element = document.createElement('script');\n element.onerror = on_error;\n element.async = false;\n element.type = \"module\";\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n element.textContent = `\n import ${name} from \"${url}\"\n window.${name} = ${name}\n window._bokeh_on_load()\n `\n document.head.appendChild(element);\n }\n if (!js_urls.length && !js_modules.length) {\n on_load()\n }\n };\n\n function inject_raw_css(css) {\n const element = document.createElement(\"style\");\n element.appendChild(document.createTextNode(css));\n document.body.appendChild(element);\n }\n\n var js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-3.2.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.2.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.2.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.2.2.min.js\", \"https://cdn.holoviz.org/panel/1.2.3/dist/panel.min.js\"];\n var js_modules = [];\n var js_exports = {};\n var css_urls = [];\n var inline_js = [ function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\nfunction(Bokeh) {} // ensure no trailing comma for IE\n ];\n\n function run_inline_js() {\n if ((root.Bokeh !== undefined) || (force === true)) {\n for (var i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }\n // Cache old bokeh versions\n if (Bokeh != undefined && !reloading) {\n\tvar NewBokeh = root.Bokeh;\n\tif (Bokeh.versions === undefined) {\n\t Bokeh.versions = new Map();\n\t}\n\tif (NewBokeh.version !== Bokeh.version) {\n\t Bokeh.versions.set(NewBokeh.version, NewBokeh)\n\t}\n\troot.Bokeh = Bokeh;\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n }\n root._bokeh_is_initializing = false\n }\n\n function load_or_wait() {\n // Implement a backoff loop that tries to ensure we do not load multiple\n // versions of Bokeh and its dependencies at the same time.\n // In recent versions we use the root._bokeh_is_initializing flag\n // to determine whether there is an ongoing attempt to initialize\n // bokeh, however for backward compatibility we also try to ensure\n // that we do not start loading a newer (Panel>=1.0 and Bokeh>3) version\n // before older versions are fully initialized.\n if (root._bokeh_is_initializing && Date.now() > root._bokeh_timeout) {\n root._bokeh_is_initializing = false;\n root._bokeh_onload_callbacks = undefined;\n console.log(\"Bokeh: BokehJS was loaded multiple times but one version failed to initialize.\");\n load_or_wait();\n } else if (root._bokeh_is_initializing || (typeof root._bokeh_is_initializing === \"undefined\" && root._bokeh_onload_callbacks !== undefined)) {\n setTimeout(load_or_wait, 100);\n } else {\n Bokeh = root.Bokeh;\n bokeh_loaded = Bokeh != null && (Bokeh.version === py_version || (Bokeh.versions !== undefined && Bokeh.versions.has(py_version)));\n root._bokeh_is_initializing = true\n root._bokeh_onload_callbacks = []\n if (!reloading && (!bokeh_loaded || is_dev)) {\n\troot.Bokeh = undefined;\n }\n load_libs(css_urls, js_urls, js_modules, js_exports, function() {\n\tconsole.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n\trun_inline_js();\n });\n }\n }\n // Give older versions of the autoload script a head-start to ensure\n // they initialize before we start loading newer version.\n setTimeout(load_or_wait, 100)\n}(window));",
- "application/vnd.holoviews_load.v0+json": ""
- },
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "application/javascript": "\nif ((window.PyViz === undefined) || (window.PyViz instanceof HTMLElement)) {\n window.PyViz = {comms: {}, comm_status:{}, kernels:{}, receivers: {}, plot_index: []}\n}\n\n\n function JupyterCommManager() {\n }\n\n JupyterCommManager.prototype.register_target = function(plot_id, comm_id, msg_handler) {\n if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n comm_manager.register_target(comm_id, function(comm) {\n comm.on_msg(msg_handler);\n });\n } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n window.PyViz.kernels[plot_id].registerCommTarget(comm_id, function(comm) {\n comm.onMsg = msg_handler;\n });\n } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n google.colab.kernel.comms.registerTarget(comm_id, (comm) => {\n var messages = comm.messages[Symbol.asyncIterator]();\n function processIteratorResult(result) {\n var message = result.value;\n console.log(message)\n var content = {data: message.data, comm_id};\n var buffers = []\n for (var buffer of message.buffers || []) {\n buffers.push(new DataView(buffer))\n }\n var metadata = message.metadata || {};\n var msg = {content, buffers, metadata}\n msg_handler(msg);\n return messages.next().then(processIteratorResult);\n }\n return messages.next().then(processIteratorResult);\n })\n }\n }\n\n JupyterCommManager.prototype.get_client_comm = function(plot_id, comm_id, msg_handler) {\n if (comm_id in window.PyViz.comms) {\n return window.PyViz.comms[comm_id];\n } else if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n var comm = comm_manager.new_comm(comm_id, {}, {}, {}, comm_id);\n if (msg_handler) {\n comm.on_msg(msg_handler);\n }\n } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n var comm = window.PyViz.kernels[plot_id].connectToComm(comm_id);\n comm.open();\n if (msg_handler) {\n comm.onMsg = msg_handler;\n }\n } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n var comm_promise = google.colab.kernel.comms.open(comm_id)\n comm_promise.then((comm) => {\n window.PyViz.comms[comm_id] = comm;\n if (msg_handler) {\n var messages = comm.messages[Symbol.asyncIterator]();\n function processIteratorResult(result) {\n var message = result.value;\n var content = {data: message.data};\n var metadata = message.metadata || {comm_id};\n var msg = {content, metadata}\n msg_handler(msg);\n return messages.next().then(processIteratorResult);\n }\n return messages.next().then(processIteratorResult);\n }\n }) \n var sendClosure = (data, metadata, buffers, disposeOnDone) => {\n return comm_promise.then((comm) => {\n comm.send(data, metadata, buffers, disposeOnDone);\n });\n };\n var comm = {\n send: sendClosure\n };\n }\n window.PyViz.comms[comm_id] = comm;\n return comm;\n }\n window.PyViz.comm_manager = new JupyterCommManager();\n \n\n\nvar JS_MIME_TYPE = 'application/javascript';\nvar HTML_MIME_TYPE = 'text/html';\nvar EXEC_MIME_TYPE = 'application/vnd.holoviews_exec.v0+json';\nvar CLASS_NAME = 'output';\n\n/**\n * Render data to the DOM node\n */\nfunction render(props, node) {\n var div = document.createElement(\"div\");\n var script = document.createElement(\"script\");\n node.appendChild(div);\n node.appendChild(script);\n}\n\n/**\n * Handle when a new output is added\n */\nfunction handle_add_output(event, handle) {\n var output_area = handle.output_area;\n var output = handle.output;\n if ((output.data == undefined) || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n return\n }\n var id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n if (id !== undefined) {\n var nchildren = toinsert.length;\n var html_node = toinsert[nchildren-1].children[0];\n html_node.innerHTML = output.data[HTML_MIME_TYPE];\n var scripts = [];\n var nodelist = html_node.querySelectorAll(\"script\");\n for (var i in nodelist) {\n if (nodelist.hasOwnProperty(i)) {\n scripts.push(nodelist[i])\n }\n }\n\n scripts.forEach( function (oldScript) {\n var newScript = document.createElement(\"script\");\n var attrs = [];\n var nodemap = oldScript.attributes;\n for (var j in nodemap) {\n if (nodemap.hasOwnProperty(j)) {\n attrs.push(nodemap[j])\n }\n }\n attrs.forEach(function(attr) { newScript.setAttribute(attr.name, attr.value) });\n newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n oldScript.parentNode.replaceChild(newScript, oldScript);\n });\n if (JS_MIME_TYPE in output.data) {\n toinsert[nchildren-1].children[1].textContent = output.data[JS_MIME_TYPE];\n }\n output_area._hv_plot_id = id;\n if ((window.Bokeh !== undefined) && (id in Bokeh.index)) {\n window.PyViz.plot_index[id] = Bokeh.index[id];\n } else {\n window.PyViz.plot_index[id] = null;\n }\n } else if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n var bk_div = document.createElement(\"div\");\n bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n var script_attrs = bk_div.children[0].attributes;\n for (var i = 0; i < script_attrs.length; i++) {\n toinsert[toinsert.length - 1].childNodes[1].setAttribute(script_attrs[i].name, script_attrs[i].value);\n }\n // store reference to server id on output_area\n output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n }\n}\n\n/**\n * Handle when an output is cleared or removed\n */\nfunction handle_clear_output(event, handle) {\n var id = handle.cell.output_area._hv_plot_id;\n var server_id = handle.cell.output_area._bokeh_server_id;\n if (((id === undefined) || !(id in PyViz.plot_index)) && (server_id !== undefined)) { return; }\n var comm = window.PyViz.comm_manager.get_client_comm(\"hv-extension-comm\", \"hv-extension-comm\", function () {});\n if (server_id !== null) {\n comm.send({event_type: 'server_delete', 'id': server_id});\n return;\n } else if (comm !== null) {\n comm.send({event_type: 'delete', 'id': id});\n }\n delete PyViz.plot_index[id];\n if ((window.Bokeh !== undefined) & (id in window.Bokeh.index)) {\n var doc = window.Bokeh.index[id].model.document\n doc.clear();\n const i = window.Bokeh.documents.indexOf(doc);\n if (i > -1) {\n window.Bokeh.documents.splice(i, 1);\n }\n }\n}\n\n/**\n * Handle kernel restart event\n */\nfunction handle_kernel_cleanup(event, handle) {\n delete PyViz.comms[\"hv-extension-comm\"];\n window.PyViz.plot_index = {}\n}\n\n/**\n * Handle update_display_data messages\n */\nfunction handle_update_output(event, handle) {\n handle_clear_output(event, {cell: {output_area: handle.output_area}})\n handle_add_output(event, handle)\n}\n\nfunction register_renderer(events, OutputArea) {\n function append_mime(data, metadata, element) {\n // create a DOM node to render to\n var toinsert = this.create_output_subarea(\n metadata,\n CLASS_NAME,\n EXEC_MIME_TYPE\n );\n this.keyboard_manager.register_events(toinsert);\n // Render to node\n var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n render(props, toinsert[0]);\n element.append(toinsert);\n return toinsert\n }\n\n events.on('output_added.OutputArea', handle_add_output);\n events.on('output_updated.OutputArea', handle_update_output);\n events.on('clear_output.CodeCell', handle_clear_output);\n events.on('delete.Cell', handle_clear_output);\n events.on('kernel_ready.Kernel', handle_kernel_cleanup);\n\n OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n safe: true,\n index: 0\n });\n}\n\nif (window.Jupyter !== undefined) {\n try {\n var events = require('base/js/events');\n var OutputArea = require('notebook/js/outputarea').OutputArea;\n if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n register_renderer(events, OutputArea);\n }\n } catch(err) {\n }\n}\n",
- "application/vnd.holoviews_load.v0+json": ""
- },
- "metadata": {},
- "output_type": "display_data"
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Initializing from dicts...\n",
+ "Model initialized from input dicts successfully!.\n",
+ "['TwaterK', 'SOD_tc', 'kah_20', 'kah_tc', 'kaw_20', 'kaw_tc', 'ka_tc', 'L', 'PAR', 'fdp', 'rna', 'rpa', 'rca', 'rda', 'mu_max_tc', 'krp_tc', 'kdp_tc', 'FL', 'FN', 'FP', 'mu', 'ApGrowth', 'ApRespiration', 'ApDeath', 'ApSettling', 'dApdt', 'mub_max_tc', 'krb_tc', 'kdb_tc', 'rnb', 'rpb', 'rcb', 'rab', 'FLb', 'FNb', 'FPb', 'FSb', 'mub', 'AbGrowth', 'AbRespiration', 'AbDeath', 'dAbdt', 'Chlb', 'knit_tc', 'rnh4_tc', 'vno3_tc', 'kon_tc', 'kdnit_tc', 'ApUptakeFr_NH4', 'ApUptakeFr_NO3', 'AbUptakeFr_NH4', 'AbUptakeFr_NO3', 'ApDeath_OrgN', 'AbDeath_OrgN', 'OrgN_NH4_Decay', 'OrgN_Settling', 'dOrgNdt', 'NH4_Nitrification', 'NH4fromBed', 'NH4_ApRespiration', 'NH4_ApGrowth', 'NH4_AbRespiration', 'NH4_AbGrowth', 'dNH4dt', 'NO3_Denit', 'NO3_BedDenit', 'NO3_ApGrowth', 'NO3_AbGrowth', 'dNO3dt', 'DIN', 'TON', 'TKN', 'TN', 'NitrificationInhibition', 'kop_tc', 'rpo4_tc', 'OrgP_DIP_decay', 'OrgP_Settling', 'ApDeath_OrgP', 'AbDeath_OrgP', 'dOrgPdt', 'DIPfromBed', 'TIP_Settling', 'DIP_ApRespiration', 'DIP_ApGrowth', 'DIP_AbRespiration', 'DIP_AbGrowth', 'dTIPdt', 'TOP', 'TP', 'DIP', 'kpom_tc', 'POM_algal_settling', 'POM_dissolution', 'POM_POC_settling', 'POM_benthic_algae_mortality', 'POM_burial', 'dPOMdt', 'kbod_tc', 'ksbod_tc', 'CBOD_oxidation', 'CBOD_sedimentation', 'dCBODdt', 'kpoc_tc', 'POC_settling', 'POC_hydrolysis', 'POC_algal_mortality', 'POC_benthic_algae_mortality', 'dPOCdt', 'kdoc_tc', 'DOC_algal_mortality', 'DOC_benthic_algae_mortality', 'DOC_DIC_oxidation', 'dDOCdt', 'K_H', 'Atm_CO2_reaeration', 'DIC_algal_respiration', 'DIC_algal_photosynthesis', 'DIC_benthic_algae_respiration', 'DIC_benthic_algae_photosynthesis', 'DIC_CBOD_oxidation', 'DIC_sed_release', 'dDICdt', 'DOX_sat', 'pwv', 'DOs_atm_alpha', 'Atm_O2_reaeration', 'DOX_ApGrowth', 'DOX_ApRespiration', 'DOX_Nitrification', 'DOX_DOC_oxidation', 'DOX_CBOD_oxidation', 'DOX_AbGrowth', 'DOX_AbRespiration', 'DOX_SOD', 'dDOXdt', 'kdx_tc', 'PathogenDeath', 'PathogenDecay', 'PathogenSettling', 'dPXdt', 'Alk_denitrification', 'Alk_nitrification', 'Alk_algal_growth', 'Alk_algal_respiration', 'Alk_benthic_algae_growth', 'Alk_benthic_algae_respiration', 'dAlkdt', 'KHN2_tc', 'P_wv', 'N2sat', 'dN2dt', 'TDG']\n"
+ ]
},
{
- "data": {
- "text/html": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "C:\\Users\\l2edeknw\\Documents\\Projects\\ToddERDC\\ClearWater-modules\\src\\clearwater_modules\\nsm1\\processes.py:3454: RuntimeWarning: divide by zero encountered in divide\n",
+ " return xr.where(use_DOX,(79.0 * N2 / N2sat) + (21.0 * DOX / DOX_sat), N2/N2sat)\n"
+ ]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
- "Initializing from dicts...\n",
- "Model initialized from input dicts successfully!.\n",
- "['TwaterK', 'SOD_tc', 'kah_20', 'kah_tc', 'kaw_20', 'kaw_tc', 'ka_tc', 'L', 'PAR', 'fdp', 'rna', 'rpa', 'rca', 'rda', 'mu_max_tc', 'krp_tc', 'kdp_tc', 'FL', 'FN', 'FP', 'mu', 'ApGrowth', 'ApRespiration', 'ApDeath', 'ApSettling', 'dApdt', 'mub_max_tc', 'krb_tc', 'kdb_tc', 'rnb', 'rpb', 'rcb', 'rab', 'FLb', 'FNb', 'FPb', 'FSb', 'mub', 'AbGrowth', 'AbRespiration', 'AbDeath', 'dAbdt', 'Chlb', 'knit_tc', 'rnh4_tc', 'vno3_tc', 'kon_tc', 'kdnit_tc', 'ApUptakeFr_NH4', 'ApUptakeFr_NO3', 'AbUptakeFr_NH4', 'AbUptakeFr_NO3', 'ApDeath_OrgN', 'AbDeath_OrgN', 'OrgN_NH4_Decay', 'OrgN_Settling', 'dOrgNdt', 'NH4_Nitrification', 'NH4fromBed', 'NH4_ApRespiration', 'NH4_ApGrowth', 'NH4_AbRespiration', 'NH4_AbGrowth', 'dNH4dt', 'NO3_Denit', 'NO3_BedDenit', 'NO3_ApGrowth', 'NO3_AbGrowth', 'dNO3dt', 'DIN', 'TON', 'TKN', 'TN', 'NitrificationInhibition', 'kop_tc', 'rpo4_tc', 'OrgP_DIP_decay', 'OrgP_Settling', 'ApDeath_OrgP', 'AbDeath_OrgP', 'dOrgPdt', 'DIPfromBed', 'TIP_Settling', 'DIP_ApRespiration', 'DIP_ApGrowth', 'DIP_AbRespiration', 'DIP_AbGrowth', 'dTIPdt', 'TOP', 'TP', 'DIP', 'kpom_tc', 'POM_algal_settling', 'POM_dissolution', 'POM_POC_settling', 'POM_benthic_algae_mortality', 'POM_burial', 'dPOMdt', 'kbod_tc', 'ksbod_tc', 'CBOD_oxidation', 'CBOD_sedimentation', 'dCBODdt', 'kpoc_tc', 'POC_settling', 'POC_hydrolysis', 'POC_algal_mortality', 'POC_benthic_algae_mortality', 'dPOCdt', 'kdoc_tc', 'DOC_algal_mortality', 'DOC_benthic_algae_mortality', 'DOC_DIC_oxidation', 'dDOCdt', 'K_H', 'Atm_CO2_reaeration', 'DIC_algal_respiration', 'DIC_algal_photosynthesis', 'DIC_benthic_algae_respiration', 'DIC_benthic_algae_photosynthesis', 'DIC_CBOD_oxidation', 'DIC_sed_release', 'dDICdt', 'DOX_sat', 'pwv', 'DOs_atm_alpha', 'Atm_O2_reaeration', 'DOX_ApGrowth', 'DOX_ApRespiration', 'DOX_Nitrification', 'DOX_DOC_oxidation', 'DOX_CBOD_oxidation', 'DOX_AbGrowth', 'DOX_AbRespiration', 'DOX_SOD', 'dDOXdt', 'kdx_tc', 'PathogenDeath', 'PathogenDecay', 'PathogenSettling', 'dPXdt', 'Alk_denitrification', 'Alk_nitrification', 'Alk_algal_growth', 'Alk_algal_respiration', 'Alk_benthic_algae_growth', 'Alk_benthic_algae_respiration', 'dAlkdt', 'KHN2_tc', 'P_wv', 'N2sat', 'dN2dt', 'TDG']\n",
"Variable | Inputs\n",
"------------------\n",
"TwaterK | ['TwaterC']\n",
@@ -510,8 +591,10 @@
"DOX_parameters = {}\n",
"N2_parameters = {}\n",
"\n",
+ "time_steps=1 \n",
"\n",
"nsm_model = NutrientBudget(\n",
+ " time_steps=time_steps,\n",
" initial_state_values=initial_state_values, # mandatory\n",
" algae_parameters=algae_parameters,\n",
" alkalinity_parameters=alkalinity_parameters,\n",
@@ -533,7 +616,7 @@
"\n",
"print(nsm_model.dynamic_variables_names)\n",
"\n",
- "#nsm_model.increment_timestep()\n",
+ "nsm_model.increment_timestep()\n",
"nsm_model.dataset\n",
"\n",
"print('Variable | Inputs\\n------------------')\n",
@@ -543,10 +626,18 @@
},
{
"cell_type": "code",
- "execution_count": 2,
+ "execution_count": 5,
"id": "32673258",
"metadata": {},
"outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "C:\\Users\\l2edeknw\\Documents\\Projects\\ToddERDC\\ClearWater-modules\\src\\clearwater_modules\\nsm1\\processes.py:3454: RuntimeWarning: divide by zero encountered in divide\n",
+ " return xr.where(use_DOX,(79.0 * N2 / N2sat) + (21.0 * DOX / DOX_sat), N2/N2sat)\n"
+ ]
+ },
{
"data": {
"text/html": [
@@ -913,389 +1004,389 @@
" stroke: currentColor;\n",
" fill: currentColor;\n",
"}\n",
- "<xarray.Dataset>\n",
+ "<xarray.Dataset> Size: 3kB\n",
"Dimensions: (year: 2, x: 1, y: 1)\n",
"Coordinates:\n",
- " * year (year) int32 0 1\n",
- " * x (x) float64 1.0\n",
- " * y (y) float64 1.0\n",
+ " * year (year) int32 8B 0 1\n",
+ " * x (x) float64 8B 1.0\n",
+ " * y (y) float64 8B 1.0\n",
"Data variables: (12/281)\n",
- " Ap (year, x, y) float64 1.0 -3.865e+04\n",
- " Ab (year, x, y) float64 1.0 -4.301e+04\n",
- " NH4 (year, x, y) float64 1.0 6.089e+03\n",
- " NO3 (year, x, y) float64 1.0 3.861e+03\n",
- " OrgN (year, x, y) float64 1.0 -7.898e+03\n",
- " N2 (year, x, y) float64 1.0 2.191e+07\n",
+ " Ap (year, x, y) float64 16B 1.0 -3.05e+04\n",
+ " Ab (year, x, y) float64 16B 1.0 -3.967e+04\n",
+ " NH4 (year, x, y) float64 16B 1.0 5.951e+03\n",
+ " NO3 (year, x, y) float64 16B 1.0 3.724e+03\n",
+ " OrgN (year, x, y) float64 16B 1.0 -7.898e+03\n",
+ " N2 (year, x, y) float64 16B 1.0 2.191e+07\n",
" ... ...\n",
- " dNH4dt (year, x, y) float64 nan 0.07046\n",
- " dNO3dt (year, x, y) float64 nan 0.04468\n",
- " DOX_sat (year, x, y) float64 nan 0.0\n",
- " Atm_O2_reaeration (year, x, y) float64 nan -8.28\n",
- " dDOXdt (year, x, y) float64 nan -508.3\n",
- " TDG (year, x, y) float64 nan inf
Ap
(year, x, y)
float64
1.0 -3.865e+04
- long_name :
- Algae Concentration
- units :
- ug-Chla/L
- description :
- Algal Concentration
array([[[ 1.00000000e+00]],\n",
+ " dAlkdt (year, x, y) float64 16B nan 0.3351\n",
+ " KHN2_tc (year, x, y) float64 16B nan 0.0007001\n",
+ " P_wv (year, x, y) float64 16B nan 0.02309\n",
+ " N2sat (year, x, y) float64 16B nan 30.61\n",
+ " dN2dt (year, x, y) float64 16B nan 253.6\n",
+ " TDG (year, x, y) float64 16B nan inf
Ap
(year, x, y)
float64
1.0 -3.05e+04
- long_name :
- Algae Concentration
- units :
- ug-Chla/L
- description :
- Algal Concentration
array([[[ 1.00000000e+00]],\n",
"\n",
- " [[-3.86538814e+04]]])
Ab
(year, x, y)
float64
1.0 -4.301e+04
- long_name :
- Benthic Algae Concentration
- units :
- g-D/m^2
- description :
- Benthic Algae Concentration
array([[[ 1.00000000e+00]],\n",
+ " [[-3.05018421e+04]]])
Ab
(year, x, y)
float64
1.0 -3.967e+04
- long_name :
- Benthic Algae Concentration
- units :
- g-D/m^2
- description :
- Benthic Algae Concentration
array([[[ 1.00000000e+00]],\n",
"\n",
- " [[-4.30079733e+04]]])
NH4
(year, x, y)
float64
1.0 6.089e+03
- long_name :
- Ammonium Concentration
- units :
- mg-N/L
- description :
- Ammonium Concentration
array([[[1.00000000e+00]],\n",
+ " [[-3.96704364e+04]]])
NH4
(year, x, y)
float64
1.0 5.951e+03
- long_name :
- Ammonium Concentration
- units :
- mg-N/L
- description :
- Ammonium Concentration
array([[[1.00000000e+00]],\n",
"\n",
- " [[6.08875684e+03]]])
NO3
(year, x, y)
float64
1.0 3.861e+03
- long_name :
- Nitrate Concentration
- units :
- mg-N/L
- description :
- Nitrate Concentration
array([[[1.00000000e+00]],\n",
+ " [[5.95127331e+03]]])
NO3
(year, x, y)
float64
1.0 3.724e+03
- long_name :
- Nitrate Concentration
- units :
- mg-N/L
- description :
- Nitrate Concentration
array([[[1.00000000e+00]],\n",
"\n",
- " [[3.86100668e+03]]])
OrgN
(year, x, y)
float64
1.0 -7.898e+03
- long_name :
- Organic Nitrogen Concentration
- units :
- mg-N/L
- description :
- Organic Nitrogen Concentration
array([[[ 1.0000000e+00]],\n",
+ " [[3.72352315e+03]]])
OrgN
(year, x, y)
float64
1.0 -7.898e+03
- long_name :
- Organic Nitrogen Concentration
- units :
- mg-N/L
- description :
- Organic Nitrogen Concentration
array([[[ 1.0000000e+00]],\n",
"\n",
- " [[-7.8980336e+03]]])
N2
(year, x, y)
float64
1.0 2.191e+07
- long_name :
- Nitrogen concentration air
- units :
- mg-N/L
- description :
- Nitrogen concentration air
array([[[1.00000000e+00]],\n",
+ " [[-7.8980336e+03]]])
N2
(year, x, y)
float64
1.0 2.191e+07
- long_name :
- Nitrogen concentration air
- units :
- mg-N/L
- description :
- Nitrogen concentration air
array([[[1.00000000e+00]],\n",
"\n",
- " [[2.19067976e+07]]])
TIP
(year, x, y)
float64
1.0 8.825e+03
- long_name :
- Total Inorganic Phosphorus
- units :
- mg-P/L
- description :
- Total Inorganic Phosphorus Concentration
array([[[1.00000000e+00]],\n",
+ " [[2.19067976e+07]]])
TIP
(year, x, y)
float64
1.0 8.787e+03
- long_name :
- Total Inorganic Phosphorus
- units :
- mg-P/L
- description :
- Total Inorganic Phosphorus Concentration
array([[[1.00000000e+00]],\n",
"\n",
- " [[8.82481564e+03]]])
OrgP
(year, x, y)
float64
1.0 -8.632e+07
- long_name :
- Total Organic Phosphorus
- units :
- mg-P/L
- description :
- Total Organic Phosphorus Concentration
array([[[ 1.00000000e+00]],\n",
+ " [[8.78662577e+03]]])
OrgP
(year, x, y)
float64
1.0 -8.632e+07
- long_name :
- Total Organic Phosphorus
- units :
- mg-P/L
- description :
- Total Organic Phosphorus Concentration
array([[[ 1.00000000e+00]],\n",
"\n",
- " [[-8.63220161e+07]]])
POC
(year, x, y)
float64
1.0 6.73e+03
- long_name :
- Particulate Organic Carbon
- units :
- mg-C/L
- description :
- Particulate Organic Carbon Concentration
array([[[1.000000e+00]],\n",
+ " [[-8.63220161e+07]]])
POC
(year, x, y)
float64
1.0 6.73e+03
- long_name :
- Particulate Organic Carbon
- units :
- mg-C/L
- description :
- Particulate Organic Carbon Concentration
array([[[1.000000e+00]],\n",
"\n",
- " [[6.729832e+03]]])
DOC
(year, x, y)
float64
1.0 892.6
- long_name :
- Dissolved Organic Carbon
- units :
- mg-C/L
- description :
- Dissolved Organic Carbon Concentration
array([[[ 1. ]],\n",
+ " [[6.729832e+03]]])
DOC
(year, x, y)
float64
1.0 892.6
- long_name :
- Dissolved Organic Carbon
- units :
- mg-C/L
- description :
- Dissolved Organic Carbon Concentration
array([[[ 1. ]],\n",
"\n",
- " [[892.648]]])
DIC
(year, x, y)
float64
1.0 -1.701e+09
- long_name :
- Dissolved Inorganic Carbon
- units :
- mg-C/L
- description :
- Dissolved Inorganic Carbon Concentration
array([[[ 1.00000000e+00]],\n",
+ " [[892.648]]])
DIC
(year, x, y)
float64
1.0 -1.701e+09
- long_name :
- Dissolved Inorganic Carbon
- units :
- mg-C/L
- description :
- Dissolved Inorganic Carbon Concentration
array([[[ 1.00000000e+00]],\n",
"\n",
- " [[-1.70069572e+09]]])
POM
(year, x, y)
float64
1.0 -3.714e+03
- long_name :
- Particulate Organic Matter
- units :
- mg-D/L
- description :
- Particulate Organic Matter Concentration
array([[[ 1.0000e+00]],\n",
+ " [[-1.70069724e+09]]])
POM
(year, x, y)
float64
1.0 -3.714e+03
- long_name :
- Particulate Organic Matter
- units :
- mg-D/L
- description :
- Particulate Organic Matter Concentration
array([[[ 1.0000e+00]],\n",
"\n",
- " [[-3.7142e+03]]])
CBOD
(year, x, y)
float64
1.0 -6.911e+03
- long_name :
- Carbonaceous Biochemical Oxygen Demand
- units :
- mg-O2/L
- description :
- Carbonaceous Biochemical Oxygen Demand Concentration
array([[[ 1.000e+00]],\n",
+ " [[-3.7142e+03]]])
CBOD
(year, x, y)
float64
1.0 -6.911e+03
- long_name :
- Carbonaceous Biochemical Oxygen Demand
- units :
- mg-O2/L
- description :
- Carbonaceous Biochemical Oxygen Demand Concentration
array([[[ 1.000e+00]],\n",
"\n",
- " [[-6.911e+03]]])
DOX
(year, x, y)
float64
1.0 -4.392e+07
- long_name :
- Dissolved Oxygen
- units :
- mg-O2/L
- description :
- Dissolved Oxygen
array([[[ 1.00000000e+00]],\n",
+ " [[-6.911e+03]]])
DOX
(year, x, y)
float64
1.0 -4.391e+07
- long_name :
- Dissolved Oxygen
- units :
- mg-O2/L
- description :
- Dissolved Oxygen
array([[[ 1.00000000e+00]],\n",
"\n",
- " [[-4.39157708e+07]]])
PX
(year, x, y)
float64
1.0 -2.577e+05
- long_name :
- Pathogen
- units :
- cfu/100mL
- description :
- Pathogen concentration
array([[[ 1.00000000e+00]],\n",
+ " [[-4.39110823e+07]]])
PX
(year, x, y)
float64
1.0 -4.802e+05
- long_name :
- Pathogen
- units :
- cfu/100mL
- description :
- Pathogen concentration
array([[[ 1.00000000e+00]],\n",
"\n",
- " [[-2.57734272e+05]]])
Alk
(year, x, y)
float64
1.0 2.895e+04
- long_name :
- Alkalinity
- units :
- mg-CaCO3/L
- description :
- Alkalinity concentration
array([[[1.00000000e+00]],\n",
+ " [[-4.80184883e+05]]])
Alk
(year, x, y)
float64
1.0 2.895e+04
- long_name :
- Alkalinity
- units :
- mg-CaCO3/L
- description :
- Alkalinity concentration
array([[[1.00000000e+00]],\n",
"\n",
- " [[2.89504416e+04]]])
vson
(x, y)
float64
0.01
- long_name :
- Organic N settling velocity
- units :
- m/d
- description :
- Organic N settling velocity
vsoc
(x, y)
float64
0.01
- long_name :
- POC settling velocity
- units :
- m/d
- description :
- POC settling velocity
vsop
(x, y)
int32
999
- long_name :
- Organic phosphorus settling velocity
- units :
- m/d
- description :
- Organic phosphorus settling velocity
vs
(x, y)
int32
999
- long_name :
- Sediment settling velocity
- units :
- m/d
- description :
- Sediment settling velocity
SOD_20
(x, y)
int32
999
- long_name :
- Sediment oxygen demand at 20 degrees C
- units :
- g-O2/m/d
- description :
- Sediment oxygen demand at 20 degrees C
SOD_theta
(x, y)
int32
999
- long_name :
- Arrhenius coefficient for sediment oxygen demand
- units :
- unitless
- description :
- Arrhenius coefficient for sediment oxygen demand
fcom
(x, y)
float64
0.4
- long_name :
- Fraction of carbon in organic matter
- units :
- mg-C/mg-D
- description :
- Fraction of carbon in organic matter
vb
(x, y)
float64
0.01
- long_name :
- Burial velocity
- units :
- m/d
- description :
- Rate at which constituents are buried on the bottom
kaw_20_user
(x, y)
int32
999
- long_name :
- Wind oxygen reaeration velocity at 20C
- units :
- m/d
- description :
- Wind oxygen reaeration velocity at 20C
kah_20_user
(x, y)
int32
999
- long_name :
- Hydraulic oxygen reaeration rate at 20C
- units :
- 1/d
- description :
- Hydraulic oxygen reaeration rate at 20C
hydraulic_reaeration_option
(x, y)
int32
2
- long_name :
- Option for chosing the method by which O2 reaeration rate is calculated
- units :
- unitless
- description :
- Selects method for computing O2 reaeration rate
wind_reaeration_option
(x, y)
int32
2
- long_name :
- Option for chosing the method by which wind reaeration is calculated
- units :
- unitless
- description :
- Selects method for computing O2 reaeration due to wind
use_NH4
(x, y)
bool
True
- long_name :
- Use ammonium module
- units :
- unitless
- description :
- True/False use ammonium module
use_NO3
(x, y)
bool
True
- long_name :
- Use nitrate module
- units :
- unitless
- description :
- True/False use nitrate module
use_OrgN
(x, y)
bool
True
- long_name :
- Use organic nitrogen module
- units :
- unitless
- description :
- True/False use organic nitrogen module
use_SedFlux
(x, y)
bool
False
- long_name :
- Use sediment flux module
- units :
- unitless
- description :
- True/False use sediment flux module
use_DOX
(x, y)
bool
True
- long_name :
- Use dissolved oxygen module
- units :
- unitless
- description :
- True/False use dissolved oxygen module
use_Algae
(x, y)
bool
True
- long_name :
- Use algae module
- units :
- unitless
- description :
- True/False use algae module
use_Balgae
(x, y)
bool
True
- long_name :
- Use benthic algae module
- units :
- unitless
- description :
- True/False use benthic algae module
use_TIP
(x, y)
bool
True
- long_name :
- Use total inorganic phosphorus module
- units :
- unitless
- description :
- True/False use total inorganic phosphorus module
use_OrgP
(x, y)
bool
True
- long_name :
- Use total organic phosphorus module
- units :
- unitless
- description :
- True/False use total organic phosphorus module
use_POC
(x, y)
bool
True
- long_name :
- Use particulate organic carbon module
- units :
- unitless
- description :
- True/False use particulate organic carbon module
use_DOC
(x, y)
bool
True
- long_name :
- Use dissolved organic carbon module
- units :
- unitless
- description :
- True/False use dissolved organic carbon module
use_DIC
(x, y)
bool
True
- long_name :
- Use dissolved inorganic carbon module
- units :
- unitless
- description :
- True/False use dissolved inorganic carbon module
use_N2
(x, y)
bool
True
- long_name :
- Use dissolved N2 module
- units :
- unitless
- description :
- True/False use N2 module
use_Pathogen
(x, y)
bool
True
- long_name :
- Use pathogen module
- units :
- unitless
- description :
- True/False use pathogen module
use_Alk
(x, y)
bool
True
- long_name :
- Use alkalinity module
- units :
- unitless
- description :
- True/False use alkalinity module
use_POM
(x, y)
bool
True
- long_name :
- Use particulate organic matter module
- units :
- unitless
- description :
- True/False use particulate organic matter module
timestep
(x, y)
int32
86400
- long_name :
- timestep
- units :
- d
- description :
- calculation timestep
depth
(x, y)
int32
1
- long_name :
- Depth of water in cell
- units :
- m
- description :
- Depth of water in cell
TwaterC
(x, y)
int32
20
- long_name :
- Water temperature in celsius
- units :
- degrees C
- description :
- Water temperature in celsius
theta
(x, y)
float64
1.047
- long_name :
- Water temperature theta adjustment factor
- units :
- unitless
- description :
- Water temperature theta adjustment factor
velocity
(x, y)
int32
1
- long_name :
- velocity
- units :
- m/s
- description :
- Average water velocity in cell
flow
(x, y)
int32
2
- long_name :
- flow
- units :
- m3/s
- description :
- Average flow rate in cell
topwidth
(x, y)
int32
1
- long_name :
- topwidth
- units :
- m
- description :
- Average topwidth of cell
slope
(x, y)
int32
2
- long_name :
- slope
- units :
- TODO
- description :
- Average slope of bottom surface
shear_velocity
(x, y)
int32
4
- long_name :
- shear_velocity
- units :
- TODO
- description :
- Average shear velocity on bottom surface
pressure_atm
(x, y)
int32
2
- long_name :
- pressure_atm
- units :
- TODO
- description :
- atmospheric pressure in atm
wind_speed
(x, y)
int32
4
- long_name :
- Wind speed at 10 meters above the water surface
- units :
- m/s
- description :
- Wind speed at 10 meters above the water surface
q_solar
(x, y)
int32
4
- long_name :
- Incident short-wave solar radiation
- units :
- W/m2
- description :
- Incident short-wave solar radiation
Solid
(x, y)
int32
1
- long_name :
- Solid reaeration option
- units :
- Unknown
- description :
- Solid
AWd
(x, y)
int32
100
- long_name :
- Algal Dry Weight
- units :
- mg
- description :
- Algal Dry Weight
AWc
(x, y)
int32
40
- long_name :
- Carbon Weight
- units :
- mg
- description :
- Carbon Weight
AWn
(x, y)
float64
7.2
- long_name :
- Nitrogen Weight
- units :
- mg
- description :
- Nitrogen Weight
AWp
(x, y)
int32
1
- long_name :
- Phosphorus Weight
- units :
- mg
- description :
- Phosphorus Weight
AWa
(x, y)
int32
1000
- long_name :
- Algal Chlorophyll
- units :
- ug Chla
- description :
- Algal Chlorophyll
KL
(x, y)
int32
10
- long_name :
- Light Limiting Constant for Algal Growth
- units :
- W/m^2
- description :
- Light Limiting Constant for Algal Growth
KsN
(x, y)
float64
0.04
- long_name :
- Half-Saturation N Limiting Constant for Algal Growth
- units :
- mg-N/L
- description :
- Half-Saturation N Limiting Constant for Algal Growth
KsP
(x, y)
float64
0.0012
- long_name :
- Half-Saturation P Limiting Constant for Algal Growth
- units :
- mg-P/L
- description :
- Half-Saturation P Limiting Constant for Algal Growth
mu_max_20
(x, y)
int32
1
- long_name :
- Max Algae Growth
- units :
- 1/d
- description :
- Max Algae Growth at 20C
kdp_20
(x, y)
float64
0.15
- long_name :
- Algal Mortality Rate
- units :
- 1/d
- description :
- Algal Mortality Rate at 20C
krp_20
(x, y)
float64
0.2
- long_name :
- Algal Respiration Rate
- units :
- 1/d
- description :
- Algal Respiration Rate at 20C
vsap
(x, y)
float64
0.15
- long_name :
- Algal Setting Velocity
- units :
- m/d
- description :
- Algal Setting Velocity
growth_rate_option
(x, y)
int32
1
- long_name :
- Growth Rate Option
- units :
- 1/d
- description :
- Algal growth rate option 1) multiplicative, 2) Limiting Nutrient, 3) Harmonic Mean Option
light_limitation_option
(x, y)
int32
1
- long_name :
- Light Limitation Option
- units :
- 1/d
- description :
- Algal light limitation 1) half-saturation, 2) Smith model, 3) Steele model
lambda0
(x, y)
float64
0.5
- long_name :
- lambda0
- units :
- 1/m
- description :
- background portion
lambda1
(x, y)
float64
0.5
- long_name :
- lambda1
- units :
- 1/m/(ug Chla/L)
- description :
- linear self shading
lambda2
(x, y)
float64
0.5
- long_name :
- lambda2
- units :
- unitless
- description :
- nonlinear
lambdas
(x, y)
float64
0.5
- long_name :
- lambdas
- units :
- L/mg/m
- description :
- ISS portion
lambdam
(x, y)
float64
0.5
- long_name :
- lambdam
- units :
- L/mg/m
- description :
- POM portion
Fr_PAR
(x, y)
float64
0.5
- long_name :
- fraction PAR
- units :
- unitless
- description :
- fraction of solar radiation within the PAR of the spectrum
Fw
(x, y)
float64
0.9
- long_name :
- Fraction of benthic algae mortality into water column
- units :
- unitless
- description :
- Fraction of benthic algae mortality into water column
Fb
(x, y)
float64
0.9
- long_name :
- Fraction of bottom area available for benthic algae
- units :
- unitless
- description :
- Fraction of bottom area available for benthic algae
BWd
(x, y)
int32
100
- long_name :
- Benthic algae dry weight
- units :
- unitless
- description :
- Benthic algae dry weight
BWc
(x, y)
int32
40
- long_name :
- Benthic algae carbon
- units :
- unitless
- description :
- Benthic algae carbon
BWn
(x, y)
float64
7.2
- long_name :
- Benthic algae nitrogen
- units :
- unitless
- description :
- Benthic algae nitrogen
BWp
(x, y)
int32
1
- long_name :
- Benthic algae phosphorus
- units :
- unitless
- description :
- Benthic algae phosphorus
BWa
(x, y)
int32
3500
- long_name :
- Benthic algae Chla
- units :
- unitless
- description :
- Benthic algae Chla
KLb
(x, y)
int32
10
- long_name :
- Light limiting constant for benthic algae growth
- units :
- W/m^2
- description :
- Light limiting constant for benthic algae growth
KsNb
(x, y)
float64
0.25
- long_name :
- Half-Saturation N limiting constant for Benthic algae
- units :
- mg-N/L
- description :
- Half-Saturation N limiting constant for Benthic algae
KsPb
(x, y)
float64
0.125
- long_name :
- Half-Saturation P limiting constant for Benthic algae
- units :
- mg-P/L
- description :
- Half-Saturation P limiting constant for Benthic algae
Ksb
(x, y)
int32
10
- long_name :
- Half-Saturation density constant for benthic algae growth
- units :
- g-D/m^2
- description :
- Half-Saturation density constant for benthic algae growth
mub_max_20
(x, y)
float64
0.4
- long_name :
- Maximum benthic algal growth rate
- units :
- 1/d
- description :
- maximum benthic algal growth rate
krb_20
(x, y)
float64
0.2
- long_name :
- Benthic algal respiration rate
- units :
- 1/d
- description :
- Benthic algal respiration rate
kdb_20
(x, y)
float64
0.3
- long_name :
- Benthic algal mortality rate
- units :
- 1/d
- description :
- Benthic algal mortality rate
b_growth_rate_option
(x, y)
int32
1
- long_name :
- Benthic Algal growth rate options
- units :
- unitless
- description :
- Benthic Algal growth rate with two options: 1) Multiplicative, 2) Limiting Nutritent
b_light_limitation_option
(x, y)
int32
1
- long_name :
- Benthic Algal light limitation rate options
- units :
- unitless
- description :
- Benthic Algal light limitation rate with three options: 1) Half-saturation formulation, 2) Smiths Model, 3) Steeles Model
KNR
(x, y)
float64
0.6
- long_name :
- Oxygen inhabitation factor for nitrification
- units :
- mg-O2/L
- description :
- Oxygen inhabitation factor for nitrification
knit_20
(x, y)
float64
0.1
- long_name :
- Nitrification Rate Ammonia decay at 20C
- units :
- 1/d
- description :
- Nitrification Rate Ammonia NH4 -> NO3 decay at 20C
kon_20
(x, y)
float64
0.1
- long_name :
- Decay Rate of OrgN to NH4 at 20C
- units :
- 1/d
- description :
- Decay Rate of OrgN to NH4 at 20C
kdnit_20
(x, y)
float64
0.002
- long_name :
- Denitrification rate at 20C
- units :
- 1/d
- description :
- Denitrification rate at 20C
rnh4_20
(x, y)
int32
0
- long_name :
- Sediment release rate of NH4 at 20C
- units :
- g-N/m^2/d
- description :
- Sediment release rate of NH4 at 20C
vno3_20
(x, y)
int32
0
- long_name :
- Sediment denitrification velocity at 20C
- units :
- m/d
- description :
- Sediment denitrification velocity at 20C
KsOxdn
(x, y)
float64
0.1
- long_name :
- Half-saturation oxygen inhibition constant for denitrification
- units :
- mg-O2/L
- description :
- Half-saturation oxygen inhibition constant for denitrification
PN
(x, y)
float64
0.5
- long_name :
- NH4 preference factor algae
- units :
- unitless
- description :
- NH4 preference factor algae (1=full NH4, 0=full NO3)
PNb
(x, y)
float64
0.5
- long_name :
- NH4 preference factor benthic algae
- units :
- unitless
- description :
- NH4 preference factor benthic algae (1=full NH4, 0=full NO3)
kop_20
(x, y)
float64
0.1
- long_name :
- Decay rate of organic P to DIP
- units :
- 1/d
- description :
- Decay rate of organic P to DIP
rpo4_20
(x, y)
int32
0
- long_name :
- Benthic sediment release rate of DIP
- units :
- g-P/m^2/d
- description :
- Benthic sediment release rate of DIP
kdpo4
(x, y)
float64
0.0
- long_name :
- solid partitioning coeff. of PO4
- units :
- L/kg
- description :
- solid partitioning coeff. of PO4
kpom_20
(x, y)
float64
0.1
- long_name :
- POM dissolution rate at 20C
- units :
- 1/d
- description :
- POM dissolution rate at 20C
kbod_20
(x, y)
float64
0.12
- long_name :
- CBOD oxidation rate at 20C
- units :
- 1/d
- description :
- CBOD oxidation rate at 20C
ksbod_20
(x, y)
int32
0
- long_name :
- CBOD sedimentation rate at 20C
- units :
- m/d
- description :
- CBOD sedimentation rate at 20C
KsOxbod
(x, y)
float64
0.5
- long_name :
- Half saturation oxygen attenuation constant for CBOD oxidation
- units :
- mg-O2/L
- description :
- Half saturation oxygen attenuation constant for CBOD oxidation
f_pocp
(x, y)
float64
0.9
- long_name :
- Fraction of algal mortality into POC
- units :
- unitless
- description :
- Fraction of dead algae that converts to particulate organic carbon
kdoc_20
(x, y)
float64
0.01
- long_name :
- Dissolved organic carbon oxidation rate
- units :
- 1/d
- description :
- Dissolved organic carbon oxidation rate
f_pocb
(x, y)
float64
0.9
- long_name :
- fraction of benthic algal mortality into POC
- units :
- unitless
- description :
- fraction of benthic algal mortality into POC
kpoc_20
(x, y)
float64
0.005
- long_name :
- POC hydrolysis rate at 20 degrees Celsius
- units :
- 1/d
- description :
- POC hydrolysis rate at 20 degrees Celsius
KsOxmc
(x, y)
float64
1.0
- long_name :
- half saturation oxygen attenuation constant for DOC oxidation rate
- units :
- mg-O2/L
- description :
- half saturation oxygen attenuation constant for DOC oxidation rate
pCO2
(x, y)
int32
383
- long_name :
- partial atmospheric CO2 pressure
- units :
- ppm
- description :
- partial pressure of CO2 in the atmosphere
FCO2
(x, y)
float64
0.2
- long_name :
- CO2 reaeration rate
- units :
- 1/d
- description :
- CO2 reaeration rate
roc
(x, y)
float64
2.667
- long_name :
- O2:C ratio for carbon oxidation
- units :
- mg-O2/mg-C
- description :
- O2:C ratio for carbon oxidation (32/12)
ron
(x, y)
float64
4.571
- long_name :
- O2:N ratio for nitrification
- units :
- mg-O2/mg-N
- description :
- O2:N ratio for nitrification (2*32/14)
KsSOD
(x, y)
int32
1
- long_name :
- half saturation oxygen attenuation constant for SOD
- units :
- mg/L
- description :
- half saturation oxygen attenuation constant for SOD
kdx_20
(x, y)
float64
0.8
- long_name :
- Pathogen death rate at 20C
- units :
- 1/d
- description :
- Pathogen death rate at 20C
apx
(x, y)
int32
1
- long_name :
- Light efficiency factor for pathogen decay
- units :
- unitless
- description :
- Light efficiency factor for pathogen decay
vx
(x, y)
int32
1
- long_name :
- Pathogen net settling velocity
- units :
- unitless
- description :
- Pathogen net settling velocity
r_alkaa
(x, y)
int32
1
- long_name :
- Ratio translating algal growth into Alk if NH4 is the N source
- units :
- eq/ug-Chla
- description :
- Ratio translating algal growth into Alk if NH4 is the N source
r_alkan
(x, y)
int32
1
- long_name :
- Ratio translating algal growth into Alk if NO3 is the N source
- units :
- eq/ug-Chla
- description :
- Ratio translating algal growth into Alk if NO3 is the N source
r_alkn
(x, y)
int32
1
- long_name :
- Ratio translating NH4 nitrification into Alk
- units :
- eq/mg-N
- description :
- Ratio translating NH4 nitrification into Alk
r_alkden
(x, y)
int32
1
- long_name :
- Ratio translating NO3 denitrification into Alk
- units :
- eq/mg-N
- description :
- Ratio translating NO3 denitrification into Alk
r_alkba
(x, y)
int32
1
- long_name :
- Ratio translating benthic algae growth into Alk if NH4 is the N source
- units :
- eq/mg-D
- description :
- Ratio translating benthic algae growth into Alk if NH4 is the N source
r_alkbn
(x, y)
int32
1
- long_name :
- Ratio translating benthic algae growth into Alk if NO3 is the N source
- units :
- eq/mg-D
- description :
- Ratio translating benthic algae growth into Alk if NO3 is the N source
TwaterK
(year, x, y)
float64
nan 293.2
- long_name :
- Water Temperature K
- units :
- K
- description :
- Water temperature degree kelvin
array([[[ nan]],\n",
+ " [[2.89504416e+04]]])
vson
(x, y)
float64
0.01
- long_name :
- Organic N settling velocity
- units :
- m/d
- description :
- Organic N settling velocity
vsoc
(x, y)
float64
0.01
- long_name :
- POC settling velocity
- units :
- m/d
- description :
- POC settling velocity
vsop
(x, y)
int32
999
- long_name :
- Organic phosphorus settling velocity
- units :
- m/d
- description :
- Organic phosphorus settling velocity
vs
(x, y)
int32
999
- long_name :
- Sediment settling velocity
- units :
- m/d
- description :
- Sediment settling velocity
SOD_20
(x, y)
int32
999
- long_name :
- Sediment oxygen demand at 20 degrees C
- units :
- g-O2/m/d
- description :
- Sediment oxygen demand at 20 degrees C
SOD_theta
(x, y)
int32
999
- long_name :
- Arrhenius coefficient for sediment oxygen demand
- units :
- unitless
- description :
- Arrhenius coefficient for sediment oxygen demand
fcom
(x, y)
float64
0.4
- long_name :
- Fraction of carbon in organic matter
- units :
- mg-C/mg-D
- description :
- Fraction of carbon in organic matter
vb
(x, y)
float64
0.01
- long_name :
- Burial velocity
- units :
- m/d
- description :
- Rate at which constituents are buried on the bottom
kaw_20_user
(x, y)
int32
999
- long_name :
- Wind oxygen reaeration velocity at 20C
- units :
- m/d
- description :
- Wind oxygen reaeration velocity at 20C
kah_20_user
(x, y)
int32
999
- long_name :
- Hydraulic oxygen reaeration rate at 20C
- units :
- 1/d
- description :
- Hydraulic oxygen reaeration rate at 20C
hydraulic_reaeration_option
(x, y)
int32
2
- long_name :
- Option for chosing the method by which O2 reaeration rate is calculated
- units :
- unitless
- description :
- Selects method for computing O2 reaeration rate
wind_reaeration_option
(x, y)
int32
2
- long_name :
- Option for chosing the method by which wind reaeration is calculated
- units :
- unitless
- description :
- Selects method for computing O2 reaeration due to wind
use_NH4
(x, y)
bool
True
- long_name :
- Use ammonium module
- units :
- unitless
- description :
- True/False use ammonium module
use_NO3
(x, y)
bool
True
- long_name :
- Use nitrate module
- units :
- unitless
- description :
- True/False use nitrate module
use_OrgN
(x, y)
bool
True
- long_name :
- Use organic nitrogen module
- units :
- unitless
- description :
- True/False use organic nitrogen module
use_SedFlux
(x, y)
bool
False
- long_name :
- Use sediment flux module
- units :
- unitless
- description :
- True/False use sediment flux module
use_DOX
(x, y)
bool
True
- long_name :
- Use dissolved oxygen module
- units :
- unitless
- description :
- True/False use dissolved oxygen module
use_Algae
(x, y)
bool
True
- long_name :
- Use algae module
- units :
- unitless
- description :
- True/False use algae module
use_Balgae
(x, y)
bool
True
- long_name :
- Use benthic algae module
- units :
- unitless
- description :
- True/False use benthic algae module
use_TIP
(x, y)
bool
True
- long_name :
- Use total inorganic phosphorus module
- units :
- unitless
- description :
- True/False use total inorganic phosphorus module
use_OrgP
(x, y)
bool
True
- long_name :
- Use total organic phosphorus module
- units :
- unitless
- description :
- True/False use total organic phosphorus module
use_POC
(x, y)
bool
True
- long_name :
- Use particulate organic carbon module
- units :
- unitless
- description :
- True/False use particulate organic carbon module
use_DOC
(x, y)
bool
True
- long_name :
- Use dissolved organic carbon module
- units :
- unitless
- description :
- True/False use dissolved organic carbon module
use_DIC
(x, y)
bool
True
- long_name :
- Use dissolved inorganic carbon module
- units :
- unitless
- description :
- True/False use dissolved inorganic carbon module
use_N2
(x, y)
bool
True
- long_name :
- Use dissolved N2 module
- units :
- unitless
- description :
- True/False use N2 module
use_Pathogen
(x, y)
bool
True
- long_name :
- Use pathogen module
- units :
- unitless
- description :
- True/False use pathogen module
use_Alk
(x, y)
bool
True
- long_name :
- Use alkalinity module
- units :
- unitless
- description :
- True/False use alkalinity module
use_POM
(x, y)
bool
True
- long_name :
- Use particulate organic matter module
- units :
- unitless
- description :
- True/False use particulate organic matter module
timestep
(x, y)
int32
86400
- long_name :
- timestep
- units :
- d
- description :
- calculation timestep
depth
(x, y)
int32
1
- long_name :
- Depth of water in cell
- units :
- m
- description :
- Depth of water in cell
TwaterC
(x, y)
int32
20
- long_name :
- Water temperature in celsius
- units :
- degrees C
- description :
- Water temperature in celsius
theta
(x, y)
float64
1.047
- long_name :
- Water temperature theta adjustment factor
- units :
- unitless
- description :
- Water temperature theta adjustment factor
velocity
(x, y)
int32
1
- long_name :
- velocity
- units :
- m/s
- description :
- Average water velocity in cell
flow
(x, y)
int32
2
- long_name :
- flow
- units :
- m3/s
- description :
- Average flow rate in cell
topwidth
(x, y)
int32
1
- long_name :
- topwidth
- units :
- m
- description :
- Average topwidth of cell
slope
(x, y)
int32
2
- long_name :
- slope
- units :
- TODO
- description :
- Average slope of bottom surface
shear_velocity
(x, y)
int32
4
- long_name :
- shear_velocity
- units :
- TODO
- description :
- Average shear velocity on bottom surface
pressure_atm
(x, y)
int32
2
- long_name :
- pressure_atm
- units :
- TODO
- description :
- atmospheric pressure in atm
wind_speed
(x, y)
int32
4
- long_name :
- Wind speed at 10 meters above the water surface
- units :
- m/s
- description :
- Wind speed at 10 meters above the water surface
q_solar
(x, y)
int32
4
- long_name :
- Incident short-wave solar radiation
- units :
- W/m2
- description :
- Incident short-wave solar radiation
Solid
(x, y)
int32
1
- long_name :
- Solid reaeration option
- units :
- Unknown
- description :
- Solid
AWd
(x, y)
int32
100
- long_name :
- Algal Dry Weight
- units :
- mg
- description :
- Algal Dry Weight
AWc
(x, y)
int32
40
- long_name :
- Carbon Weight
- units :
- mg
- description :
- Carbon Weight
AWn
(x, y)
float64
7.2
- long_name :
- Nitrogen Weight
- units :
- mg
- description :
- Nitrogen Weight
AWp
(x, y)
int32
1
- long_name :
- Phosphorus Weight
- units :
- mg
- description :
- Phosphorus Weight
AWa
(x, y)
int32
1000
- long_name :
- Algal Chlorophyll
- units :
- ug Chla
- description :
- Algal Chlorophyll
KL
(x, y)
int32
10
- long_name :
- Light Limiting Constant for Algal Growth
- units :
- W/m^2
- description :
- Light Limiting Constant for Algal Growth
KsN
(x, y)
float64
0.04
- long_name :
- Half-Saturation N Limiting Constant for Algal Growth
- units :
- mg-N/L
- description :
- Half-Saturation N Limiting Constant for Algal Growth
KsP
(x, y)
float64
0.0012
- long_name :
- Half-Saturation P Limiting Constant for Algal Growth
- units :
- mg-P/L
- description :
- Half-Saturation P Limiting Constant for Algal Growth
mu_max_20
(x, y)
int32
1
- long_name :
- Max Algae Growth
- units :
- 1/d
- description :
- Max Algae Growth at 20C
kdp_20
(x, y)
float64
0.15
- long_name :
- Algal Mortality Rate
- units :
- 1/d
- description :
- Algal Mortality Rate at 20C
krp_20
(x, y)
float64
0.2
- long_name :
- Algal Respiration Rate
- units :
- 1/d
- description :
- Algal Respiration Rate at 20C
vsap
(x, y)
float64
0.15
- long_name :
- Algal Setting Velocity
- units :
- m/d
- description :
- Algal Setting Velocity
growth_rate_option
(x, y)
int32
1
- long_name :
- Growth Rate Option
- units :
- 1/d
- description :
- Algal growth rate option 1) multiplicative, 2) Limiting Nutrient, 3) Harmonic Mean Option
light_limitation_option
(x, y)
int32
1
- long_name :
- Light Limitation Option
- units :
- 1/d
- description :
- Algal light limitation 1) half-saturation, 2) Smith model, 3) Steele model
lambda0
(x, y)
float64
0.02
- long_name :
- lambda0
- units :
- 1/m
- description :
- background portion
lambda1
(x, y)
float64
0.0088
- long_name :
- lambda1
- units :
- 1/m/(ug Chla/L)
- description :
- linear self shading
lambda2
(x, y)
float64
0.054
- long_name :
- lambda2
- units :
- unitless
- description :
- nonlinear
lambdas
(x, y)
float64
0.052
- long_name :
- lambdas
- units :
- L/mg/m
- description :
- ISS portion
lambdam
(x, y)
float64
0.0174
- long_name :
- lambdam
- units :
- L/mg/m
- description :
- POM portion
Fr_PAR
(x, y)
float64
0.47
- long_name :
- fraction PAR
- units :
- unitless
- description :
- fraction of solar radiation within the PAR of the spectrum
Fw
(x, y)
float64
0.9
- long_name :
- Fraction of benthic algae mortality into water column
- units :
- unitless
- description :
- Fraction of benthic algae mortality into water column
Fb
(x, y)
float64
0.9
- long_name :
- Fraction of bottom area available for benthic algae
- units :
- unitless
- description :
- Fraction of bottom area available for benthic algae
BWd
(x, y)
int32
100
- long_name :
- Benthic algae dry weight
- units :
- unitless
- description :
- Benthic algae dry weight
BWc
(x, y)
int32
40
- long_name :
- Benthic algae carbon
- units :
- unitless
- description :
- Benthic algae carbon
BWn
(x, y)
float64
7.2
- long_name :
- Benthic algae nitrogen
- units :
- unitless
- description :
- Benthic algae nitrogen
BWp
(x, y)
int32
1
- long_name :
- Benthic algae phosphorus
- units :
- unitless
- description :
- Benthic algae phosphorus
BWa
(x, y)
int32
3500
- long_name :
- Benthic algae Chla
- units :
- unitless
- description :
- Benthic algae Chla
KLb
(x, y)
int32
10
- long_name :
- Light limiting constant for benthic algae growth
- units :
- W/m^2
- description :
- Light limiting constant for benthic algae growth
KsNb
(x, y)
float64
0.25
- long_name :
- Half-Saturation N limiting constant for Benthic algae
- units :
- mg-N/L
- description :
- Half-Saturation N limiting constant for Benthic algae
KsPb
(x, y)
float64
0.125
- long_name :
- Half-Saturation P limiting constant for Benthic algae
- units :
- mg-P/L
- description :
- Half-Saturation P limiting constant for Benthic algae
Ksb
(x, y)
int32
10
- long_name :
- Half-Saturation density constant for benthic algae growth
- units :
- g-D/m^2
- description :
- Half-Saturation density constant for benthic algae growth
mub_max_20
(x, y)
float64
0.4
- long_name :
- Maximum benthic algal growth rate
- units :
- 1/d
- description :
- maximum benthic algal growth rate
krb_20
(x, y)
float64
0.2
- long_name :
- Benthic algal respiration rate
- units :
- 1/d
- description :
- Benthic algal respiration rate
kdb_20
(x, y)
float64
0.3
- long_name :
- Benthic algal mortality rate
- units :
- 1/d
- description :
- Benthic algal mortality rate
b_growth_rate_option
(x, y)
int32
1
- long_name :
- Benthic Algal growth rate options
- units :
- unitless
- description :
- Benthic Algal growth rate with two options: 1) Multiplicative, 2) Limiting Nutritent
b_light_limitation_option
(x, y)
int32
1
- long_name :
- Benthic Algal light limitation rate options
- units :
- unitless
- description :
- Benthic Algal light limitation rate with three options: 1) Half-saturation formulation, 2) Smiths Model, 3) Steeles Model
KNR
(x, y)
float64
0.6
- long_name :
- Oxygen inhabitation factor for nitrification
- units :
- mg-O2/L
- description :
- Oxygen inhabitation factor for nitrification
knit_20
(x, y)
float64
0.1
- long_name :
- Nitrification Rate Ammonia decay at 20C
- units :
- 1/d
- description :
- Nitrification Rate Ammonia NH4 -> NO3 decay at 20C
kon_20
(x, y)
float64
0.1
- long_name :
- Decay Rate of OrgN to NH4 at 20C
- units :
- 1/d
- description :
- Decay Rate of OrgN to NH4 at 20C
kdnit_20
(x, y)
float64
0.002
- long_name :
- Denitrification rate at 20C
- units :
- 1/d
- description :
- Denitrification rate at 20C
rnh4_20
(x, y)
int32
0
- long_name :
- Sediment release rate of NH4 at 20C
- units :
- g-N/m^2/d
- description :
- Sediment release rate of NH4 at 20C
vno3_20
(x, y)
int32
0
- long_name :
- Sediment denitrification velocity at 20C
- units :
- m/d
- description :
- Sediment denitrification velocity at 20C
KsOxdn
(x, y)
float64
0.1
- long_name :
- Half-saturation oxygen inhibition constant for denitrification
- units :
- mg-O2/L
- description :
- Half-saturation oxygen inhibition constant for denitrification
PN
(x, y)
float64
0.5
- long_name :
- NH4 preference factor algae
- units :
- unitless
- description :
- NH4 preference factor algae (1=full NH4, 0=full NO3)
PNb
(x, y)
float64
0.5
- long_name :
- NH4 preference factor benthic algae
- units :
- unitless
- description :
- NH4 preference factor benthic algae (1=full NH4, 0=full NO3)
kop_20
(x, y)
float64
0.1
- long_name :
- Decay rate of organic P to DIP
- units :
- 1/d
- description :
- Decay rate of organic P to DIP
rpo4_20
(x, y)
int32
0
- long_name :
- Benthic sediment release rate of DIP
- units :
- g-P/m^2/d
- description :
- Benthic sediment release rate of DIP
kdpo4
(x, y)
float64
0.0
- long_name :
- solid partitioning coeff. of PO4
- units :
- L/kg
- description :
- solid partitioning coeff. of PO4
kpom_20
(x, y)
float64
0.1
- long_name :
- POM dissolution rate at 20C
- units :
- 1/d
- description :
- POM dissolution rate at 20C
kbod_20
(x, y)
float64
0.12
- long_name :
- CBOD oxidation rate at 20C
- units :
- 1/d
- description :
- CBOD oxidation rate at 20C
ksbod_20
(x, y)
int32
0
- long_name :
- CBOD sedimentation rate at 20C
- units :
- m/d
- description :
- CBOD sedimentation rate at 20C
KsOxbod
(x, y)
float64
0.5
- long_name :
- Half saturation oxygen attenuation constant for CBOD oxidation
- units :
- mg-O2/L
- description :
- Half saturation oxygen attenuation constant for CBOD oxidation
f_pocp
(x, y)
float64
0.9
- long_name :
- Fraction of algal mortality into POC
- units :
- unitless
- description :
- Fraction of dead algae that converts to particulate organic carbon
kdoc_20
(x, y)
float64
0.01
- long_name :
- Dissolved organic carbon oxidation rate
- units :
- 1/d
- description :
- Dissolved organic carbon oxidation rate
f_pocb
(x, y)
float64
0.9
- long_name :
- fraction of benthic algal mortality into POC
- units :
- unitless
- description :
- fraction of benthic algal mortality into POC
kpoc_20
(x, y)
float64
0.005
- long_name :
- POC hydrolysis rate at 20 degrees Celsius
- units :
- 1/d
- description :
- POC hydrolysis rate at 20 degrees Celsius
KsOxmc
(x, y)
float64
1.0
- long_name :
- half saturation oxygen attenuation constant for DOC oxidation rate
- units :
- mg-O2/L
- description :
- half saturation oxygen attenuation constant for DOC oxidation rate
pCO2
(x, y)
int32
383
- long_name :
- partial atmospheric CO2 pressure
- units :
- ppm
- description :
- partial pressure of CO2 in the atmosphere
FCO2
(x, y)
float64
0.2
- long_name :
- CO2 reaeration rate
- units :
- 1/d
- description :
- CO2 reaeration rate
roc
(x, y)
float64
2.667
- long_name :
- O2:C ratio for carbon oxidation
- units :
- mg-O2/mg-C
- description :
- O2:C ratio for carbon oxidation (32/12)
ron
(x, y)
float64
4.571
- long_name :
- O2:N ratio for nitrification
- units :
- mg-O2/mg-N
- description :
- O2:N ratio for nitrification (2*32/14)
KsSOD
(x, y)
int32
1
- long_name :
- half saturation oxygen attenuation constant for SOD
- units :
- mg/L
- description :
- half saturation oxygen attenuation constant for SOD
kdx_20
(x, y)
float64
0.8
- long_name :
- Pathogen death rate at 20C
- units :
- 1/d
- description :
- Pathogen death rate at 20C
apx
(x, y)
int32
1
- long_name :
- Light efficiency factor for pathogen decay
- units :
- unitless
- description :
- Light efficiency factor for pathogen decay
vx
(x, y)
int32
1
- long_name :
- Pathogen net settling velocity
- units :
- unitless
- description :
- Pathogen net settling velocity
r_alkaa
(x, y)
int32
1
- long_name :
- Ratio translating algal growth into Alk if NH4 is the N source
- units :
- eq/ug-Chla
- description :
- Ratio translating algal growth into Alk if NH4 is the N source
r_alkan
(x, y)
int32
1
- long_name :
- Ratio translating algal growth into Alk if NO3 is the N source
- units :
- eq/ug-Chla
- description :
- Ratio translating algal growth into Alk if NO3 is the N source
r_alkn
(x, y)
int32
1
- long_name :
- Ratio translating NH4 nitrification into Alk
- units :
- eq/mg-N
- description :
- Ratio translating NH4 nitrification into Alk
r_alkden
(x, y)
int32
1
- long_name :
- Ratio translating NO3 denitrification into Alk
- units :
- eq/mg-N
- description :
- Ratio translating NO3 denitrification into Alk
r_alkba
(x, y)
int32
1
- long_name :
- Ratio translating benthic algae growth into Alk if NH4 is the N source
- units :
- eq/mg-D
- description :
- Ratio translating benthic algae growth into Alk if NH4 is the N source
r_alkbn
(x, y)
int32
1
- long_name :
- Ratio translating benthic algae growth into Alk if NO3 is the N source
- units :
- eq/mg-D
- description :
- Ratio translating benthic algae growth into Alk if NO3 is the N source
TwaterK
(year, x, y)
float64
nan 293.2
- long_name :
- Water Temperature K
- units :
- K
- description :
- Water temperature degree kelvin
array([[[ nan]],\n",
"\n",
- " [[293.16]]])
SOD_tc
(year, x, y)
float64
nan 499.5
- long_name :
- Sediment Oxygen Demand at water temperature tc
- units :
- mg/L
- description :
- Sediment Oxygen Demand at water temperature tc
array([[[ nan]],\n",
+ " [[293.16]]])
SOD_tc
(year, x, y)
float64
nan 499.5
- long_name :
- Sediment Oxygen Demand at water temperature tc
- units :
- mg/L
- description :
- Sediment Oxygen Demand at water temperature tc
array([[[ nan]],\n",
"\n",
- " [[499.5]]])
kah_20
(year, x, y)
float64
nan 3.93
- long_name :
- Hydraulic oxygen reaeration rate adjusted for hydraulics
- units :
- 1/d
- description :
- Hydraulic oxygen reaeration rate adjusted for hydraulic parameters according to XX lit
array([[[ nan]],\n",
+ " [[499.5]]])
kah_20
(year, x, y)
float64
nan 3.93
- long_name :
- Hydraulic oxygen reaeration rate adjusted for hydraulics
- units :
- 1/d
- description :
- Hydraulic oxygen reaeration rate adjusted for hydraulic parameters according to XX lit
array([[[ nan]],\n",
"\n",
- " [[3.93]]])
kah_tc
(year, x, y)
float64
nan 3.93
- long_name :
- Hydraulic oxygen reaeration rate adjusted for temperature
- units :
- 1/d
- description :
- Hydraulic oxygen reaeration rate adjusted for temperature
array([[[ nan]],\n",
+ " [[3.93]]])
kah_tc
(year, x, y)
float64
nan 3.93
- long_name :
- Hydraulic oxygen reaeration rate adjusted for temperature
- units :
- 1/d
- description :
- Hydraulic oxygen reaeration rate adjusted for temperature
array([[[ nan]],\n",
"\n",
- " [[3.93]]])
kaw_20
(year, x, y)
float64
nan 4.35
- long_name :
- Wind oxygen reaeration velocity adjusted for hydraulics
- units :
- m/d
- description :
- Wind oxygen reaeration velocity adjusted for hydraulic parameters according to XX lit
array([[[ nan]],\n",
+ " [[3.93]]])
kaw_20
(year, x, y)
float64
nan 4.35
- long_name :
- Wind oxygen reaeration velocity adjusted for hydraulics
- units :
- m/d
- description :
- Wind oxygen reaeration velocity adjusted for hydraulic parameters according to XX lit
array([[[ nan]],\n",
"\n",
- " [[4.35037249]]])
kaw_tc
(year, x, y)
float64
nan 4.35
- long_name :
- Wind oxygen reaeration velocity adjusted for temperature
- units :
- m/d
- description :
- Wind oxygen reaeration velocity adjusted for temperature
array([[[ nan]],\n",
+ " [[4.35037249]]])
kaw_tc
(year, x, y)
float64
nan 4.35
- long_name :
- Wind oxygen reaeration velocity adjusted for temperature
- units :
- m/d
- description :
- Wind oxygen reaeration velocity adjusted for temperature
array([[[ nan]],\n",
"\n",
- " [[4.35037249]]])
ka_tc
(year, x, y)
float64
nan 8.28
- long_name :
- Oxygen reaeration rate
- units :
- 1/d
- description :
- Oxygen reaeration rate
array([[[ nan]],\n",
+ " [[4.35037249]]])
ka_tc
(year, x, y)
float64
nan 8.28
- long_name :
- Oxygen reaeration rate
- units :
- 1/d
- description :
- Oxygen reaeration rate
array([[[ nan]],\n",
"\n",
- " [[8.28037249]]])
L
(year, x, y)
float64
nan 3.25
- long_name :
- Light attenuation coefficient
- units :
- unitless
- description :
- Light attenuation coefficient
array([[[ nan]],\n",
+ " [[8.28037249]]])
L
(year, x, y)
float64
nan 0.1263
- long_name :
- Light attenuation coefficient
- units :
- unitless
- description :
- Light attenuation coefficient
array([[[ nan]],\n",
"\n",
- " [[3.25]]])
PAR
(year, x, y)
float64
nan 2.0
- long_name :
- surface light intensity
- units :
- W/m2
- description :
- surface light intensity
array([[[nan]],\n",
+ " [[0.1263]]])
PAR
(year, x, y)
float64
nan 1.88
- long_name :
- surface light intensity
- units :
- W/m2
- description :
- surface light intensity
array([[[ nan]],\n",
"\n",
- " [[ 2.]]])
fdp
(year, x, y)
float64
nan 1.0
- long_name :
- Fraction phosphorus dissolved
- units :
- Unitless
- description :
- Fraction phosphorus dissolved
array([[[nan]],\n",
+ " [[1.88]]])
fdp
(year, x, y)
float64
nan 1.0
- long_name :
- Fraction phosphorus dissolved
- units :
- Unitless
- description :
- Fraction phosphorus dissolved
array([[[nan]],\n",
"\n",
- " [[ 1.]]])
rna
(year, x, y)
float64
nan 0.0072
- long_name :
- Algal N:Chla Ratio
- units :
- mg-N/ug Chla
- description :
- Algal N:Chla Ratio
array([[[ nan]],\n",
+ " [[ 1.]]])
rna
(year, x, y)
float64
nan 0.0072
- long_name :
- Algal N:Chla Ratio
- units :
- mg-N/ug Chla
- description :
- Algal N:Chla Ratio
array([[[ nan]],\n",
"\n",
- " [[0.0072]]])
rpa
(year, x, y)
float64
nan 0.001
- long_name :
- Algal P:Chla Ratio
- units :
- mg-P/ug Chla
- description :
- Algal P:Chla Ratio
array([[[ nan]],\n",
+ " [[0.0072]]])
rpa
(year, x, y)
float64
nan 0.001
- long_name :
- Algal P:Chla Ratio
- units :
- mg-P/ug Chla
- description :
- Algal P:Chla Ratio
array([[[ nan]],\n",
"\n",
- " [[0.001]]])
rca
(year, x, y)
float64
nan 0.04
- long_name :
- Algal C:Chla Ratio
- units :
- mg-C/ug Chla
- description :
- Algal C:Chla Ratio
array([[[ nan]],\n",
+ " [[0.001]]])
rca
(year, x, y)
float64
nan 0.04
- long_name :
- Algal C:Chla Ratio
- units :
- mg-C/ug Chla
- description :
- Algal C:Chla Ratio
array([[[ nan]],\n",
"\n",
- " [[0.04]]])
rda
(year, x, y)
float64
nan 0.1
- long_name :
- Algal D:Chla Ratio
- units :
- mg-D/ug Chla
- description :
- Algal D:Chla Ratio
array([[[nan]],\n",
+ " [[0.04]]])
rda
(year, x, y)
float64
nan 0.1
- long_name :
- Algal D:Chla Ratio
- units :
- mg-D/ug Chla
- description :
- Algal D:Chla Ratio
array([[[nan]],\n",
"\n",
- " [[0.1]]])
mu_max_tc
(year, x, y)
float64
nan 1.0
- long_name :
- Max Algae Growth with Temperature Correction
- units :
- 1/d
- description :
- Max Algae Growth with Temperature Correction
array([[[nan]],\n",
+ " [[0.1]]])
mu_max_tc
(year, x, y)
float64
nan 1.0
- long_name :
- Max Algae Growth with Temperature Correction
- units :
- 1/d
- description :
- Max Algae Growth with Temperature Correction
array([[[nan]],\n",
"\n",
- " [[ 1.]]])
krp_tc
(year, x, y)
float64
nan 0.2
- long_name :
- Algal Respiration Rate with Temperature Correction
- units :
- 1/d
- description :
- Algal Respiration Rate with Temperature Correction
array([[[nan]],\n",
+ " [[ 1.]]])
krp_tc
(year, x, y)
float64
nan 0.2
- long_name :
- Algal Respiration Rate with Temperature Correction
- units :
- 1/d
- description :
- Algal Respiration Rate with Temperature Correction
array([[[nan]],\n",
"\n",
- " [[0.2]]])
kdp_tc
(year, x, y)
float64
nan 0.15
- long_name :
- Algal Mortality Rate with Temperature Correction
- units :
- 1/d
- description :
- Algal Mortality Rate with Temperature Correction
array([[[ nan]],\n",
+ " [[0.2]]])
kdp_tc
(year, x, y)
float64
nan 0.15
- long_name :
- Algal Mortality Rate with Temperature Correction
- units :
- 1/d
- description :
- Algal Mortality Rate with Temperature Correction
array([[[ nan]],\n",
"\n",
- " [[0.15]]])
FL
(year, x, y)
float64
nan 0.05372
- long_name :
- Algal Light Limitation
- units :
- unitless
- description :
- Algal Light Limitation
array([[[ nan]],\n",
+ " [[0.15]]])
FL
(year, x, y)
float64
nan 0.1501
- long_name :
- Algal Light Limitation
- units :
- unitless
- description :
- Algal Light Limitation
array([[[ nan]],\n",
"\n",
- " [[0.05372204]]])
FN
(year, x, y)
float64
nan 0.9804
- long_name :
- Algal Nitrogen Limitation
- units :
- unitless
- description :
- Algal Nitrogen Limitation
array([[[ nan]],\n",
+ " [[0.15007688]]])
FN
(year, x, y)
float64
nan 0.9804
- long_name :
- Algal Nitrogen Limitation
- units :
- unitless
- description :
- Algal Nitrogen Limitation
array([[[ nan]],\n",
"\n",
- " [[0.98039216]]])
FP
(year, x, y)
float64
nan 0.9988
- long_name :
- Algal Phosphorus Limitation
- units :
- unitless
- description :
- Algal Phosphorus Limitation
array([[[ nan]],\n",
+ " [[0.98039216]]])
FP
(year, x, y)
float64
nan 0.9988
- long_name :
- Algal Phosphorus Limitation
- units :
- unitless
- description :
- Algal Phosphorus Limitation
array([[[ nan]],\n",
"\n",
- " [[0.99880144]]])
mu
(year, x, y)
float64
nan 0.05261
- long_name :
- Algal Growth Rate
- units :
- 1/d
- description :
- Algal Growth Rate
array([[[ nan]],\n",
+ " [[0.99880144]]])
mu
(year, x, y)
float64
nan 0.147
- long_name :
- Algal Growth Rate
- units :
- 1/d
- description :
- Algal Growth Rate
array([[[ nan]],\n",
"\n",
- " [[0.05260554]]])
ApGrowth
(year, x, y)
float64
nan 0.05261
- long_name :
- Algal Growth
- units :
- ug-Chala/L/d
- description :
- Algal Growth
array([[[ nan]],\n",
+ " [[0.14695785]]])
ApGrowth
(year, x, y)
float64
nan 0.147
- long_name :
- Algal Growth
- units :
- ug-Chala/L/d
- description :
- Algal Growth
array([[[ nan]],\n",
"\n",
- " [[0.05260554]]])
ApRespiration
(year, x, y)
float64
nan 0.2
- long_name :
- Algal Respiration
- units :
- ug-Chala/L/d
- description :
- Algal Respiration
array([[[nan]],\n",
+ " [[0.14695785]]])
ApRespiration
(year, x, y)
float64
nan 0.2
- long_name :
- Algal Respiration
- units :
- ug-Chala/L/d
- description :
- Algal Respiration
array([[[nan]],\n",
"\n",
- " [[0.2]]])
ApDeath
(year, x, y)
float64
nan 0.15
- long_name :
- Algal Death
- units :
- ug-Chala/L/d
- description :
- Algal Death
array([[[ nan]],\n",
+ " [[0.2]]])
ApDeath
(year, x, y)
float64
nan 0.15
- long_name :
- Algal Death
- units :
- ug-Chala/L/d
- description :
- Algal Death
array([[[ nan]],\n",
"\n",
- " [[0.15]]])
ApSettling
(year, x, y)
float64
nan 0.15
- long_name :
- Algal Settling
- units :
- ug-Chala/L/d
- description :
- Algal Settling
array([[[ nan]],\n",
+ " [[0.15]]])
ApSettling
(year, x, y)
float64
nan 0.15
- long_name :
- Algal Settling
- units :
- ug-Chala/L/d
- description :
- Algal Settling
array([[[ nan]],\n",
"\n",
- " [[0.15]]])
dApdt
(year, x, y)
float64
nan -0.4474
- long_name :
- Algal Biomass Concentration Change
- units :
- ug-Chala/L/d
- description :
- Algal Biomass Concentration Change
array([[[ nan]],\n",
+ " [[0.15]]])
dApdt
(year, x, y)
float64
nan -0.353
- long_name :
- Algal Biomass Concentration Change
- units :
- ug-Chala/L/d
- description :
- Algal Biomass Concentration Change
array([[[ nan]],\n",
"\n",
- " [[-0.44739446]]])
mub_max_tc
(year, x, y)
float64
nan 0.4
- long_name :
- Maximum benthic algal growth rate
- units :
- 1/d
- description :
- Maximum benthic algal growth rate with temperature correction
array([[[nan]],\n",
+ " [[-0.35304215]]])
mub_max_tc
(year, x, y)
float64
nan 0.4
- long_name :
- Maximum benthic algal growth rate
- units :
- 1/d
- description :
- Maximum benthic algal growth rate with temperature correction
array([[[nan]],\n",
"\n",
- " [[0.4]]])
krb_tc
(year, x, y)
float64
nan 0.2
- long_name :
- Benthic algae respiration rate
- units :
- 1/d
- description :
- Benthic algae respiration rate with temperature correction
array([[[nan]],\n",
+ " [[0.4]]])
krb_tc
(year, x, y)
float64
nan 0.2
- long_name :
- Benthic algae respiration rate
- units :
- 1/d
- description :
- Benthic algae respiration rate with temperature correction
array([[[nan]],\n",
"\n",
- " [[0.2]]])
kdb_tc
(year, x, y)
float64
nan 0.3
- long_name :
- Benthic algae mortality rate
- units :
- 1/d
- description :
- Benthic algae mortality rate with temperature correction
array([[[nan]],\n",
+ " [[0.2]]])
kdb_tc
(year, x, y)
float64
nan 0.3
- long_name :
- Benthic algae mortality rate
- units :
- 1/d
- description :
- Benthic algae mortality rate with temperature correction
array([[[nan]],\n",
"\n",
- " [[0.3]]])
rnb
(year, x, y)
float64
nan 0.072
- long_name :
- Ratio nitrogen to dry weight
- units :
- mg-N/mg-D
- description :
- Ratio benthic algae nitrogen to dry weight
array([[[ nan]],\n",
+ " [[0.3]]])
rnb
(year, x, y)
float64
nan 0.072
- long_name :
- Ratio nitrogen to dry weight
- units :
- mg-N/mg-D
- description :
- Ratio benthic algae nitrogen to dry weight
array([[[ nan]],\n",
"\n",
- " [[0.072]]])
rpb
(year, x, y)
float64
nan 0.01
- long_name :
- Ratio benthic algae phosphorus to dry weight
- units :
- mg-P/mg-D
- description :
- Ratio benthic algae phosphorus to dry weight
array([[[ nan]],\n",
+ " [[0.072]]])
rpb
(year, x, y)
float64
nan 0.01
- long_name :
- Ratio benthic algae phosphorus to dry weight
- units :
- mg-P/mg-D
- description :
- Ratio benthic algae phosphorus to dry weight
array([[[ nan]],\n",
"\n",
- " [[0.01]]])
rcb
(year, x, y)
float64
nan 0.4
- long_name :
- Ratio benthic algae carbon to dry weight
- units :
- mg-C/mg-D
- description :
- Ratio benthic algae carbon to dry weight
array([[[nan]],\n",
+ " [[0.01]]])
rcb
(year, x, y)
float64
nan 0.4
- long_name :
- Ratio benthic algae carbon to dry weight
- units :
- mg-C/mg-D
- description :
- Ratio benthic algae carbon to dry weight
array([[[nan]],\n",
"\n",
- " [[0.4]]])
rab
(year, x, y)
float64
nan 35.0
- long_name :
- Ratio benthic algae chlorophyll-a to dry weight
- units :
- ug-Chala-a/mg-D
- description :
- Ratio benthic algae chlorophyll-a to dry weight
array([[[nan]],\n",
+ " [[0.4]]])
rab
(year, x, y)
float64
nan 35.0
- long_name :
- Ratio benthic algae chlorophyll-a to dry weight
- units :
- ug-Chala-a/mg-D
- description :
- Ratio benthic algae chlorophyll-a to dry weight
array([[[nan]],\n",
"\n",
- " [[35.]]])
FLb
(year, x, y)
float64
nan 0.007695
- long_name :
- Benthic algal light limitation factor
- units :
- unitless
- description :
- Benthic algal light limitation factor
array([[[ nan]],\n",
+ " [[35.]]])
FLb
(year, x, y)
float64
nan 0.1421
- long_name :
- Benthic algal light limitation factor
- units :
- unitless
- description :
- Benthic algal light limitation factor
array([[[ nan]],\n",
"\n",
- " [[0.00769517]]])
FNb
(year, x, y)
float64
nan 0.8889
- long_name :
- Benthic algal nitrogen limitation factor
- units :
- unitless
- description :
- Benthic algal nitrogen limitation factor
array([[[ nan]],\n",
+ " [[0.14214184]]])
FNb
(year, x, y)
float64
nan 0.8889
- long_name :
- Benthic algal nitrogen limitation factor
- units :
- unitless
- description :
- Benthic algal nitrogen limitation factor
array([[[ nan]],\n",
"\n",
- " [[0.88888889]]])
FPb
(year, x, y)
float64
nan 0.8889
- long_name :
- Benthic algal phosphorous limitation factor
- units :
- unitless
- description :
- Benthic algal phosphorous limitation factor
array([[[ nan]],\n",
+ " [[0.88888889]]])
FPb
(year, x, y)
float64
nan 0.8889
- long_name :
- Benthic algal phosphorous limitation factor
- units :
- unitless
- description :
- Benthic algal phosphorous limitation factor
array([[[ nan]],\n",
"\n",
- " [[0.88888889]]])
FSb
(year, x, y)
float64
nan 0.9091
- long_name :
- Benthic algal density attenuation
- units :
- unitless
- description :
- Benthic algal density attenuation
array([[[ nan]],\n",
+ " [[0.88888889]]])
FSb
(year, x, y)
float64
nan 0.9091
- long_name :
- Benthic algal density attenuation
- units :
- unitless
- description :
- Benthic algal density attenuation
array([[[ nan]],\n",
"\n",
- " [[0.90909091]]])
mub
(year, x, y)
float64
nan 0.002211
- long_name :
- Benthic algae specific growth rate
- units :
- 1/d
- description :
- Benthic algae specific growth rate
array([[[ nan]],\n",
+ " [[0.90909091]]])
mub
(year, x, y)
float64
nan 0.04084
- long_name :
- Benthic algae specific growth rate
- units :
- 1/d
- description :
- Benthic algae specific growth rate
array([[[ nan]],\n",
"\n",
- " [[0.00221096]]])
AbGrowth
(year, x, y)
float64
nan 0.002211
- long_name :
- Benthic algae growth rate
- units :
- g/m^2/d
- description :
- Benthic algae growth rate
array([[[ nan]],\n",
+ " [[0.04083986]]])
AbGrowth
(year, x, y)
float64
nan 0.04084
- long_name :
- Benthic algae growth rate
- units :
- g/m^2/d
- description :
- Benthic algae growth rate
array([[[ nan]],\n",
"\n",
- " [[0.00221096]]])
AbRespiration
(year, x, y)
float64
nan 0.2
- long_name :
- Benthic algae respiration rate
- units :
- g/m^2/d
- description :
- Benthic algae respiration rate
array([[[nan]],\n",
+ " [[0.04083986]]])
AbRespiration
(year, x, y)
float64
nan 0.2
- long_name :
- Benthic algae respiration rate
- units :
- g/m^2/d
- description :
- Benthic algae respiration rate
array([[[nan]],\n",
"\n",
- " [[0.2]]])
AbDeath
(year, x, y)
float64
nan 0.3
- long_name :
- Benthic algae death rate
- units :
- g/m^2/d
- description :
- Benthic algae death rate
array([[[nan]],\n",
+ " [[0.2]]])
AbDeath
(year, x, y)
float64
nan 0.3
- long_name :
- Benthic algae death rate
- units :
- g/m^2/d
- description :
- Benthic algae death rate
array([[[nan]],\n",
"\n",
- " [[0.3]]])
dAbdt
(year, x, y)
float64
nan -0.4978
- long_name :
- Change in benthic algae concentration
- units :
- g/m^2/d
- description :
- Change in benthic algae concentration
array([[[ nan]],\n",
+ " [[0.3]]])
dAbdt
(year, x, y)
float64
nan -0.4592
- long_name :
- Change in benthic algae concentration
- units :
- g/m^2/d
- description :
- Change in benthic algae concentration
array([[[ nan]],\n",
"\n",
- " [[-0.49778904]]])
Chlb
(year, x, y)
float64
nan 35.0
- long_name :
- Chlorophyll-a concentration
- units :
- mg-Chla/m^2
- description :
- Chlorophyll-a concentration
array([[[nan]],\n",
+ " [[-0.45916014]]])
Chlb
(year, x, y)
float64
nan 35.0
- long_name :
- Chlorophyll-a concentration
- units :
- mg-Chla/m^2
- description :
- Chlorophyll-a concentration
array([[[nan]],\n",
"\n",
- " [[35.]]])
knit_tc
(year, x, y)
float64
nan 0.1
- long_name :
- Nitrification rate ammonia decay
- units :
- 1/d
- description :
- Nitrification rate ammonia decay temperature correction
array([[[nan]],\n",
+ " [[35.]]])
knit_tc
(year, x, y)
float64
nan 0.1
- long_name :
- Nitrification rate ammonia decay
- units :
- 1/d
- description :
- Nitrification rate ammonia decay temperature correction
array([[[nan]],\n",
"\n",
- " [[0.1]]])
rnh4_tc
(year, x, y)
float64
nan 0.0
- long_name :
- Sediment release rate of NH4
- units :
- 1/d
- description :
- Sediment release rate of NH4 temperature correction
array([[[nan]],\n",
+ " [[0.1]]])
rnh4_tc
(year, x, y)
float64
nan 0.0
- long_name :
- Sediment release rate of NH4
- units :
- 1/d
- description :
- Sediment release rate of NH4 temperature correction
array([[[nan]],\n",
"\n",
- " [[ 0.]]])
vno3_tc
(year, x, y)
float64
nan 0.0
- long_name :
- Sediment denitrification velocity
- units :
- m/d
- description :
- Sediment denitrification velocity temperature correction
array([[[nan]],\n",
+ " [[ 0.]]])
vno3_tc
(year, x, y)
float64
nan 0.0
- long_name :
- Sediment denitrification velocity
- units :
- m/d
- description :
- Sediment denitrification velocity temperature correction
array([[[nan]],\n",
"\n",
- " [[ 0.]]])
kon_tc
(year, x, y)
float64
nan 0.1
- long_name :
- Decay rate of OrgN to NH4
- units :
- 1/d
- description :
- Decay rate of OrgN to NH4 temperature correction
array([[[nan]],\n",
+ " [[ 0.]]])
kon_tc
(year, x, y)
float64
nan 0.1
- long_name :
- Decay rate of OrgN to NH4
- units :
- 1/d
- description :
- Decay rate of OrgN to NH4 temperature correction
array([[[nan]],\n",
"\n",
- " [[0.1]]])
kdnit_tc
(year, x, y)
float64
nan 0.002
- long_name :
- Denitrification rate
- units :
- 1/d
- description :
- Denitrification rate temperature correction
array([[[ nan]],\n",
+ " [[0.1]]])
kdnit_tc
(year, x, y)
float64
nan 0.002
- long_name :
- Denitrification rate
- units :
- 1/d
- description :
- Denitrification rate temperature correction
array([[[ nan]],\n",
"\n",
- " [[0.002]]])
ApUptakeFr_NH4
(year, x, y)
float64
nan 0.5
- long_name :
- Fraction of actual floating algal uptake from ammonia pool
- units :
- unitless
- description :
- Fraction of actual floating algal uptake from ammonia pool
array([[[nan]],\n",
+ " [[0.002]]])
ApUptakeFr_NH4
(year, x, y)
float64
nan 0.5
- long_name :
- Fraction of actual floating algal uptake from ammonia pool
- units :
- unitless
- description :
- Fraction of actual floating algal uptake from ammonia pool
array([[[nan]],\n",
"\n",
- " [[0.5]]])
ApUptakeFr_NO3
(year, x, y)
float64
nan 0.5
- long_name :
- Fraction of actual floating algal uptake from nitrate pool
- units :
- unitless
- description :
- Fraction of actual floating algal uptake from nitrate pool
array([[[nan]],\n",
+ " [[0.5]]])
ApUptakeFr_NO3
(year, x, y)
float64
nan 0.5
- long_name :
- Fraction of actual floating algal uptake from nitrate pool
- units :
- unitless
- description :
- Fraction of actual floating algal uptake from nitrate pool
array([[[nan]],\n",
"\n",
- " [[0.5]]])
AbUptakeFr_NH4
(year, x, y)
float64
nan 0.5
- long_name :
- Fraction of actual benthic algal uptake from ammonia pool
- units :
- unitless
- description :
- Fraction of actual benthic algal uptake from ammonia pool
array([[[nan]],\n",
+ " [[0.5]]])
AbUptakeFr_NH4
(year, x, y)
float64
nan 0.5
- long_name :
- Fraction of actual benthic algal uptake from ammonia pool
- units :
- unitless
- description :
- Fraction of actual benthic algal uptake from ammonia pool
array([[[nan]],\n",
"\n",
- " [[0.5]]])
AbUptakeFr_NO3
(year, x, y)
float64
nan 0.5
- long_name :
- Fraction of actual benthic algal uptake from nitrate pool
- units :
- unitless
- description :
- Fraction of actual benthic algal uptake from nitrate pool
array([[[nan]],\n",
+ " [[0.5]]])
AbUptakeFr_NO3
(year, x, y)
float64
nan 0.5
- long_name :
- Fraction of actual benthic algal uptake from nitrate pool
- units :
- unitless
- description :
- Fraction of actual benthic algal uptake from nitrate pool
array([[[nan]],\n",
"\n",
- " [[0.5]]])
ApDeath_OrgN
(year, x, y)
float64
nan 0.00108
- long_name :
- Algae -> OrgN
- units :
- mg-N/L/d
- description :
- Algae conversion to Organic nitrogen
array([[[ nan]],\n",
+ " [[0.5]]])
ApDeath_OrgN
(year, x, y)
float64
nan 0.00108
- long_name :
- Algae -> OrgN
- units :
- mg-N/L/d
- description :
- Algae conversion to Organic nitrogen
array([[[ nan]],\n",
"\n",
- " [[0.00108]]])
AbDeath_OrgN
(year, x, y)
float64
nan 0.0175
- long_name :
- Benthic Algae -> OrgN
- units :
- mg-N/L/d
- description :
- Benthic algae conversion to Organic nitrogen
array([[[ nan]],\n",
+ " [[0.00108]]])
AbDeath_OrgN
(year, x, y)
float64
nan 0.0175
- long_name :
- Benthic Algae -> OrgN
- units :
- mg-N/L/d
- description :
- Benthic algae conversion to Organic nitrogen
array([[[ nan]],\n",
"\n",
- " [[0.017496]]])
OrgN_NH4_Decay
(year, x, y)
float64
nan 0.1
- long_name :
- OrgN -> NH4
- units :
- mg-N/L/d
- description :
- Organic nitrogen to ammonium decay
array([[[nan]],\n",
+ " [[0.017496]]])
OrgN_NH4_Decay
(year, x, y)
float64
nan 0.1
- long_name :
- OrgN -> NH4
- units :
- mg-N/L/d
- description :
- Organic nitrogen to ammonium decay
array([[[nan]],\n",
"\n",
- " [[0.1]]])
OrgN_Settling
(year, x, y)
float64
nan 0.01
- long_name :
- OrgN -> bed
- units :
- mg-N/L/d
- description :
- Organic nitrogen to bed settling
array([[[ nan]],\n",
+ " [[0.1]]])
OrgN_Settling
(year, x, y)
float64
nan 0.01
- long_name :
- OrgN -> bed
- units :
- mg-N/L/d
- description :
- Organic nitrogen to bed settling
array([[[ nan]],\n",
"\n",
- " [[0.01]]])
dOrgNdt
(year, x, y)
float64
nan -0.09142
- long_name :
- Change in organic nitrogen
- units :
- mg-N/L
- description :
- Change in organic nitrogen
array([[[ nan]],\n",
+ " [[0.01]]])
dOrgNdt
(year, x, y)
float64
nan -0.09142
- long_name :
- Change in organic nitrogen
- units :
- mg-N/L
- description :
- Change in organic nitrogen
array([[[ nan]],\n",
"\n",
- " [[-0.091424]]])
NH4fromBed
(year, x, y)
float64
nan 0.0
- long_name :
- bed -> NH4 (diffusion)
- units :
- mg-N/L/d
- description :
- Sediment bed release of NH4
array([[[nan]],\n",
+ " [[-0.091424]]])
NH4_Nitrification
(year, x, y)
float64
nan 0.04512
- long_name :
- NH4 -> NO3 Nitrification
- units :
- mg-N/L/d
- description :
- NH4 Nitrification
array([[[ nan]],\n",
"\n",
- " [[ 0.]]])
NH4_ApRespiration
(year, x, y)
float64
nan 0.00144
- long_name :
- Floating algae -> NH4
- units :
- mg-N/L/d
- description :
- Floating algae to NH4
array([[[ nan]],\n",
+ " [[0.04511884]]])
NH4fromBed
(year, x, y)
float64
nan 0.0
- long_name :
- bed -> NH4 (diffusion)
- units :
- mg-N/L/d
- description :
- Sediment bed release of NH4
array([[[nan]],\n",
"\n",
- " [[0.00144]]])
NH4_ApGrowth
(year, x, y)
float64
nan 0.0001894
- long_name :
- NH4 -> Floating algae
- units :
- mg-N/L/d
- description :
- NH4 uptake to algae
array([[[ nan]],\n",
+ " [[ 0.]]])
NH4_ApRespiration
(year, x, y)
float64
nan 0.00144
- long_name :
- Floating algae -> NH4
- units :
- mg-N/L/d
- description :
- Floating algae to NH4
array([[[ nan]],\n",
"\n",
- " [[0.00018938]]])
NH4_AbRespiration
(year, x, y)
float64
nan 0.0144
- long_name :
- Benthic algae -> NH4
- units :
- mg-N/L/d
- description :
- Benthic algae release of NH4
array([[[ nan]],\n",
+ " [[0.00144]]])
NH4_ApGrowth
(year, x, y)
float64
nan 0.000529
- long_name :
- NH4 -> Floating algae
- units :
- mg-N/L/d
- description :
- NH4 uptake to algae
array([[[ nan]],\n",
"\n",
- " [[0.0144]]])
NH4_AbGrowth
(year, x, y)
float64
nan 7.164e-05
- long_name :
- NH4 -> Benthic Algae
- units :
- mg-N/L/d
- description :
- Benthic algae uptake of NH4
array([[[ nan]],\n",
+ " [[0.00052905]]])
NH4_AbRespiration
(year, x, y)
float64
nan 0.0144
- long_name :
- Benthic algae -> NH4
- units :
- mg-N/L/d
- description :
- Benthic algae release of NH4
array([[[ nan]],\n",
"\n",
- " [[7.1635007e-05]]])
NO3_Denit
(year, x, y)
float64
nan 0.0001818
- long_name :
- NO3 -> Loss
- units :
- mg-N/L/d
- description :
- NO3 loss from denitrification
array([[[ nan]],\n",
+ " [[0.0144]]])
NH4_AbGrowth
(year, x, y)
float64
nan 0.001323
- long_name :
- NH4 -> Benthic Algae
- units :
- mg-N/L/d
- description :
- Benthic algae uptake of NH4
array([[[ nan]],\n",
"\n",
- " [[0.00018182]]])
NO3_BedDenit
(year, x, y)
float64
nan 0.0
- long_name :
- Sediment denitrification
- units :
- mg-N/L/d
- description :
- Sediment denitrification
array([[[nan]],\n",
+ " [[0.00132321]]])
dNH4dt
(year, x, y)
float64
nan 0.06887
- long_name :
- Change in ammonium concentration
- units :
- mg-N/L
- description :
- Change in ammonium concentration
array([[[ nan]],\n",
"\n",
- " [[ 0.]]])
NO3_ApGrowth
(year, x, y)
float64
nan 0.0001894
- long_name :
- NO3 -> Floating algae
- units :
- mg-N/L/d
- description :
- NO3 uptake to floating algae
array([[[ nan]],\n",
+ " [[0.0688689]]])
NO3_Denit
(year, x, y)
float64
nan 0.0001818
- long_name :
- NO3 -> Loss
- units :
- mg-N/L/d
- description :
- NO3 loss from denitrification
array([[[ nan]],\n",
"\n",
- " [[0.00018938]]])
NO3_AbGrowth
(year, x, y)
float64
nan 7.164e-05
- long_name :
- NO3 -> Benthic algae
- units :
- mg-N/L/d
- description :
- NO3 uptake to benthic algae
array([[[ nan]],\n",
+ " [[0.00018182]]])
NO3_BedDenit
(year, x, y)
float64
nan 0.0
- long_name :
- Sediment denitrification
- units :
- mg-N/L/d
- description :
- Sediment denitrification
array([[[nan]],\n",
"\n",
- " [[7.1635007e-05]]])
DIN
(year, x, y)
float64
nan 2.0
- long_name :
- Dissolve inorganic nitrogen
- units :
- mg-N/L
- description :
- Dissolve inorganic nitrogen
array([[[nan]],\n",
+ " [[ 0.]]])
NO3_ApGrowth
(year, x, y)
float64
nan 0.000529
- long_name :
- NO3 -> Floating algae
- units :
- mg-N/L/d
- description :
- NO3 uptake to floating algae
array([[[ nan]],\n",
"\n",
- " [[ 2.]]])
TON
(year, x, y)
float64
nan 1.007
- long_name :
- Total organic nitrogen
- units :
- mg-N/L
- description :
- Total organic nitrogen
array([[[ nan]],\n",
+ " [[0.00052905]]])
NO3_AbGrowth
(year, x, y)
float64
nan 0.001323
- long_name :
- NO3 -> Benthic algae
- units :
- mg-N/L/d
- description :
- NO3 uptake to benthic algae
array([[[ nan]],\n",
"\n",
- " [[1.0072]]])
TKN
(year, x, y)
float64
nan 2.007
- long_name :
- Total kjeldhl nitrogen
- units :
- mg-N/L
- description :
- Total kjeldhl nitrogen
array([[[ nan]],\n",
+ " [[0.00132321]]])
dNO3dt
(year, x, y)
float64
nan 0.04308
- long_name :
- Change in nitrate concentration
- units :
- mg-N/L
- description :
- Change in nitrate concentration
array([[[ nan]],\n",
"\n",
- " [[2.0072]]])
TN
(year, x, y)
float64
nan 3.007
- long_name :
- Total nitrogen
- units :
- mg-N/L
- description :
- Total nitrogen
array([[[ nan]],\n",
+ " [[0.04308476]]])
DIN
(year, x, y)
float64
nan 2.0
- long_name :
- Dissolve inorganic nitrogen
- units :
- mg-N/L
- description :
- Dissolve inorganic nitrogen
array([[[nan]],\n",
"\n",
- " [[3.0072]]])
NitrificationInhibition
(year, x, y)
float64
nan 0.4512
- long_name :
- Nitrification Inhibitation (limits nitrification under low DO conditions)
- units :
- unitless
- description :
- Nitrification Inhibitation (limits nitrification under low DO conditions)
array([[[ nan]],\n",
+ " [[ 2.]]])
TON
(year, x, y)
float64
nan 1.007
- long_name :
- Total organic nitrogen
- units :
- mg-N/L
- description :
- Total organic nitrogen
array([[[ nan]],\n",
"\n",
- " [[0.45118836]]])
kop_tc
(year, x, y)
float64
nan 0.1
- long_name :
- Decay rate of organic P to DIP
- units :
- 1/d
- description :
- Decay rate of organic P to DIP temperature correction
array([[[nan]],\n",
+ " [[1.0072]]])
TKN
(year, x, y)
float64
nan 2.007
- long_name :
- Total kjeldhl nitrogen
- units :
- mg-N/L
- description :
- Total kjeldhl nitrogen
array([[[ nan]],\n",
"\n",
- " [[0.1]]])
rpo4_tc
(year, x, y)
float64
nan 0.0
- long_name :
- Benthic sediment release rate of DIP
- units :
- g-P/m2/d
- description :
- Benthic sediment release rate of DIP temperature correction
array([[[nan]],\n",
+ " [[2.0072]]])
TN
(year, x, y)
float64
nan 3.007
- long_name :
- Total nitrogen
- units :
- mg-N/L
- description :
- Total nitrogen
array([[[ nan]],\n",
"\n",
- " [[ 0.]]])
OrgP_DIP_decay
(year, x, y)
float64
nan 0.1
- long_name :
- Organic phosphorus decay to dissolve inorganic phosphorus
- units :
- mg-P/L/d
- description :
- Organic phosphorus decay to dissolve inorganic phosphorus
array([[[nan]],\n",
+ " [[3.0072]]])
NitrificationInhibition
(year, x, y)
float64
nan 0.4512
- long_name :
- Nitrification Inhibitation (limits nitrification under low DO conditions)
- units :
- unitless
- description :
- Nitrification Inhibitation (limits nitrification under low DO conditions)
array([[[ nan]],\n",
"\n",
- " [[0.1]]])
OrgP_Settling
(year, x, y)
float64
nan 999.0
- long_name :
- Organic phosphorus settling to sediment
- units :
- mg-P/L/d
- description :
- Organic phosphorus settling to sediment
array([[[ nan]],\n",
+ " [[0.45118836]]])
kop_tc
(year, x, y)
float64
nan 0.1
- long_name :
- Decay rate of organic P to DIP
- units :
- 1/d
- description :
- Decay rate of organic P to DIP temperature correction
array([[[nan]],\n",
"\n",
- " [[999.]]])
ApDeath_OrgP
(year, x, y)
float64
nan 0.00015
- long_name :
- Algal death turning into organic phosphorus
- units :
- mg-P/L/d
- description :
- Algal death turning into organic phosphorus
array([[[ nan]],\n",
+ " [[0.1]]])
rpo4_tc
(year, x, y)
float64
nan 0.0
- long_name :
- Benthic sediment release rate of DIP
- units :
- g-P/m2/d
- description :
- Benthic sediment release rate of DIP temperature correction
array([[[nan]],\n",
"\n",
- " [[0.00015]]])
AbDeath_OrgP
(year, x, y)
float64
nan 0.00243
- long_name :
- Benthic algal death turning into organic phosphorus
- units :
- mg-P/L/d
- description :
- Benthic algal death turning into organic phosphorus
array([[[ nan]],\n",
+ " [[ 0.]]])
OrgP_DIP_decay
(year, x, y)
float64
nan 0.1
- long_name :
- Organic phosphorus decay to dissolve inorganic phosphorus
- units :
- mg-P/L/d
- description :
- Organic phosphorus decay to dissolve inorganic phosphorus
array([[[nan]],\n",
"\n",
- " [[0.00243]]])
dOrgPdt
(year, x, y)
float64
nan -999.1
- long_name :
- Change in organic phosphorus concentration
- units :
- mg-P/L/d
- description :
- Change in organic phosphorus concentration
array([[[ nan]],\n",
+ " [[0.1]]])
OrgP_Settling
(year, x, y)
float64
nan 999.0
- long_name :
- Organic phosphorus settling to sediment
- units :
- mg-P/L/d
- description :
- Organic phosphorus settling to sediment
array([[[ nan]],\n",
"\n",
- " [[-999.09742]]])
DIPfromBed
(year, x, y)
float64
nan 0.0
- long_name :
- Dissolved Organic Phosphorus coming from Bed calculated without SedFlux modules
- units :
- mg-P/L/d
- description :
- Dissolved Organic Phosphorus coming from Bed calculated without SedFlux modules
array([[[nan]],\n",
+ " [[999.]]])
ApDeath_OrgP
(year, x, y)
float64
nan 0.00015
- long_name :
- Algal death turning into organic phosphorus
- units :
- mg-P/L/d
- description :
- Algal death turning into organic phosphorus
array([[[ nan]],\n",
"\n",
- " [[ 0.]]])
TIP_Settling
(year, x, y)
float64
nan 0.0
- long_name :
- Total inorganic phosphorus settling from water to bed
- units :
- mg-P/L/d
- description :
- Total inorganic phosphorus settling from water to bed
array([[[nan]],\n",
+ " [[0.00015]]])
AbDeath_OrgP
(year, x, y)
float64
nan 0.00243
- long_name :
- Benthic algal death turning into organic phosphorus
- units :
- mg-P/L/d
- description :
- Benthic algal death turning into organic phosphorus
array([[[ nan]],\n",
"\n",
- " [[ 0.]]])
DIP_ApRespiration
(year, x, y)
float64
nan 0.0002
- long_name :
- Dissolved inorganic phosphorus released from algal respiration
- units :
- mg-P/L/d
- description :
- Dissolved inorganic phosphorus released from algal respiration
array([[[ nan]],\n",
+ " [[0.00243]]])
dOrgPdt
(year, x, y)
float64
nan -999.1
- long_name :
- Change in organic phosphorus concentration
- units :
- mg-P/L/d
- description :
- Change in organic phosphorus concentration
array([[[ nan]],\n",
"\n",
- " [[0.0002]]])
DIP_ApGrowth
(year, x, y)
float64
nan 5.261e-05
- long_name :
- Dissolved inorganic phosphorus consumed for algal growth
- units :
- mg-P/L/d
- description :
- Dissolved inorganic phosphorus consumed for algal growth
array([[[ nan]],\n",
+ " [[-999.09742]]])
DIPfromBed
(year, x, y)
float64
nan 0.0
- long_name :
- Dissolved Organic Phosphorus coming from Bed calculated without SedFlux modules
- units :
- mg-P/L/d
- description :
- Dissolved Organic Phosphorus coming from Bed calculated without SedFlux modules
array([[[nan]],\n",
"\n",
- " [[5.26055399e-05]]])
DIP_AbRespiration
(year, x, y)
float64
nan 0.002
- long_name :
- Dissolved inorganic phosphorus released for benthic algal respiration
- units :
- mg-P/L/d
- description :
- Dissolved inorganic phosphorus released for benthic algal respiration
array([[[ nan]],\n",
+ " [[ 0.]]])
TIP_Settling
(year, x, y)
float64
nan 0.0
- long_name :
- Total inorganic phosphorus settling from water to bed
- units :
- mg-P/L/d
- description :
- Total inorganic phosphorus settling from water to bed
array([[[nan]],\n",
"\n",
- " [[0.002]]])
DIP_AbGrowth
(year, x, y)
float64
nan 1.99e-05
- long_name :
- Dissolved inorganic phosphorus consumed for benthic algal growth
- units :
- mg-P/L/d
- description :
- Dissolved inorganic phosphorus consumed for benthic algal growth
array([[[ nan]],\n",
+ " [[ 0.]]])
DIP_ApRespiration
(year, x, y)
float64
nan 0.0002
- long_name :
- Dissolved inorganic phosphorus released from algal respiration
- units :
- mg-P/L/d
- description :
- Dissolved inorganic phosphorus released from algal respiration
array([[[ nan]],\n",
"\n",
- " [[1.98986131e-05]]])
dTIPdt
(year, x, y)
float64
nan 0.1021
- long_name :
- Change in dissolved inorganic phosphorus water concentration
- units :
- mg-P/L/d
- description :
- Change in dissolved inorganic phosphorus water concentration
array([[[ nan]],\n",
+ " [[0.0002]]])
DIP_ApGrowth
(year, x, y)
float64
nan 0.000147
- long_name :
- Dissolved inorganic phosphorus consumed for algal growth
- units :
- mg-P/L/d
- description :
- Dissolved inorganic phosphorus consumed for algal growth
array([[[ nan]],\n",
"\n",
- " [[0.1021275]]])
TOP
(year, x, y)
float64
nan 1.001
- long_name :
- Total organic phosphorus
- units :
- mg-P/L
- description :
- Total organic phosphorus
array([[[ nan]],\n",
+ " [[0.00014696]]])
DIP_AbRespiration
(year, x, y)
float64
nan 0.002
- long_name :
- Dissolved inorganic phosphorus released for benthic algal respiration
- units :
- mg-P/L/d
- description :
- Dissolved inorganic phosphorus released for benthic algal respiration
array([[[ nan]],\n",
"\n",
- " [[1.001]]])
TP
(year, x, y)
float64
nan 2.001
- long_name :
- Total phosphorus
- units :
- mg-P/L
- description :
- Total phosphorus
array([[[ nan]],\n",
+ " [[0.002]]])
DIP_AbGrowth
(year, x, y)
float64
nan 0.0003676
- long_name :
- Dissolved inorganic phosphorus consumed for benthic algal growth
- units :
- mg-P/L/d
- description :
- Dissolved inorganic phosphorus consumed for benthic algal growth
array([[[ nan]],\n",
"\n",
- " [[2.001]]])
DIP
(year, x, y)
float64
nan 1.0
- long_name :
- Dissolve inorganic phosphorus
- units :
- mg-P/L
- description :
- Dissolve inorganic phosphorus
array([[[nan]],\n",
+ " [[0.00036756]]])
dTIPdt
(year, x, y)
float64
nan 0.1017
- long_name :
- Change in dissolved inorganic phosphorus water concentration
- units :
- mg-P/L/d
- description :
- Change in dissolved inorganic phosphorus water concentration
array([[[ nan]],\n",
"\n",
- " [[ 1.]]])
kpom_tc
(year, x, y)
float64
nan 0.1
- long_name :
- POM dissolution rate adjusted for temperature
- units :
- 1/d
- description :
- POM dissolution rate adjusted for temperature
array([[[nan]],\n",
+ " [[0.10168548]]])
TOP
(year, x, y)
float64
nan 1.001
- long_name :
- Total organic phosphorus
- units :
- mg-P/L
- description :
- Total organic phosphorus
array([[[ nan]],\n",
"\n",
- " [[0.1]]])
POM_algal_settling
(year, x, y)
float64
nan 0.015
- long_name :
- POM concentration change due to algal settling
- units :
- mg/L/d
- description :
- POM concentration change due to algal settling
array([[[ nan]],\n",
+ " [[1.001]]])
TP
(year, x, y)
float64
nan 2.001
- long_name :
- Total phosphorus
- units :
- mg-P/L
- description :
- Total phosphorus
array([[[ nan]],\n",
"\n",
- " [[0.015]]])
POM_dissolution
(year, x, y)
float64
nan 0.1
- long_name :
- POM concentration change due to dissolution
- units :
- mg/L/d
- description :
- POM concentration change due to dissolution
array([[[nan]],\n",
+ " [[2.001]]])
DIP
(year, x, y)
float64
nan 1.0
- long_name :
- Dissolve inorganic phosphorus
- units :
- mg-P/L
- description :
- Dissolve inorganic phosphorus
array([[[nan]],\n",
"\n",
- " [[0.1]]])
POM_POC_settling
(year, x, y)
float64
nan 0.025
- long_name :
- POM concentration change due to POC settling
- units :
- mg/L/d
- description :
- POM concentration change due to POC settling
array([[[ nan]],\n",
+ " [[ 1.]]])
kpom_tc
(year, x, y)
float64
nan 0.1
- long_name :
- POM dissolution rate adjusted for temperature
- units :
- 1/d
- description :
- POM dissolution rate adjusted for temperature
array([[[nan]],\n",
"\n",
- " [[0.025]]])
POM_benthic_algae_mortality
(year, x, y)
float64
nan 0.027
- long_name :
- POM concentration change due to algae mortality
- units :
- mg/L/d
- description :
- POM concentration change due to algae mortality
array([[[ nan]],\n",
+ " [[0.1]]])
POM_algal_settling
(year, x, y)
float64
nan 0.015
- long_name :
- POM concentration change due to algal settling
- units :
- mg/L/d
- description :
- POM concentration change due to algal settling
array([[[ nan]],\n",
"\n",
- " [[0.027]]])
POM_burial
(year, x, y)
float64
nan 0.01
- long_name :
- POM concentration change due to burial
- units :
- mg/L/d
- description :
- POM concentration change due to burial
array([[[ nan]],\n",
+ " [[0.015]]])
POM_dissolution
(year, x, y)
float64
nan 0.1
- long_name :
- POM concentration change due to dissolution
- units :
- mg/L/d
- description :
- POM concentration change due to dissolution
array([[[nan]],\n",
"\n",
- " [[0.01]]])
dPOMdt
(year, x, y)
float64
nan -0.043
- long_name :
- Change in POM concentration for one timestep
- units :
- mg/L/d
- description :
- Change in POM concentration for one timestep
array([[[ nan]],\n",
+ " [[0.1]]])
POM_POC_settling
(year, x, y)
float64
nan 0.025
- long_name :
- POM concentration change due to POC settling
- units :
- mg/L/d
- description :
- POM concentration change due to POC settling
array([[[ nan]],\n",
"\n",
- " [[-0.043]]])
kbod_tc
(year, x, y)
float64
nan 0.12
- long_name :
- Temperature adjusted oxidation rate
- units :
- 1/d
- description :
- Temperature adjusted oxidation rate
array([[[ nan]],\n",
+ " [[0.025]]])
POM_benthic_algae_mortality
(year, x, y)
float64
nan 0.027
- long_name :
- POM concentration change due to algae mortality
- units :
- mg/L/d
- description :
- POM concentration change due to algae mortality
array([[[ nan]],\n",
"\n",
- " [[0.12]]])
ksbod_tc
(year, x, y)
float64
nan 0.0
- long_name :
- Temperature adjusted sedimentation rate
- units :
- m/d
- description :
- Temperature adjusted sedimentation rate
array([[[nan]],\n",
+ " [[0.027]]])
POM_burial
(year, x, y)
float64
nan 0.01
- long_name :
- POM concentration change due to burial
- units :
- mg/L/d
- description :
- POM concentration change due to burial
array([[[ nan]],\n",
"\n",
- " [[ 0.]]])
CBOD_oxidation
(year, x, y)
float64
nan 0.08
- long_name :
- CBOD oxidation
- units :
- mg/L/d
- description :
- CBOD oxidation
array([[[ nan]],\n",
+ " [[0.01]]])
dPOMdt
(year, x, y)
float64
nan -0.043
- long_name :
- Change in POM concentration for one timestep
- units :
- mg/L/d
- description :
- Change in POM concentration for one timestep
array([[[ nan]],\n",
"\n",
- " [[0.08]]])
CBOD_sedimentation
(year, x, y)
float64
nan 0.0
- long_name :
- CBOD sedimentation
- units :
- mg/L/d
- description :
- CBOD sedimentation
array([[[nan]],\n",
+ " [[-0.043]]])
kbod_tc
(year, x, y)
float64
nan 0.12
- long_name :
- Temperature adjusted oxidation rate
- units :
- 1/d
- description :
- Temperature adjusted oxidation rate
array([[[ nan]],\n",
"\n",
- " [[ 0.]]])
dCBODdt
(year, x, y)
float64
nan -0.08
- long_name :
- Change in CBOD concentration for the given timestep
- units :
- mg/L/d
- description :
- Change in CBOD concentration for the given timestep
array([[[ nan]],\n",
+ " [[0.12]]])
ksbod_tc
(year, x, y)
float64
nan 0.0
- long_name :
- Temperature adjusted sedimentation rate
- units :
- m/d
- description :
- Temperature adjusted sedimentation rate
array([[[nan]],\n",
"\n",
- " [[-0.08]]])
kpoc_tc
(year, x, y)
float64
nan 0.005
- long_name :
- Temperature adjusted POC hydrolysis rate
- units :
- 1/d
- description :
- Temperature adjusted POC hydrolysis rate
array([[[ nan]],\n",
+ " [[ 0.]]])
CBOD_oxidation
(year, x, y)
float64
nan 0.08
- long_name :
- CBOD oxidation
- units :
- mg/L/d
- description :
- CBOD oxidation
array([[[ nan]],\n",
"\n",
- " [[0.005]]])
POC_settling
(year, x, y)
float64
nan 0.01
- long_name :
- POC concentration removed from cell due to settling
- units :
- mg/L/d
- description :
- POC concentration removed from cell due to settling
array([[[ nan]],\n",
+ " [[0.08]]])
CBOD_sedimentation
(year, x, y)
float64
nan 0.0
- long_name :
- CBOD sedimentation
- units :
- mg/L/d
- description :
- CBOD sedimentation
array([[[nan]],\n",
"\n",
- " [[0.01]]])
POC_hydrolysis
(year, x, y)
float64
nan 0.005
- long_name :
- POC concentration removed from cell due to hydrolysis
- units :
- mg/L/d
- description :
- POC concentration removed from cell due to hydrolysis
array([[[ nan]],\n",
+ " [[ 0.]]])
dCBODdt
(year, x, y)
float64
nan -0.08
- long_name :
- Change in CBOD concentration for the given timestep
- units :
- mg/L/d
- description :
- Change in CBOD concentration for the given timestep
array([[[ nan]],\n",
"\n",
- " [[0.005]]])
POC_algal_mortality
(year, x, y)
float64
nan 0.0054
- long_name :
- POC concentration added to cell due to algal mortality
- units :
- mg/L/d
- description :
- POC concentration added to cell due to algal mortality
array([[[ nan]],\n",
+ " [[-0.08]]])
kpoc_tc
(year, x, y)
float64
nan 0.005
- long_name :
- Temperature adjusted POC hydrolysis rate
- units :
- 1/d
- description :
- Temperature adjusted POC hydrolysis rate
array([[[ nan]],\n",
"\n",
- " [[0.0054]]])
POC_benthic_algae_mortality
(year, x, y)
float64
nan 0.08748
- long_name :
- POC concentration added to cell due to benthic algae mortality
- units :
- mg/L/d
- description :
- POC concentration added to cell due to benthic algae mortality
array([[[ nan]],\n",
+ " [[0.005]]])
POC_settling
(year, x, y)
float64
nan 0.01
- long_name :
- POC concentration removed from cell due to settling
- units :
- mg/L/d
- description :
- POC concentration removed from cell due to settling
array([[[ nan]],\n",
"\n",
- " [[0.08748]]])
dPOCdt
(year, x, y)
float64
nan 0.07788
- long_name :
- POC concentration change per timestep
- units :
- mg/L/d
- description :
- POC concentration change per timestep
array([[[ nan]],\n",
+ " [[0.01]]])
POC_hydrolysis
(year, x, y)
float64
nan 0.005
- long_name :
- POC concentration removed from cell due to hydrolysis
- units :
- mg/L/d
- description :
- POC concentration removed from cell due to hydrolysis
array([[[ nan]],\n",
"\n",
- " [[0.07788]]])
kdoc_tc
(year, x, y)
float64
nan 0.01
- long_name :
- Dissolved organic carbon oxidation rate adjusted for temperature
- units :
- 1/d
- description :
- Dissolved organic carbon oxidation rate adjusted for temperature
array([[[ nan]],\n",
+ " [[0.005]]])
POC_algal_mortality
(year, x, y)
float64
nan 0.0054
- long_name :
- POC concentration added to cell due to algal mortality
- units :
- mg/L/d
- description :
- POC concentration added to cell due to algal mortality
array([[[ nan]],\n",
"\n",
- " [[0.01]]])
DOC_algal_mortality
(year, x, y)
float64
nan 0.0006
- long_name :
- DOC concentration added to cell due to algal mortality
- units :
- mg/L/d
- description :
- DOC concentration added to cell due to algal mortality
array([[[ nan]],\n",
+ " [[0.0054]]])
POC_benthic_algae_mortality
(year, x, y)
float64
nan 0.08748
- long_name :
- POC concentration added to cell due to benthic algae mortality
- units :
- mg/L/d
- description :
- POC concentration added to cell due to benthic algae mortality
array([[[ nan]],\n",
"\n",
- " [[0.0006]]])
DOC_benthic_algae_mortality
(year, x, y)
float64
nan 0.00972
- long_name :
- DOC concentration added to cell due to benthic algae mortality
- units :
- mg/L/d
- description :
- DOC concentration added to cell due to benthic algae mortality
array([[[ nan]],\n",
+ " [[0.08748]]])
dPOCdt
(year, x, y)
float64
nan 0.07788
- long_name :
- POC concentration change per timestep
- units :
- mg/L/d
- description :
- POC concentration change per timestep
array([[[ nan]],\n",
"\n",
- " [[0.00972]]])
DOC_DIC_oxidation
(year, x, y)
float64
nan 0.005
- long_name :
- DOC concentration lost to cell due to oxidation
- units :
- mg/L/d
- description :
- DOC concentration lost to cell due to oxidation
array([[[ nan]],\n",
+ " [[0.07788]]])
kdoc_tc
(year, x, y)
float64
nan 0.01
- long_name :
- Dissolved organic carbon oxidation rate adjusted for temperature
- units :
- 1/d
- description :
- Dissolved organic carbon oxidation rate adjusted for temperature
array([[[ nan]],\n",
"\n",
- " [[0.005]]])
dDOCdt
(year, x, y)
float64
nan 0.01032
- long_name :
- DOC concentration change per timestep
- units :
- mg/L/d
- description :
- DOC concentration change per timestep
array([[[ nan]],\n",
+ " [[0.01]]])
DOC_algal_mortality
(year, x, y)
float64
nan 0.0006
- long_name :
- DOC concentration added to cell due to algal mortality
- units :
- mg/L/d
- description :
- DOC concentration added to cell due to algal mortality
array([[[ nan]],\n",
"\n",
- " [[0.01032]]])
K_H
(year, x, y)
float64
nan 0.03931
- long_name :
- Henrys coefficient
- units :
- mol/L-atm
- description :
- Henrys coefficient controlling the relative proportion of gaseous and aqueous phase CO2
array([[[ nan]],\n",
+ " [[0.0006]]])
DOC_benthic_algae_mortality
(year, x, y)
float64
nan 0.00972
- long_name :
- DOC concentration added to cell due to benthic algae mortality
- units :
- mg/L/d
- description :
- DOC concentration added to cell due to benthic algae mortality
array([[[ nan]],\n",
"\n",
- " [[0.03931489]]])
Atm_CO2_reaeration
(year, x, y)
float64
nan -1.987e+04
- long_name :
- Atmospheric CO2 reaeration
- units :
- mg/L/d
- description :
- Amount of DIC concentration change due to atmospheric exchange
array([[[ nan]],\n",
+ " [[0.00972]]])
DOC_DIC_oxidation
(year, x, y)
float64
nan 0.005
- long_name :
- DOC concentration lost to cell due to oxidation
- units :
- mg/L/d
- description :
- DOC concentration lost to cell due to oxidation
array([[[ nan]],\n",
"\n",
- " [[-19871.39779666]]])
DIC_algal_respiration
(year, x, y)
float64
nan 0.008
- long_name :
- DIC generated by algal respiration
- units :
- mg/L/d
- description :
- DIC generated by algal respiration
array([[[ nan]],\n",
+ " [[0.005]]])
dDOCdt
(year, x, y)
float64
nan 0.01032
- long_name :
- DOC concentration change per timestep
- units :
- mg/L/d
- description :
- DOC concentration change per timestep
array([[[ nan]],\n",
"\n",
- " [[0.008]]])
DIC_algal_photosynthesis
(year, x, y)
float64
nan 0.002104
- long_name :
- DIC consumed by algal photosynthesis
- units :
- mg/L/d
- description :
- DIC consumed by algal photosynthesis
array([[[ nan]],\n",
+ " [[0.01032]]])
K_H
(year, x, y)
float64
nan 0.03931
- long_name :
- Henrys coefficient
- units :
- mol/L-atm
- description :
- Henrys coefficient controlling the relative proportion of gaseous and aqueous phase CO2
array([[[ nan]],\n",
"\n",
- " [[0.00210422]]])
DIC_benthic_algae_respiration
(year, x, y)
float64
nan 0.072
- long_name :
- DIC generated by benthic algae respiration
- units :
- mg/L/d
- description :
- DIC generated by benthic algae respiration
array([[[ nan]],\n",
+ " [[0.03931489]]])
Atm_CO2_reaeration
(year, x, y)
float64
nan -1.987e+04
- long_name :
- Atmospheric CO2 reaeration
- units :
- mg/L/d
- description :
- Amount of DIC concentration change due to atmospheric exchange
array([[[ nan]],\n",
"\n",
- " [[0.072]]])
DIC_benthic_algae_photosynthesis
(year, x, y)
float64
nan 0.0007959
- long_name :
- DIC consumed by benthic algae photosynthesis
- units :
- mg/L/d
- description :
- DIC consumed by benthic algae photosynthesis
array([[[ nan]],\n",
+ " [[-19871.39779666]]])
DIC_algal_respiration
(year, x, y)
float64
nan 0.008
- long_name :
- DIC generated by algal respiration
- units :
- mg/L/d
- description :
- DIC generated by algal respiration
array([[[ nan]],\n",
"\n",
- " [[0.00079594]]])
DIC_CBOD_oxidation
(year, x, y)
float64
nan 0.03
- long_name :
- DIC concentration change due to CBOD oxidation
- units :
- mg/L/d
- description :
- DIC concentration change due to CBOD oxidation
array([[[ nan]],\n",
+ " [[0.008]]])
DIC_algal_photosynthesis
(year, x, y)
float64
nan 0.005878
- long_name :
- DIC consumed by algal photosynthesis
- units :
- mg/L/d
- description :
- DIC consumed by algal photosynthesis
array([[[ nan]],\n",
"\n",
- " [[0.03]]])
DIC_sed_release
(year, x, y)
float64
nan 187.3
- long_name :
- DIC concentration change due to sediment release
- units :
- mg/L/d
- description :
- DIC concentration change due to sediment release
array([[[ nan]],\n",
+ " [[0.00587831]]])
DIC_benthic_algae_respiration
(year, x, y)
float64
nan 0.072
- long_name :
- DIC generated by benthic algae respiration
- units :
- mg/L/d
- description :
- DIC generated by benthic algae respiration
array([[[ nan]],\n",
"\n",
- " [[187.3125]]])
dDICdt
(year, x, y)
float64
nan -1.968e+04
- long_name :
- DIC concentration change per timestep
- units :
- mg/L/d
- description :
- DIC concentration change per timestep
array([[[ nan]],\n",
+ " [[0.072]]])
DIC_benthic_algae_photosynthesis
(year, x, y)
float64
nan 0.0147
- long_name :
- DIC consumed by benthic algae photosynthesis
- units :
- mg/L/d
- description :
- DIC consumed by benthic algae photosynthesis
array([[[ nan]],\n",
"\n",
- " [[-19683.97819682]]])
pwv
(year, x, y)
float64
nan 0.02309
- long_name :
- Partial pressure of water vapor
- units :
- atm
- description :
- Partial pressure of water vapor
array([[[ nan]],\n",
+ " [[0.01470235]]])
DIC_CBOD_oxidation
(year, x, y)
float64
nan 0.03
- long_name :
- DIC concentration change due to CBOD oxidation
- units :
- mg/L/d
- description :
- DIC concentration change due to CBOD oxidation
array([[[ nan]],\n",
"\n",
- " [[0.02308854]]])
DOs_atm_alpha
(year, x, y)
float64
nan 0.002326
- long_name :
- DO saturation atmospheric correction coefficient
- units :
- unitless
- description :
- DO saturation atmospheric correction coefficient
array([[[ nan]],\n",
+ " [[0.03]]])
DIC_sed_release
(year, x, y)
float64
nan 187.3
- long_name :
- DIC concentration change due to sediment release
- units :
- mg/L/d
- description :
- DIC concentration change due to sediment release
array([[[ nan]],\n",
"\n",
- " [[0.00232582]]])
DOX_ApGrowth
(year, x, y)
float64
nan 0.006458
- long_name :
- Dissolved oxygen flux due to algal photosynthesis
- units :
- mg/L/d
- description :
- Dissolved oxygen flux due to algal photosynthesis
array([[[ nan]],\n",
+ " [[187.3125]]])
dDICdt
(year, x, y)
float64
nan -1.968e+04
- long_name :
- DIC concentration change per timestep
- units :
- mg/L/d
- description :
- DIC concentration change per timestep
array([[[ nan]],\n",
"\n",
- " [[0.00645824]]])
DOX_ApRespiration
(year, x, y)
float64
nan 0.02133
- long_name :
- Dissolved oxygen flux due to algal respiration
- units :
- mg/L/d
- description :
- Dissolved oxygen flux due to algal respiration
array([[[ nan]],\n",
+ " [[-19683.99587732]]])
DOX_sat
(year, x, y)
float64
nan 0.0
- long_name :
- DO saturation concentration
- units :
- mg/L
- description :
- DO saturation concentration in water as a function of water temperature (K)
array([[[nan]],\n",
"\n",
- " [[0.02133333]]])
DOX_Nitrification
(year, x, y)
float64
nan 0.2063
- long_name :
- Dissolved oxygen flux due to nitrification
- units :
- mg/L/d
- description :
- Dissolved oxygen flux due to nitrification
array([[[ nan]],\n",
+ " [[ 0.]]])
pwv
(year, x, y)
float64
nan 0.02309
- long_name :
- Partial pressure of water vapor
- units :
- atm
- description :
- Partial pressure of water vapor
array([[[ nan]],\n",
"\n",
- " [[0.20625754]]])
DOX_DOC_oxidation
(year, x, y)
float64
nan 0.01333
- long_name :
- Dissolved oxygen flux due to DOC oxidation
- units :
- mg/L/d
- description :
- Dissolved oxygen flux due to DOC oxidation
array([[[ nan]],\n",
+ " [[0.02308854]]])
DOs_atm_alpha
(year, x, y)
float64
nan 0.002326
- long_name :
- DO saturation atmospheric correction coefficient
- units :
- unitless
- description :
- DO saturation atmospheric correction coefficient
array([[[ nan]],\n",
"\n",
- " [[0.01333333]]])
DOX_CBOD_oxidation
(year, x, y)
float64
nan 0.08
- long_name :
- Dissolved oxygen flux due to CBOD oxidation
- units :
- mg/L/d
- description :
- Dissolved oxygen flux due to CBOD oxidation
array([[[ nan]],\n",
+ " [[0.00232582]]])
Atm_O2_reaeration
(year, x, y)
float64
nan -8.28
- long_name :
- Atmospheric oxygen reaeration
- units :
- mg/L/d
- description :
- Atmospheric oxygen reaeration, can fluctuate both in and out of waterbody
array([[[ nan]],\n",
"\n",
- " [[0.08]]])
DOX_AbGrowth
(year, x, y)
float64
nan 0.002443
- long_name :
- Dissolved oxygen flux due to benthic algae photosynthesis
- units :
- mg/L/d
- description :
- Dissolved oxygen flux due to benthic algae photosynthesis
array([[[ nan]],\n",
+ " [[-8.28037249]]])
DOX_ApGrowth
(year, x, y)
float64
nan 0.01804
- long_name :
- Dissolved oxygen flux due to algal photosynthesis
- units :
- mg/L/d
- description :
- Dissolved oxygen flux due to algal photosynthesis
array([[[ nan]],\n",
"\n",
- " [[0.0024429]]])
DOX_AbRespiration
(year, x, y)
float64
nan 0.192
- long_name :
- Dissolved oxygen flux due to benthic algae respiration
- units :
- mg/L/d
- description :
- Dissolved oxygen flux due to benthic algae respiration
array([[[ nan]],\n",
+ " [[0.01804162]]])
DOX_ApRespiration
(year, x, y)
float64
nan 0.02133
- long_name :
- Dissolved oxygen flux due to algal respiration
- units :
- mg/L/d
- description :
- Dissolved oxygen flux due to algal respiration
array([[[ nan]],\n",
"\n",
- " [[0.192]]])
DOX_SOD
(year, x, y)
float64
nan 499.5
- long_name :
- Dissolved oxygen flux due to sediment oxygen demand
- units :
- mg/L/d
- description :
- Dissolved oxygen flux due to sediment oxygen demand
array([[[ nan]],\n",
+ " [[0.02133333]]])
DOX_Nitrification
(year, x, y)
float64
nan 0.2063
- long_name :
- Dissolved oxygen flux due to nitrification
- units :
- mg/L/d
- description :
- Dissolved oxygen flux due to nitrification
array([[[ nan]],\n",
"\n",
- " [[499.5]]])
kdx_tc
(year, x, y)
float64
nan 0.8
- long_name :
- Pathogen death rate
- units :
- 1/d
- description :
- Pathogen death rate with temperature correction
array([[[nan]],\n",
+ " [[0.20625754]]])
DOX_DOC_oxidation
(year, x, y)
float64
nan 0.01333
- long_name :
- Dissolved oxygen flux due to DOC oxidation
- units :
- mg/L/d
- description :
- Dissolved oxygen flux due to DOC oxidation
array([[[ nan]],\n",
"\n",
- " [[0.8]]])
PathogenDeath
(year, x, y)
float64
nan 0.8
- long_name :
- Pathogen natural death
- units :
- cfu/100mL/d
- description :
- Pathogen natural death
array([[[nan]],\n",
+ " [[0.01333333]]])
DOX_CBOD_oxidation
(year, x, y)
float64
nan 0.08
- long_name :
- Dissolved oxygen flux due to CBOD oxidation
- units :
- mg/L/d
- description :
- Dissolved oxygen flux due to CBOD oxidation
array([[[ nan]],\n",
"\n",
- " [[0.8]]])
PathogenDecay
(year, x, y)
float64
nan 1.183
- long_name :
- Pathogen death due to light
- units :
- cfu/100mL/d
- description :
- Pathogen death due to light
array([[[ nan]],\n",
+ " [[0.08]]])
DOX_AbGrowth
(year, x, y)
float64
nan 0.04512
- long_name :
- Dissolved oxygen flux due to benthic algae photosynthesis
- units :
- mg/L/d
- description :
- Dissolved oxygen flux due to benthic algae photosynthesis
array([[[ nan]],\n",
"\n",
- " [[1.18304713]]])
PathogenSettling
(year, x, y)
float64
nan 1.0
- long_name :
- Pathogen settling
- units :
- cfu/100mL/d
- description :
- Pathogen settling
array([[[nan]],\n",
+ " [[0.04512419]]])
DOX_AbRespiration
(year, x, y)
float64
nan 0.192
- long_name :
- Dissolved oxygen flux due to benthic algae respiration
- units :
- mg/L/d
- description :
- Dissolved oxygen flux due to benthic algae respiration
array([[[ nan]],\n",
"\n",
- " [[ 1.]]])
dPXdt
(year, x, y)
float64
nan -2.983
- long_name :
- Change in pathogen concentration
- units :
- cfu/100mL/d
- description :
- Change in pathogen concentration
array([[[ nan]],\n",
+ " [[0.192]]])
DOX_SOD
(year, x, y)
float64
nan 499.5
- long_name :
- Dissolved oxygen flux due to sediment oxygen demand
- units :
- mg/L/d
- description :
- Dissolved oxygen flux due to sediment oxygen demand
array([[[ nan]],\n",
"\n",
- " [[-2.98304713]]])
Alk_denitrification
(year, x, y)
float64
nan 0.0001818
- long_name :
- Alkalinity change due to denitrification
- units :
- mg/L/d
- description :
- Alkalinity change due to denitrification
array([[[ nan]],\n",
+ " [[499.5]]])
dDOXdt
(year, x, y)
float64
nan -508.2
- long_name :
- Change in dissolved oxygen concentration for one timestep
- units :
- mg/L/d
- description :
- Change in dissolved oxygen concentration for one timestep
array([[[ nan]],\n",
"\n",
- " [[0.00018182]]])
Alk_nitrification
(year, x, y)
float64
nan 0.04512
- long_name :
- Alkalinity change due to nitrification
- units :
- mg/L/d
- description :
- Alkalinity change due to nitrification
array([[[ nan]],\n",
+ " [[-508.23013089]]])
kdx_tc
(year, x, y)
float64
nan 0.8
- long_name :
- Pathogen death rate
- units :
- 1/d
- description :
- Pathogen death rate with temperature correction
array([[[nan]],\n",
"\n",
- " [[0.04511884]]])
Alk_algal_growth
(year, x, y)
float64
nan 0.0
- long_name :
- Alkalinity change due to algal growth
- units :
- mg/L/d
- description :
- Alkalinity change due to algal growth
array([[[nan]],\n",
+ " [[0.8]]])
PathogenDeath
(year, x, y)
float64
nan 0.8
- long_name :
- Pathogen natural death
- units :
- cfu/100mL/d
- description :
- Pathogen natural death
array([[[nan]],\n",
"\n",
- " [[ 0.]]])
Alk_algal_respiration
(year, x, y)
float64
nan 0.2
- long_name :
- Alkalinity change due to algal respiration
- units :
- mg/L/d
- description :
- Alkalinity change due to algal respiration
array([[[nan]],\n",
+ " [[0.8]]])
PathogenDecay
(year, x, y)
float64
nan 3.758
- long_name :
- Pathogen death due to light
- units :
- cfu/100mL/d
- description :
- Pathogen death due to light
array([[[ nan]],\n",
"\n",
- " [[0.2]]])
Alk_benthic_algae_growth
(year, x, y)
float64
nan 0.0
- long_name :
- Alkalinity change due to benthic algae growth
- units :
- mg/L/d
- description :
- Alkalinity change due to benthic algae growth
array([[[nan]],\n",
+ " [[3.75770698]]])
PathogenSettling
(year, x, y)
float64
nan 1.0
- long_name :
- Pathogen settling
- units :
- cfu/100mL/d
- description :
- Pathogen settling
array([[[nan]],\n",
"\n",
- " [[ 0.]]])
Alk_benthic_algae_respiration
(year, x, y)
float64
nan 0.18
- long_name :
- Alkalinity change due to benthic algae growth
- units :
- mg/L/d
- description :
- Alkalinity change due to benthic algae growth
array([[[ nan]],\n",
+ " [[ 1.]]])
dPXdt
(year, x, y)
float64
nan -5.558
- long_name :
- Change in pathogen concentration
- units :
- cfu/100mL/d
- description :
- Change in pathogen concentration
array([[[ nan]],\n",
"\n",
- " [[0.18]]])
dAlkdt
(year, x, y)
float64
nan 0.3351
- long_name :
- Alkalinity concentration change per timestep
- units :
- mg/L/d
- description :
- Alkalinity concentration change per timestep
array([[[ nan]],\n",
+ " [[-5.55770698]]])
Alk_denitrification
(year, x, y)
float64
nan 0.0001818
- long_name :
- Alkalinity change due to denitrification
- units :
- mg/L/d
- description :
- Alkalinity change due to denitrification
array([[[ nan]],\n",
"\n",
- " [[0.33506298]]])
KHN2_tc
(year, x, y)
float64
nan 0.0007001
- long_name :
- Henrys law constant
- units :
- mol/L/atm
- description :
- Henrys law constant temperature corrected
array([[[ nan]],\n",
+ " [[0.00018182]]])
Alk_nitrification
(year, x, y)
float64
nan 0.04512
- long_name :
- Alkalinity change due to nitrification
- units :
- mg/L/d
- description :
- Alkalinity change due to nitrification
array([[[ nan]],\n",
"\n",
- " [[0.00070008]]])
P_wv
(year, x, y)
float64
nan 0.02309
- long_name :
- Partial pressure water vapor
- units :
- atm
- description :
- Partial pressure water vapor
array([[[ nan]],\n",
+ " [[0.04511884]]])
Alk_algal_growth
(year, x, y)
float64
nan 0.0
- long_name :
- Alkalinity change due to algal growth
- units :
- mg/L/d
- description :
- Alkalinity change due to algal growth
array([[[nan]],\n",
"\n",
- " [[0.02308854]]])
N2sat
(year, x, y)
float64
nan 30.61
- long_name :
- N2 at saturation
- units :
- mg-N/L
- description :
- N2 at saturation f(Twater and atm pressure)
array([[[ nan]],\n",
+ " [[ 0.]]])
Alk_algal_respiration
(year, x, y)
float64
nan 0.2
- long_name :
- Alkalinity change due to algal respiration
- units :
- mg/L/d
- description :
- Alkalinity change due to algal respiration
array([[[nan]],\n",
"\n",
- " [[30.6138397]]])
dN2dt
(year, x, y)
float64
nan 253.6
- long_name :
- Change in N2 air concentration
- units :
- mg-N/L/d
- description :
- Change in N2 air concentration
array([[[ nan]],\n",
+ " [[0.2]]])
Alk_benthic_algae_growth
(year, x, y)
float64
nan 0.0
- long_name :
- Alkalinity change due to benthic algae growth
- units :
- mg/L/d
- description :
- Alkalinity change due to benthic algae growth
array([[[nan]],\n",
"\n",
- " [[253.55088691]]])
NH4_Nitrification
(year, x, y)
float64
nan 0.04512
- long_name :
- NH4 -> NO3 Nitrification
- units :
- mg-N/L/d
- description :
- NH4 Nitrification
array([[[ nan]],\n",
+ " [[ 0.]]])
Alk_benthic_algae_respiration
(year, x, y)
float64
nan 0.18
- long_name :
- Alkalinity change due to benthic algae growth
- units :
- mg/L/d
- description :
- Alkalinity change due to benthic algae growth
array([[[ nan]],\n",
"\n",
- " [[0.04511884]]])
dNH4dt
(year, x, y)
float64
nan 0.07046
- long_name :
- Change in ammonium concentration
- units :
- mg-N/L
- description :
- Change in ammonium concentration
array([[[ nan]],\n",
+ " [[0.18]]])
dAlkdt
(year, x, y)
float64
nan 0.3351
- long_name :
- Alkalinity concentration change per timestep
- units :
- mg/L/d
- description :
- Alkalinity concentration change per timestep
array([[[ nan]],\n",
"\n",
- " [[0.07046015]]])
dNO3dt
(year, x, y)
float64
nan 0.04468
- long_name :
- Change in nitrate concentration
- units :
- mg-N/L
- description :
- Change in nitrate concentration
array([[[ nan]],\n",
+ " [[0.33506298]]])
KHN2_tc
(year, x, y)
float64
nan 0.0007001
- long_name :
- Henrys law constant
- units :
- mol/L/atm
- description :
- Henrys law constant temperature corrected
array([[[ nan]],\n",
"\n",
- " [[0.044676]]])
DOX_sat
(year, x, y)
float64
nan 0.0
- long_name :
- DO saturation concentration
- units :
- mg/L
- description :
- DO saturation concentration in water as a function of water temperature (K)
array([[[nan]],\n",
+ " [[0.00070008]]])
P_wv
(year, x, y)
float64
nan 0.02309
- long_name :
- Partial pressure water vapor
- units :
- atm
- description :
- Partial pressure water vapor
array([[[ nan]],\n",
"\n",
- " [[ 0.]]])
Atm_O2_reaeration
(year, x, y)
float64
nan -8.28
- long_name :
- Atmospheric oxygen reaeration
- units :
- mg/L/d
- description :
- Atmospheric oxygen reaeration, can fluctuate both in and out of waterbody
array([[[ nan]],\n",
+ " [[0.02308854]]])
N2sat
(year, x, y)
float64
nan 30.61
- long_name :
- N2 at saturation
- units :
- mg-N/L
- description :
- N2 at saturation f(Twater and atm pressure)
array([[[ nan]],\n",
"\n",
- " [[-8.28037249]]])
dDOXdt
(year, x, y)
float64
nan -508.3
- long_name :
- Change in dissolved oxygen concentration for one timestep
- units :
- mg/L/d
- description :
- Change in dissolved oxygen concentration for one timestep
array([[[ nan]],\n",
+ " [[30.6138397]]])
dN2dt
(year, x, y)
float64
nan 253.6
- long_name :
- Change in N2 air concentration
- units :
- mg-N/L/d
- description :
- Change in N2 air concentration
array([[[ nan]],\n",
"\n",
- " [[-508.28439556]]])
TDG
(year, x, y)
float64
nan inf
- long_name :
- Total dissolved gas
- units :
- %
- description :
- Total dissolved gas
array([[[nan]],\n",
+ " [[253.55088691]]])
TDG
(year, x, y)
float64
nan inf
- long_name :
- Total dissolved gas
- units :
- %
- description :
- Total dissolved gas
array([[[nan]],\n",
"\n",
- " [[inf]]])
"
+ " [[inf]]])
"
],
"text/plain": [
- "\n",
+ " Size: 3kB\n",
"Dimensions: (year: 2, x: 1, y: 1)\n",
"Coordinates:\n",
- " * year (year) int32 0 1\n",
- " * x (x) float64 1.0\n",
- " * y (y) float64 1.0\n",
+ " * year (year) int32 8B 0 1\n",
+ " * x (x) float64 8B 1.0\n",
+ " * y (y) float64 8B 1.0\n",
"Data variables: (12/281)\n",
- " Ap (year, x, y) float64 1.0 -3.865e+04\n",
- " Ab (year, x, y) float64 1.0 -4.301e+04\n",
- " NH4 (year, x, y) float64 1.0 6.089e+03\n",
- " NO3 (year, x, y) float64 1.0 3.861e+03\n",
- " OrgN (year, x, y) float64 1.0 -7.898e+03\n",
- " N2 (year, x, y) float64 1.0 2.191e+07\n",
+ " Ap (year, x, y) float64 16B 1.0 -3.05e+04\n",
+ " Ab (year, x, y) float64 16B 1.0 -3.967e+04\n",
+ " NH4 (year, x, y) float64 16B 1.0 5.951e+03\n",
+ " NO3 (year, x, y) float64 16B 1.0 3.724e+03\n",
+ " OrgN (year, x, y) float64 16B 1.0 -7.898e+03\n",
+ " N2 (year, x, y) float64 16B 1.0 2.191e+07\n",
" ... ...\n",
- " dNH4dt (year, x, y) float64 nan 0.07046\n",
- " dNO3dt (year, x, y) float64 nan 0.04468\n",
- " DOX_sat (year, x, y) float64 nan 0.0\n",
- " Atm_O2_reaeration (year, x, y) float64 nan -8.28\n",
- " dDOXdt (year, x, y) float64 nan -508.3\n",
- " TDG (year, x, y) float64 nan inf"
+ " dAlkdt (year, x, y) float64 16B nan 0.3351\n",
+ " KHN2_tc (year, x, y) float64 16B nan 0.0007001\n",
+ " P_wv (year, x, y) float64 16B nan 0.02309\n",
+ " N2sat (year, x, y) float64 16B nan 30.61\n",
+ " dN2dt (year, x, y) float64 16B nan 253.6\n",
+ " TDG (year, x, y) float64 16B nan inf"
]
},
- "execution_count": 2,
+ "execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
@@ -1347,7 +1438,7 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 6,
"id": "a5d34d2d-03a6-41e1-92fc-9e6fba72d6f5",
"metadata": {
"tags": []
@@ -2071,7 +2162,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.10.13"
+ "version": "3.11.8"
},
"toc-autonumbering": true
},
diff --git a/src/clearwater_modules/nsm1/algae/processes.py b/src/clearwater_modules/nsm1/algae/processes.py
index e232666..852460f 100644
--- a/src/clearwater_modules/nsm1/algae/processes.py
+++ b/src/clearwater_modules/nsm1/algae/processes.py
@@ -3,6 +3,7 @@
"""
import numba
import xarray as xr
+import numpy as np
from clearwater_modules.shared.processes import arrhenius_correction
import math
@@ -116,7 +117,7 @@ def FL(
Ap: xr.DataArray,
PAR: xr.DataArray,
light_limitation_option: int,
- KL: xr.DataArray,
+ KL: int,
) -> xr.DataArray:
"""Calculate Algal light limitation: FL (unitless).
@@ -131,12 +132,13 @@ def FL(
KEXT = L * depth
+
FL = xr.where(Ap <= 0.0 or KEXT <= 0.0 or PAR <= 0.0, 0,
xr.where(light_limitation_option==1, (1.0 / KEXT) * math.log((KL + PAR) /(KL + PAR * math.exp(-KEXT))),
xr.where(light_limitation_option==2,
- xr.where(abs(KL)<0.0000000001, 1, (1.0 / KEXT) * math.log( (PAR / KL + ((1.0 + (PAR / KL)**2.0)**0.5)) / (PAR * math.exp(-KEXT) / KL + ((1.0 + (PAR * math.exp(-KEXT) / KL)**2.0)**0.5)))),
+ xr.where(abs(KL)< 0.0000000001, 1, (1.0 / KEXT) * math.log( (PAR / KL + ((1.0 + (PAR / KL)**2.0)**0.5)) / (PAR * math.exp(-KEXT) / KL + ((1.0 + (PAR * math.exp(-KEXT) / KL)**2.0)**0.5)))),
xr.where(light_limitation_option==3,
- xr.where(abs(KL)<0.0000000001,0,(2.718/KEXT) * (math.exp(-PAR/KL * math.exp(-KEXT)) - math.exp(-PAR/KL))), "NaN"))))
+ xr.where(abs(KL)< 0.0000000001,0,(2.718/KEXT) * (math.exp(-PAR/KL * math.exp(-KEXT)) - math.exp(-PAR/KL))), "NaN"))))
FL= xr.where(FL > 1.0, 1.0,
diff --git a/src/clearwater_modules/nsm1/model.py b/src/clearwater_modules/nsm1/model.py
index 1da9c1d..2bc1121 100644
--- a/src/clearwater_modules/nsm1/model.py
+++ b/src/clearwater_modules/nsm1/model.py
@@ -18,6 +18,7 @@ class NutrientBudget(base.Model):
def __init__(
self,
+ time_steps: int,
initial_state_values: Optional[base.InitialVariablesDict] = None,
updateable_static_variables: Optional[list[str]] = None,
algae_parameters: Optional[dict[str, float]] = None,
@@ -168,6 +169,7 @@ def __init__(
#static_variable_values['use_sed_temp'] = use_sed_temp
super().__init__(
+ time_steps=time_steps,
initial_state_values=initial_state_values,
static_variable_values=static_variable_values,
updateable_static_variables=updateable_static_variables,
diff --git a/src/clearwater_modules/nsm1/processes.py b/src/clearwater_modules/nsm1/processes.py
index 982e58a..1ab795b 100644
--- a/src/clearwater_modules/nsm1/processes.py
+++ b/src/clearwater_modules/nsm1/processes.py
@@ -269,10 +269,10 @@ def L(
use_POC: true/falseo use particulate organic carbon module (t/f)
Ap: algae concentration (ug-Chla/L)
"""
- L = lambda0 #+ lambdas * Solid
+ L: xr.DataArray = lambda0 #+ lambdas * Solid
- L: xr.DataArray = xr.where (use_POC, L+lambdam*POC/fcom, L)
- L: xr.DataArray = xr.where (use_Algae, L+lambda1*Ap + lambda2*Ap**0.66667, L)
+ L: xr.DataArray = xr.where (use_POC, L+lambdam*(POC/fcom), L)
+ L: xr.DataArray = xr.where (use_Algae, L+lambda1*Ap + lambda2*Ap**(2/3), L)
return L
@@ -291,7 +291,7 @@ def PAR(
"""
return xr.where (use_Algae or use_Balgae, q_solar * Fr_PAR, 0)
-
+#TODO does not appear HEC-RAS actually uses Solid in any calculations
def fdp(
use_TIP: bool,
Solid : xr.DataArray,
@@ -306,7 +306,7 @@ def fdp(
kdpo4: solid partitioning coeff. of PO4 (L/kg)
"""
- return xr.where(use_TIP, 1/(1+kdpo4 * Solid/0.000001), 0)
+ return xr.where(use_TIP, 1, 0)
############################################ From algae
@@ -416,7 +416,7 @@ def FL(
depth: xr.DataArray,
Ap: xr.DataArray,
PAR: xr.DataArray,
- light_limitation_option: int,
+ light_limitation_option: xr.DataArray,
KL: xr.DataArray,
) -> np.ndarray:
"""Calculate Algal light limitation: FL (unitless).
@@ -429,26 +429,25 @@ def FL(
light_limitation_option: Algal light limitation option 1) Half-saturation, 2) Smith model, 3) Steele model (unitless)
KL: Light limitation constant for algal growth (W/m^2)
"""
-
- KEXT = L * depth
+ warnings.filterwarnings("ignore", category=RuntimeWarning)
FL_orig: np.ndarray = np.select(
condlist = [
- Ap <= 0.0 or KEXT <= 0.0 or PAR <= 0.0,
+ Ap <= 0.0 or (L * depth) <= 0.0 or PAR <= 0.0,
light_limitation_option == 1,
- light_limitation_option == 2 and abs(KL) < 0.0000000001,
- light_limitation_option == 2 and abs(KL) >= 0.0000000001,
- light_limitation_option == 3 and abs(KL) < 0.0000000001,
- light_limitation_option == 3 and abs(KL) >= 0.0000000001,
+ light_limitation_option == 2 and np.abs(KL) < 0.0000000001,
+ light_limitation_option == 2 and np.abs(KL) >= 0.0000000001,
+ light_limitation_option == 3 and np.abs(KL) < 0.0000000001,
+ light_limitation_option == 3 and np.abs(KL) >= 0.0000000001,
],
choicelist = [
0,
- (1.0 / KEXT) * math.log((KL + PAR) /(KL + PAR * math.exp(-KEXT))),
+ (1.0 / (L * depth)) * np.log((KL + PAR) /(KL + PAR * np.exp(-(L * depth)))),
1,
- (1.0 / KEXT) * math.log( (PAR / KL + ((1.0 + (PAR / KL)**2.0)**0.5)) / (PAR * math.exp(-KEXT) / KL + ((1.0 + (PAR * math.exp(-KEXT) / KL)**2.0)**0.5))),
+ (1.0 / (L * depth)) * np.log( (PAR / KL + ((1.0 + (PAR / KL)**2.0)**0.5)) / (PAR * np.exp(-(L * depth)) / KL + ((1.0 + (PAR * np.exp(-(L * depth)) / KL)**2.0)**0.5))),
0,
- (2.718/KEXT) * (math.exp(-PAR/KL * math.exp(-KEXT)) - math.exp(-PAR/KL))
+ (2.718/(L * depth)) * (np.exp(-PAR/KL * np.exp(-(L * depth))) - np.exp(-PAR/KL))
],
default = np.nan
@@ -467,7 +466,7 @@ def FL(
default = FL_orig
)
-
+ warnings.filterwarnings("default", category=RuntimeWarning)
return FL
diff --git a/tests/test_6_nsm_module.py b/tests/test_6_nsm_module.py
index 25c0f1c..e5afaf0 100644
--- a/tests/test_6_nsm_module.py
+++ b/tests/test_6_nsm_module.py
@@ -19,7 +19,6 @@
DEFAULT_PHOSPHORUS,
DEFAULT_GLOBALPARAMETERS,
DEFAULT_GLOBALVARS
-
)
@@ -67,16 +66,16 @@ def nutrient_budget_instance(
time_steps=time_steps,
initial_state_values=initial_nsm1_state,
updateable_static_variables=['a0'],
- time_dim='tsm_time_step',
+ time_dim='nsm1_time_step',
)
def test_nsm1_specific_attributes(nutrient_budget_instance) -> None:
"""Checks that all NSM1 variables are present."""
- assert nutrient_budget_instance.time_dim == 'tsm_time_step'
+ assert nutrient_budget_instance.time_dim == 'nsm1_time_step'
assert isinstance(nutrient_budget_instance.algae_parameters, dict)
assert isinstance(nutrient_budget_instance.alkalinity_parameters, dict)
- assert isinstance(nutrient_budget_instance.Balgae_parameters, dict)
+ assert isinstance(nutrient_budget_instance.balgae_parameters, dict)
assert isinstance(nutrient_budget_instance.nitrogen_parameters, dict)
assert isinstance(nutrient_budget_instance.carbon_parameters, dict)
assert isinstance(nutrient_budget_instance.CBOD_parameters, dict)
@@ -85,14 +84,14 @@ def test_nsm1_specific_attributes(nutrient_budget_instance) -> None:
assert isinstance(nutrient_budget_instance.POM_parameters, dict)
assert isinstance(nutrient_budget_instance.pathogen_parameters, dict)
assert isinstance(nutrient_budget_instance.phosphorus_parameters, dict)
- assert isinstance(nutrient_budget_instance.gp_parameters, dict)
- assert isinstance(nutrient_budget_instance.gvars_parameters, dict)
+ assert isinstance(nutrient_budget_instance.global_parameters, dict)
+ assert isinstance(nutrient_budget_instance.global_vars, dict)
assert nutrient_budget_instance.updateable_static_variables == ['a0']
assert nutrient_budget_instance.algae_parameters == DEFAULT_ALGAE
assert nutrient_budget_instance.alkalinity_parameters == DEFAULT_ALKALINITY
- assert nutrient_budget_instance.Balgae_parameters == DEFAULT_BALGAE
+ assert nutrient_budget_instance.balgae_parameters == DEFAULT_BALGAE
assert nutrient_budget_instance.nitrogen_parameters == DEFAULT_NITROGEN
assert nutrient_budget_instance.carbon_parameters == DEFAULT_CARBON
assert nutrient_budget_instance.CBOD_parameters == DEFAULT_CBOD
@@ -101,34 +100,19 @@ def test_nsm1_specific_attributes(nutrient_budget_instance) -> None:
assert nutrient_budget_instance.POM_parameters == DEFAULT_POM
assert nutrient_budget_instance.pathogen_parameters == DEFAULT_PATHOGEN
assert nutrient_budget_instance.phosphorus_parameters == DEFAULT_PHOSPHORUS
- assert nutrient_budget_instance.gp_parameters == DEFAULT_GLOBALPARAMETERS
- assert nutrient_budget_instance.gvars_parameters == DEFAULT_GLOBALVARS
+ assert nutrient_budget_instance.global_parameters == DEFAULT_GLOBALPARAMETERS
+ assert nutrient_budget_instance.global_vars == DEFAULT_GLOBALVARS
def test_nsm1_variable_sorting(nutrient_budget_instance) -> None:
"""Checks that we can auto-sort our NSM1 variable"""
assert isinstance(nutrient_budget_instance.computation_order, list)
- assert nutrient_budget_instance.computation_order[-1].name == 'water_temp_c' #TODO what is first?
+ assert nutrient_budget_instance.computation_order[-1].name == 'DOX' #TODO what is first?
def test_nsm1_timestep(nutrient_budget_instance) -> None:
"""Checks that we can auto-sort our NSM1 variable"""
nutrient_budget_instance.increment_timestep()
- assert len(nutrient_budget_instance.dataset.tsm_time_step) == 2
- assert nutrient_budget_instance.dataset.sel(tsm_time_step=1).isnull().any() == False
+ assert len(nutrient_budget_instance.dataset.nsm1_time_step) == 2
+ assert nutrient_budget_instance.dataset.sel(nsm1_time_step=1).isnull().any() == False
-#TODO do we need this for NSM?
-def test_use_sed_temp(
- initial_tsm_state,
- time_steps,
-) -> None:
- """Tests that when we set use_sed_temp to False we get a False boolean array."""
- if 'a0' in initial_tsm_state:
- del initial_tsm_state['a0']
- no_sed_temp = NutrientBudget(
- time_steps=time_steps,
- initial_state_values=initial_tsm_state,
- use_sed_temp=False,
- )
- assert no_sed_temp.dataset.use_sed_temp.dtype == bool
- assert bool(np.all(no_sed_temp.dataset.use_sed_temp == False))
diff --git a/tests/test_7_nsm_algae_calculations.py b/tests/test_7_nsm_algae_calculations.py
index 077d4b6..d77ab9a 100644
--- a/tests/test_7_nsm_algae_calculations.py
+++ b/tests/test_7_nsm_algae_calculations.py
@@ -50,7 +50,6 @@ def initial_nsm1_state() -> dict[str, float]:
def time_steps() -> int:
return 1
-
@pytest.fixture(scope='function')
def default_algae_params() -> AlgaeStaticVariables:
"""Returns default algae static variable values for the model.
@@ -95,7 +94,8 @@ def default_alkalinity_params() -> AlkalinityStaticVariables:
r_alkbn =18.0 / 106.0 / 12.0 / 1000.0
)
-def default_Balgae_params() -> BalgaeStaticVariables:
+@pytest.fixture(scope='function')
+def default_balgae_params() -> BalgaeStaticVariables:
"""Returns default Benthic Algae static variable values for the model.
NOTE: As of now (3/18/2022) these match the built in defaults, but are
@@ -109,7 +109,6 @@ def default_Balgae_params() -> BalgaeStaticVariables:
BWn=7.2,
BWp= 1,
BWa= 3500,
-
KLb= 10,
KsNb= 0.25,
KsPb=0.125,
@@ -123,6 +122,7 @@ def default_Balgae_params() -> BalgaeStaticVariables:
Fb=0.9
)
+@pytest.fixture(scope='function')
def default_nitrogen_params() -> NitrogenStaticVariables:
"""Returns default nitrogen static variable values for the model.
@@ -143,6 +143,7 @@ def default_nitrogen_params() -> NitrogenStaticVariables:
PNb=0.5
)
+@pytest.fixture(scope='function')
def default_carbon_params() -> CarbonStaticVariables:
"""Returns default carbon static variable values for the model.
@@ -162,6 +163,7 @@ def default_carbon_params() -> CarbonStaticVariables:
roc = 32.0/12.0
)
+@pytest.fixture(scope='function')
def default_CBOD_params() -> CBODStaticVariables:
"""Returns default CBOD static variable values for the model.
@@ -176,6 +178,7 @@ def default_CBOD_params() -> CBODStaticVariables:
ksbod_20 = 0.0
)
+@pytest.fixture(scope='function')
def default_DOX_params() -> DOXStaticVariables:
"""Returns default DOX static variable values for the model.
@@ -189,6 +192,7 @@ def default_DOX_params() -> DOXStaticVariables:
KsSOD =1,
)
+@pytest.fixture(scope='function')
def default_N2_params() -> N2StaticVariables:
"""Returns default N2 static variable values for the model.
@@ -201,6 +205,7 @@ def default_N2_params() -> N2StaticVariables:
)
+@pytest.fixture(scope='function')
def default_POM_params() -> POMStaticVariables:
"""Returns default POM static variable values for the model.
@@ -213,7 +218,8 @@ def default_POM_params() -> POMStaticVariables:
kpom_20 = 0.1
)
-def default_pathogens_params() -> PathogenStaticVariables:
+@pytest.fixture(scope='function')
+def default_pathogen_params() -> PathogenStaticVariables:
"""Returns default Pathogens static variable values for the model.
NOTE: As of now (3/18/2022) these match the built in defaults, but are
@@ -227,6 +233,7 @@ def default_pathogens_params() -> PathogenStaticVariables:
vx=1
)
+@pytest.fixture(scope='function')
def default_phosphorus_params() -> PhosphorusStaticVariables:
"""Returns default phosphorus static variable values for the model.
@@ -241,6 +248,7 @@ def default_phosphorus_params() -> PhosphorusStaticVariables:
kdpo4 = 0.0,
)
+@pytest.fixture(scope='function')
def default_gp_params() -> GlobalParameters:
"""Returns default global parameter static variable values for the model.
@@ -268,6 +276,7 @@ def default_gp_params() -> GlobalParameters:
use_POM = True
)
+@pytest.fixture(scope='function')
def default_gvars_params() -> GlobalVars:
"""Returns default global variables static variable values for the model.
@@ -289,9 +298,9 @@ def default_gvars_params() -> GlobalVars:
kah_20_user = 999,
hydraulic_reaeration_option = 2,
wind_reaeration_option = 2,
- timestep = 86400, #TODO Dynamic or static?
+ timestep = 1, #TODO Dynamic or static?
depth = 1.5, #TODO Dynamic or static?
- TwaterC = 20,
+ TwaterC = 25,
theta = 1.047,
velocity = 1,
flow = 2,
@@ -306,7 +315,7 @@ def default_gvars_params() -> GlobalVars:
lambda1 = .0088,
lambda2 = .054,
lambdas = .052,
- lambdam = .0174,
+ lambdam = .174,
Fr_PAR = .47
)
@@ -315,7 +324,7 @@ def get_nutrient_budget_instance(
initial_nsm1_state,
default_algae_params,
default_alkalinity_params,
- default_Balgae_params,
+ default_balgae_params,
default_nitrogen_params,
default_carbon_params,
default_CBOD_params,
@@ -326,7 +335,6 @@ def get_nutrient_budget_instance(
default_phosphorus_params,
default_gp_params,
default_gvars_params,
- use_sed_temp: bool = False,
) -> NutrientBudget:
"""Return an instance of the NSM1 class."""
@@ -335,7 +343,7 @@ def get_nutrient_budget_instance(
initial_state_values=initial_nsm1_state,
algae_parameters=default_algae_params,
alkalinity_parameters=default_alkalinity_params,
- Balgae_parameters=default_Balgae_params,
+ balgae_parameters=default_balgae_params,
nitrogen_parameters=default_nitrogen_params,
carbon_parameters=default_carbon_params,
CBOD_parameters=default_CBOD_params,
@@ -346,24 +354,20 @@ def get_nutrient_budget_instance(
phosphorus_parameters=default_phosphorus_params,
global_parameters=default_gp_params,
global_vars=default_gvars_params,
-
- use_sed_temp=use_sed_temp,
time_dim='nsm1_time_step',
)
-
@pytest.fixture(scope='module')
def tolerance() -> float:
"""Controls the precision of the pytest.approx() function."""
- return 0.0000001
-
+ return 0.001
def test_defaults(
time_steps,
initial_nsm1_state,
default_algae_params,
default_alkalinity_params,
- default_Balgae_params,
+ default_balgae_params,
default_nitrogen_params,
default_carbon_params,
default_CBOD_params,
@@ -385,7 +389,7 @@ def test_defaults(
initial_nsm1_state=initial_nsm1_state,
default_algae_params=default_algae_params,
default_alkalinity_params=default_alkalinity_params,
- default_Balgae_params=default_Balgae_params,
+ default_balgae_params=default_balgae_params,
default_nitrogen_params=default_nitrogen_params,
default_carbon_params=default_carbon_params,
default_CBOD_params=default_CBOD_params,
@@ -401,15 +405,16 @@ def test_defaults(
# Run the model
nsm1.increment_timestep()
Ap = nsm1.dataset.isel(nsm1_time_step=-1).Ap.values.item()
+
assert isinstance(Ap, float)
- assert pytest.approx(Ap, tolerance) == 53.19609
+ assert pytest.approx(Ap, tolerance) == 52.668
def test_changed_Ap(
time_steps,
initial_nsm1_state,
default_algae_params,
default_alkalinity_params,
- default_Balgae_params,
+ default_balgae_params,
default_nitrogen_params,
default_carbon_params,
default_CBOD_params,
@@ -433,7 +438,7 @@ def test_changed_Ap(
initial_nsm1_state=initial_nsm1_state,
default_algae_params=default_algae_params,
default_alkalinity_params=default_alkalinity_params,
- default_Balgae_params=default_Balgae_params,
+ default_balgae_params=default_balgae_params,
default_nitrogen_params=default_nitrogen_params,
default_carbon_params=default_carbon_params,
default_CBOD_params=default_CBOD_params,
@@ -451,14 +456,14 @@ def test_changed_Ap(
Ap = nsm1.dataset.isel(
nsm1_time_step=-1).Ap.values.item()
assert isinstance(Ap, float)
- assert pytest.approx(Ap, tolerance) == 75.57808
+ assert pytest.approx(Ap, tolerance) == 74.850
def test_changed_NH4(
time_steps,
initial_nsm1_state,
default_algae_params,
default_alkalinity_params,
- default_Balgae_params,
+ default_balgae_params,
default_nitrogen_params,
default_carbon_params,
default_CBOD_params,
@@ -482,7 +487,498 @@ def test_changed_NH4(
initial_nsm1_state=initial_nsm1_state,
default_algae_params=default_algae_params,
default_alkalinity_params=default_alkalinity_params,
- default_Balgae_params=default_Balgae_params,
+ default_balgae_params=default_balgae_params,
+ default_nitrogen_params=default_nitrogen_params,
+ default_carbon_params=default_carbon_params,
+ default_CBOD_params=default_CBOD_params,
+ default_DOX_params=default_DOX_params,
+ default_N2_params=default_N2_params,
+ default_POM_params=default_POM_params,
+ default_pathogen_params=default_pathogen_params,
+ default_phosphorus_params=default_phosphorus_params,
+ default_gp_params=default_gp_params,
+ default_gvars_params=default_gvars_params
+ )
+
+ # Run the model
+ nsm1.increment_timestep()
+ Ap = nsm1.dataset.isel(
+ nsm1_time_step=-1).Ap.values.item()
+ assert isinstance(Ap, float)
+ assert pytest.approx(Ap, tolerance) == 52.681
+
+def test_changed_KL(
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ default_algae_params['KL'] = 15
+
+ # instantiate the model
+ nsm1: NutrientBudget = get_nutrient_budget_instance(
+ time_steps=time_steps,
+ initial_nsm1_state=initial_nsm1_state,
+ default_algae_params=default_algae_params,
+ default_alkalinity_params=default_alkalinity_params,
+ default_balgae_params=default_balgae_params,
+ default_nitrogen_params=default_nitrogen_params,
+ default_carbon_params=default_carbon_params,
+ default_CBOD_params=default_CBOD_params,
+ default_DOX_params=default_DOX_params,
+ default_N2_params=default_N2_params,
+ default_POM_params=default_POM_params,
+ default_pathogen_params=default_pathogen_params,
+ default_phosphorus_params=default_phosphorus_params,
+ default_gp_params=default_gp_params,
+ default_gvars_params=default_gvars_params
+ )
+
+ # Run the model
+ nsm1.increment_timestep()
+ Ap = nsm1.dataset.isel(
+ nsm1_time_step=-1).Ap.values.item()
+ assert isinstance(Ap, float)
+ assert pytest.approx(Ap, tolerance) == 49.229
+
+def test_changed_KsN(
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ default_algae_params['KsN'] = 0.02
+
+ # instantiate the model
+ nsm1: NutrientBudget = get_nutrient_budget_instance(
+ time_steps=time_steps,
+ initial_nsm1_state=initial_nsm1_state,
+ default_algae_params=default_algae_params,
+ default_alkalinity_params=default_alkalinity_params,
+ default_balgae_params=default_balgae_params,
+ default_nitrogen_params=default_nitrogen_params,
+ default_carbon_params=default_carbon_params,
+ default_CBOD_params=default_CBOD_params,
+ default_DOX_params=default_DOX_params,
+ default_N2_params=default_N2_params,
+ default_POM_params=default_POM_params,
+ default_pathogen_params=default_pathogen_params,
+ default_phosphorus_params=default_phosphorus_params,
+ default_gp_params=default_gp_params,
+ default_gvars_params=default_gvars_params
+ )
+
+ # Run the model
+ nsm1.increment_timestep()
+ Ap = nsm1.dataset.isel(
+ nsm1_time_step=-1).Ap.values.item()
+ assert isinstance(Ap, float)
+ assert pytest.approx(Ap, tolerance) == 52.803
+
+def test_changed_KsP(
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ default_algae_params['KsP'] = 0.005
+
+ # instantiate the model
+ nsm1: NutrientBudget = get_nutrient_budget_instance(
+ time_steps=time_steps,
+ initial_nsm1_state=initial_nsm1_state,
+ default_algae_params=default_algae_params,
+ default_alkalinity_params=default_alkalinity_params,
+ default_balgae_params=default_balgae_params,
+ default_nitrogen_params=default_nitrogen_params,
+ default_carbon_params=default_carbon_params,
+ default_CBOD_params=default_CBOD_params,
+ default_DOX_params=default_DOX_params,
+ default_N2_params=default_N2_params,
+ default_POM_params=default_POM_params,
+ default_pathogen_params=default_pathogen_params,
+ default_phosphorus_params=default_phosphorus_params,
+ default_gp_params=default_gp_params,
+ default_gvars_params=default_gvars_params
+ )
+
+ # Run the model
+ nsm1.increment_timestep()
+ Ap = nsm1.dataset.isel(
+ nsm1_time_step=-1).Ap.values.item()
+ assert isinstance(Ap, float)
+ assert pytest.approx(Ap, tolerance) == 50.931
+
+def test_changed_mu_max(
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ default_algae_params['mu_max_20'] = 1.5
+
+ # instantiate the model
+ nsm1: NutrientBudget = get_nutrient_budget_instance(
+ time_steps=time_steps,
+ initial_nsm1_state=initial_nsm1_state,
+ default_algae_params=default_algae_params,
+ default_alkalinity_params=default_alkalinity_params,
+ default_balgae_params=default_balgae_params,
+ default_nitrogen_params=default_nitrogen_params,
+ default_carbon_params=default_carbon_params,
+ default_CBOD_params=default_CBOD_params,
+ default_DOX_params=default_DOX_params,
+ default_N2_params=default_N2_params,
+ default_POM_params=default_POM_params,
+ default_pathogen_params=default_pathogen_params,
+ default_phosphorus_params=default_phosphorus_params,
+ default_gp_params=default_gp_params,
+ default_gvars_params=default_gvars_params
+ )
+
+ # Run the model
+ nsm1.increment_timestep()
+ Ap = nsm1.dataset.isel(
+ nsm1_time_step=-1).Ap.values.item()
+ assert isinstance(Ap, float)
+ assert pytest.approx(Ap, tolerance) == 69.809
+
+def test_changed_kdp(
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ default_algae_params['kdp_20'] = 0.09
+
+ # instantiate the model
+ nsm1: NutrientBudget = get_nutrient_budget_instance(
+ time_steps=time_steps,
+ initial_nsm1_state=initial_nsm1_state,
+ default_algae_params=default_algae_params,
+ default_alkalinity_params=default_alkalinity_params,
+ default_balgae_params=default_balgae_params,
+ default_nitrogen_params=default_nitrogen_params,
+ default_carbon_params=default_carbon_params,
+ default_CBOD_params=default_CBOD_params,
+ default_DOX_params=default_DOX_params,
+ default_N2_params=default_N2_params,
+ default_POM_params=default_POM_params,
+ default_pathogen_params=default_pathogen_params,
+ default_phosphorus_params=default_phosphorus_params,
+ default_gp_params=default_gp_params,
+ default_gvars_params=default_gvars_params
+ )
+
+ # Run the model
+ nsm1.increment_timestep()
+ Ap = nsm1.dataset.isel(
+ nsm1_time_step=-1).Ap.values.item()
+ assert isinstance(Ap, float)
+ assert pytest.approx(Ap, tolerance) == 55.688
+
+def test_changed_krp(
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ default_algae_params['krp_20'] = 0.09
+
+ # instantiate the model
+ nsm1: NutrientBudget = get_nutrient_budget_instance(
+ time_steps=time_steps,
+ initial_nsm1_state=initial_nsm1_state,
+ default_algae_params=default_algae_params,
+ default_alkalinity_params=default_alkalinity_params,
+ default_balgae_params=default_balgae_params,
+ default_nitrogen_params=default_nitrogen_params,
+ default_carbon_params=default_carbon_params,
+ default_CBOD_params=default_CBOD_params,
+ default_DOX_params=default_DOX_params,
+ default_N2_params=default_N2_params,
+ default_POM_params=default_POM_params,
+ default_pathogen_params=default_pathogen_params,
+ default_phosphorus_params=default_phosphorus_params,
+ default_gp_params=default_gp_params,
+ default_gvars_params=default_gvars_params
+ )
+
+ # Run the model
+ nsm1.increment_timestep()
+ Ap = nsm1.dataset.isel(
+ nsm1_time_step=-1).Ap.values.item()
+ assert isinstance(Ap, float)
+ assert pytest.approx(Ap, tolerance) == 58.204
+
+def test_changed_vsap(
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ default_algae_params['vsap'] = 0.2
+
+ # instantiate the model
+ nsm1: NutrientBudget = get_nutrient_budget_instance(
+ time_steps=time_steps,
+ initial_nsm1_state=initial_nsm1_state,
+ default_algae_params=default_algae_params,
+ default_alkalinity_params=default_alkalinity_params,
+ default_balgae_params=default_balgae_params,
+ default_nitrogen_params=default_nitrogen_params,
+ default_carbon_params=default_carbon_params,
+ default_CBOD_params=default_CBOD_params,
+ default_DOX_params=default_DOX_params,
+ default_N2_params=default_N2_params,
+ default_POM_params=default_POM_params,
+ default_pathogen_params=default_pathogen_params,
+ default_phosphorus_params=default_phosphorus_params,
+ default_gp_params=default_gp_params,
+ default_gvars_params=default_gvars_params
+ )
+
+ # Run the model
+ nsm1.increment_timestep()
+ Ap = nsm1.dataset.isel(
+ nsm1_time_step=-1).Ap.values.item()
+ assert isinstance(Ap, float)
+ assert pytest.approx(Ap, tolerance) == 51.335
+
+def test_changed_NO3(
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ initial_state_dict['NO3'] = 10
+
+ # instantiate the model
+ nsm1: NutrientBudget = get_nutrient_budget_instance(
+ time_steps=time_steps,
+ initial_nsm1_state=initial_nsm1_state,
+ default_algae_params=default_algae_params,
+ default_alkalinity_params=default_alkalinity_params,
+ default_balgae_params=default_balgae_params,
+ default_nitrogen_params=default_nitrogen_params,
+ default_carbon_params=default_carbon_params,
+ default_CBOD_params=default_CBOD_params,
+ default_DOX_params=default_DOX_params,
+ default_N2_params=default_N2_params,
+ default_POM_params=default_POM_params,
+ default_pathogen_params=default_pathogen_params,
+ default_phosphorus_params=default_phosphorus_params,
+ default_gp_params=default_gp_params,
+ default_gvars_params=default_gvars_params
+ )
+
+ # Run the model
+ nsm1.increment_timestep()
+ Ap = nsm1.dataset.isel(
+ nsm1_time_step=-1).Ap.values.item()
+ assert isinstance(Ap, float)
+ assert pytest.approx(Ap, tolerance) == 52.803
+
+def test_changed_TIP(
+
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ initial_state_dict['TIP'] = 0.1
+
+ # instantiate the model
+ nsm1: NutrientBudget = get_nutrient_budget_instance(
+ time_steps=time_steps,
+ initial_nsm1_state=initial_nsm1_state,
+ default_algae_params=default_algae_params,
+ default_alkalinity_params=default_alkalinity_params,
+ default_balgae_params=default_balgae_params,
+ default_nitrogen_params=default_nitrogen_params,
+ default_carbon_params=default_carbon_params,
+ default_CBOD_params=default_CBOD_params,
+ default_DOX_params=default_DOX_params,
+ default_N2_params=default_N2_params,
+ default_POM_params=default_POM_params,
+ default_pathogen_params=default_pathogen_params,
+ default_phosphorus_params=default_phosphorus_params,
+ default_gp_params=default_gp_params,
+ default_gvars_params=default_gvars_params
+ )
+
+ # Run the model
+ nsm1.increment_timestep()
+ Ap = nsm1.dataset.isel(
+ nsm1_time_step=-1).Ap.values.item()
+ assert isinstance(Ap, float)
+ assert pytest.approx(Ap, tolerance) == 52.842
+
+def test_changed_TwaterC(
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ default_gvars_params['TwaterC'] = 35
+
+ # instantiate the model
+ nsm1: NutrientBudget = get_nutrient_budget_instance(
+ time_steps=time_steps,
+ initial_nsm1_state=initial_nsm1_state,
+ default_algae_params=default_algae_params,
+ default_alkalinity_params=default_alkalinity_params,
+ default_balgae_params=default_balgae_params,
default_nitrogen_params=default_nitrogen_params,
default_carbon_params=default_carbon_params,
default_CBOD_params=default_CBOD_params,
@@ -500,5 +996,6 @@ def test_changed_NH4(
Ap = nsm1.dataset.isel(
nsm1_time_step=-1).Ap.values.item()
assert isinstance(Ap, float)
- assert pytest.approx(Ap, tolerance) == 75.59588
+ assert pytest.approx(Ap, tolerance) == 62.385
+
\ No newline at end of file
From db5ab9a8136f383c5fb01cebdc4cba885668820e Mon Sep 17 00:00:00 2001
From: kewalak
Date: Wed, 27 Mar 2024 10:54:19 -0700
Subject: [PATCH 17/20] Finished Algae Tests
---
src/clearwater_modules/nsm1/processes.py | 40 +-
tests/test_7_nsm_algae_calculations.py | 938 ++++++++++++++++++++++-
2 files changed, 961 insertions(+), 17 deletions(-)
diff --git a/src/clearwater_modules/nsm1/processes.py b/src/clearwater_modules/nsm1/processes.py
index 1ab795b..7421312 100644
--- a/src/clearwater_modules/nsm1/processes.py
+++ b/src/clearwater_modules/nsm1/processes.py
@@ -488,7 +488,25 @@ def FN(
KsN: Michaelis-Menton half-saturation constant relating inorganic N to algal growth (mg-N/L)
"""
- FN_orig = xr.where(use_NH4 or use_NO3, (NH4 + NO3) / (KsN + NH4 + NO3), 1)
+ #FN_orig = xr.where(use_NH4 or use_NO3, (NH4 + NO3) / (KsN + NH4 + NO3), 1)
+
+ FN_orig: np.ndarray = np.select(
+ condlist= [
+ use_NH4 == True and use_NO3 == True,
+ use_NH4 == False and use_NO3 == True,
+ use_NH4 == True and use_NO3 == False,
+ use_NH4 == False and use_NO3 == False,
+ ],
+
+ choicelist= [
+ (NH4 + NO3) / (KsN + NH4 + NO3),
+ (NO3) / (KsN + NO3),
+ (NH4) / (KsN + NH4),
+ 1
+ ],
+
+ default = 1
+ )
FN: np.ndarray = np.select(
@@ -853,8 +871,26 @@ def FNb(
KsNb: Michaelis-Menton half-saturation constant relating inorganic N to benthic algal growth (mg-N/L)
"""
- FNb_orig = xr.where(use_NH4 or use_NO3, (NH4 + NO3) / (KsNb + NH4 + NO3),1)
+ #FNb_orig = xr.where(use_NH4 or use_NO3, (NH4 + NO3) / (KsNb + NH4 + NO3),1)
+ FNb_orig: np.ndarray = np.select(
+ condlist= [
+ use_NH4 == True and use_NO3 == True,
+ use_NH4 == True and use_NO3 == False,
+ use_NH4 == False and use_NO3 == True,
+ use_NH4 == False and use_NO3 == False,
+ ],
+
+ choicelist= [
+ (NH4 + NO3) / (KsNb + NH4 + NO3),
+ (NH4) / (KsNb + NH4),
+ (NO3) / (KsNb + NO3),
+ 1
+ ],
+
+ default = 1
+ )
+
FNb: np.ndarray = np.select(
condlist= [
math.isnan(FNb_orig),
diff --git a/tests/test_7_nsm_algae_calculations.py b/tests/test_7_nsm_algae_calculations.py
index d77ab9a..79dbfb6 100644
--- a/tests/test_7_nsm_algae_calculations.py
+++ b/tests/test_7_nsm_algae_calculations.py
@@ -360,7 +360,7 @@ def get_nutrient_budget_instance(
@pytest.fixture(scope='module')
def tolerance() -> float:
"""Controls the precision of the pytest.approx() function."""
- return 0.001
+ return 0.000001
def test_defaults(
time_steps,
@@ -407,7 +407,7 @@ def test_defaults(
Ap = nsm1.dataset.isel(nsm1_time_step=-1).Ap.values.item()
assert isinstance(Ap, float)
- assert pytest.approx(Ap, tolerance) == 52.668
+ assert pytest.approx(Ap, tolerance) == 52.668069
def test_changed_Ap(
time_steps,
@@ -456,7 +456,7 @@ def test_changed_Ap(
Ap = nsm1.dataset.isel(
nsm1_time_step=-1).Ap.values.item()
assert isinstance(Ap, float)
- assert pytest.approx(Ap, tolerance) == 74.850
+ assert pytest.approx(Ap, tolerance) == 74.849998
def test_changed_NH4(
time_steps,
@@ -505,7 +505,7 @@ def test_changed_NH4(
Ap = nsm1.dataset.isel(
nsm1_time_step=-1).Ap.values.item()
assert isinstance(Ap, float)
- assert pytest.approx(Ap, tolerance) == 52.681
+ assert pytest.approx(Ap, tolerance) == 52.680781
def test_changed_KL(
time_steps,
@@ -554,7 +554,7 @@ def test_changed_KL(
Ap = nsm1.dataset.isel(
nsm1_time_step=-1).Ap.values.item()
assert isinstance(Ap, float)
- assert pytest.approx(Ap, tolerance) == 49.229
+ assert pytest.approx(Ap, tolerance) == 49.229049
def test_changed_KsN(
time_steps,
@@ -603,7 +603,7 @@ def test_changed_KsN(
Ap = nsm1.dataset.isel(
nsm1_time_step=-1).Ap.values.item()
assert isinstance(Ap, float)
- assert pytest.approx(Ap, tolerance) == 52.803
+ assert pytest.approx(Ap, tolerance) == 52.803304
def test_changed_KsP(
time_steps,
@@ -652,7 +652,7 @@ def test_changed_KsP(
Ap = nsm1.dataset.isel(
nsm1_time_step=-1).Ap.values.item()
assert isinstance(Ap, float)
- assert pytest.approx(Ap, tolerance) == 50.931
+ assert pytest.approx(Ap, tolerance) == 50.931103
def test_changed_mu_max(
time_steps,
@@ -701,7 +701,7 @@ def test_changed_mu_max(
Ap = nsm1.dataset.isel(
nsm1_time_step=-1).Ap.values.item()
assert isinstance(Ap, float)
- assert pytest.approx(Ap, tolerance) == 69.809
+ assert pytest.approx(Ap, tolerance) == 69.809173
def test_changed_kdp(
time_steps,
@@ -750,7 +750,7 @@ def test_changed_kdp(
Ap = nsm1.dataset.isel(
nsm1_time_step=-1).Ap.values.item()
assert isinstance(Ap, float)
- assert pytest.approx(Ap, tolerance) == 55.688
+ assert pytest.approx(Ap, tolerance) == 55.687635
def test_changed_krp(
time_steps,
@@ -799,7 +799,7 @@ def test_changed_krp(
Ap = nsm1.dataset.isel(
nsm1_time_step=-1).Ap.values.item()
assert isinstance(Ap, float)
- assert pytest.approx(Ap, tolerance) == 58.204
+ assert pytest.approx(Ap, tolerance) == 58.203941
def test_changed_vsap(
time_steps,
@@ -848,7 +848,7 @@ def test_changed_vsap(
Ap = nsm1.dataset.isel(
nsm1_time_step=-1).Ap.values.item()
assert isinstance(Ap, float)
- assert pytest.approx(Ap, tolerance) == 51.335
+ assert pytest.approx(Ap, tolerance) == 51.334735
def test_changed_NO3(
time_steps,
@@ -897,7 +897,7 @@ def test_changed_NO3(
Ap = nsm1.dataset.isel(
nsm1_time_step=-1).Ap.values.item()
assert isinstance(Ap, float)
- assert pytest.approx(Ap, tolerance) == 52.803
+ assert pytest.approx(Ap, tolerance) == 52.802629
def test_changed_TIP(
@@ -947,7 +947,7 @@ def test_changed_TIP(
Ap = nsm1.dataset.isel(
nsm1_time_step=-1).Ap.values.item()
assert isinstance(Ap, float)
- assert pytest.approx(Ap, tolerance) == 52.842
+ assert pytest.approx(Ap, tolerance) == 52.842286
def test_changed_TwaterC(
time_steps,
@@ -996,6 +996,914 @@ def test_changed_TwaterC(
Ap = nsm1.dataset.isel(
nsm1_time_step=-1).Ap.values.item()
assert isinstance(Ap, float)
- assert pytest.approx(Ap, tolerance) == 62.385
+ assert pytest.approx(Ap, tolerance) == 62.384696
-
\ No newline at end of file
+def test_changed_depth(
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ default_gvars_params['depth'] = 2
+
+ # instantiate the model
+ nsm1: NutrientBudget = get_nutrient_budget_instance(
+ time_steps=time_steps,
+ initial_nsm1_state=initial_nsm1_state,
+ default_algae_params=default_algae_params,
+ default_alkalinity_params=default_alkalinity_params,
+ default_balgae_params=default_balgae_params,
+ default_nitrogen_params=default_nitrogen_params,
+ default_carbon_params=default_carbon_params,
+ default_CBOD_params=default_CBOD_params,
+ default_DOX_params=default_DOX_params,
+ default_N2_params=default_N2_params,
+ default_POM_params=default_POM_params,
+ default_pathogen_params=default_pathogen_params,
+ default_phosphorus_params=default_phosphorus_params,
+ default_gp_params=default_gp_params,
+ default_gvars_params=default_gvars_params
+ )
+
+ # Run the model
+ nsm1.increment_timestep()
+ Ap = nsm1.dataset.isel(
+ nsm1_time_step=-1).Ap.values.item()
+ assert isinstance(Ap, float)
+ assert pytest.approx(Ap, tolerance) == 47.171170
+
+def test_changed_q_solar(
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ default_gvars_params['q_solar'] = 250
+
+def test_changed_Fr_PAR(
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ default_gvars_params['Fr_PAR'] = 0.2
+
+ # instantiate the model
+ nsm1: NutrientBudget = get_nutrient_budget_instance(
+ time_steps=time_steps,
+ initial_nsm1_state=initial_nsm1_state,
+ default_algae_params=default_algae_params,
+ default_alkalinity_params=default_alkalinity_params,
+ default_balgae_params=default_balgae_params,
+ default_nitrogen_params=default_nitrogen_params,
+ default_carbon_params=default_carbon_params,
+ default_CBOD_params=default_CBOD_params,
+ default_DOX_params=default_DOX_params,
+ default_N2_params=default_N2_params,
+ default_POM_params=default_POM_params,
+ default_pathogen_params=default_pathogen_params,
+ default_phosphorus_params=default_phosphorus_params,
+ default_gp_params=default_gp_params,
+ default_gvars_params=default_gvars_params
+ )
+
+ # Run the model
+ nsm1.increment_timestep()
+ Ap = nsm1.dataset.isel(
+ nsm1_time_step=-1).Ap.values.item()
+ assert isinstance(Ap, float)
+ assert pytest.approx(Ap, tolerance) == 45.185221
+
+def test_changed_use_NH4(
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ default_gp_params['use_NH4'] = False
+
+ # instantiate the model
+ nsm1: NutrientBudget = get_nutrient_budget_instance(
+ time_steps=time_steps,
+ initial_nsm1_state=initial_nsm1_state,
+ default_algae_params=default_algae_params,
+ default_alkalinity_params=default_alkalinity_params,
+ default_balgae_params=default_balgae_params,
+ default_nitrogen_params=default_nitrogen_params,
+ default_carbon_params=default_carbon_params,
+ default_CBOD_params=default_CBOD_params,
+ default_DOX_params=default_DOX_params,
+ default_N2_params=default_N2_params,
+ default_POM_params=default_POM_params,
+ default_pathogen_params=default_pathogen_params,
+ default_phosphorus_params=default_phosphorus_params,
+ default_gp_params=default_gp_params,
+ default_gvars_params=default_gvars_params
+ )
+
+ # Run the model
+ nsm1.increment_timestep()
+ Ap = nsm1.dataset.isel(
+ nsm1_time_step=-1).Ap.values.item()
+ assert isinstance(Ap, float)
+ assert pytest.approx(Ap, tolerance) == 52.665375
+
+def test_changed_use_NO3(
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ default_gp_params['use_NO3'] = False
+
+ # instantiate the model
+ nsm1: NutrientBudget = get_nutrient_budget_instance(
+ time_steps=time_steps,
+ initial_nsm1_state=initial_nsm1_state,
+ default_algae_params=default_algae_params,
+ default_alkalinity_params=default_alkalinity_params,
+ default_balgae_params=default_balgae_params,
+ default_nitrogen_params=default_nitrogen_params,
+ default_carbon_params=default_carbon_params,
+ default_CBOD_params=default_CBOD_params,
+ default_DOX_params=default_DOX_params,
+ default_N2_params=default_N2_params,
+ default_POM_params=default_POM_params,
+ default_pathogen_params=default_pathogen_params,
+ default_phosphorus_params=default_phosphorus_params,
+ default_gp_params=default_gp_params,
+ default_gvars_params=default_gvars_params
+ )
+
+ # Run the model
+ nsm1.increment_timestep()
+ Ap = nsm1.dataset.isel(
+ nsm1_time_step=-1).Ap.values.item()
+ assert isinstance(Ap, float)
+ assert pytest.approx(Ap, tolerance) == 37.582388
+
+def test_changed_use_TIP(
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ default_gp_params['use_TIP'] = False
+
+ # instantiate the model
+ nsm1: NutrientBudget = get_nutrient_budget_instance(
+ time_steps=time_steps,
+ initial_nsm1_state=initial_nsm1_state,
+ default_algae_params=default_algae_params,
+ default_alkalinity_params=default_alkalinity_params,
+ default_balgae_params=default_balgae_params,
+ default_nitrogen_params=default_nitrogen_params,
+ default_carbon_params=default_carbon_params,
+ default_CBOD_params=default_CBOD_params,
+ default_DOX_params=default_DOX_params,
+ default_N2_params=default_N2_params,
+ default_POM_params=default_POM_params,
+ default_pathogen_params=default_pathogen_params,
+ default_phosphorus_params=default_phosphorus_params,
+ default_gp_params=default_gp_params,
+ default_gvars_params=default_gvars_params
+ )
+
+ # Run the model
+ nsm1.increment_timestep()
+ Ap = nsm1.dataset.isel(
+ nsm1_time_step=-1).Ap.values.item()
+ assert isinstance(Ap, float)
+ assert pytest.approx(Ap, tolerance) == 53.255764
+
+def test_changed_g2_l1(
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ default_algae_params['growth_rate_option'] = 2
+
+ # instantiate the model
+ nsm1: NutrientBudget = get_nutrient_budget_instance(
+ time_steps=time_steps,
+ initial_nsm1_state=initial_nsm1_state,
+ default_algae_params=default_algae_params,
+ default_alkalinity_params=default_alkalinity_params,
+ default_balgae_params=default_balgae_params,
+ default_nitrogen_params=default_nitrogen_params,
+ default_carbon_params=default_carbon_params,
+ default_CBOD_params=default_CBOD_params,
+ default_DOX_params=default_DOX_params,
+ default_N2_params=default_N2_params,
+ default_POM_params=default_POM_params,
+ default_pathogen_params=default_pathogen_params,
+ default_phosphorus_params=default_phosphorus_params,
+ default_gp_params=default_gp_params,
+ default_gvars_params=default_gvars_params
+ )
+
+ # Run the model
+ nsm1.increment_timestep()
+ Ap = nsm1.dataset.isel(
+ nsm1_time_step=-1).Ap.values.item()
+ assert isinstance(Ap, float)
+ assert pytest.approx(Ap, tolerance) == 52.939611
+
+def test_changed_g3_l1(
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ default_algae_params['growth_rate_option'] = 3
+
+ # instantiate the model
+ nsm1: NutrientBudget = get_nutrient_budget_instance(
+ time_steps=time_steps,
+ initial_nsm1_state=initial_nsm1_state,
+ default_algae_params=default_algae_params,
+ default_alkalinity_params=default_alkalinity_params,
+ default_balgae_params=default_balgae_params,
+ default_nitrogen_params=default_nitrogen_params,
+ default_carbon_params=default_carbon_params,
+ default_CBOD_params=default_CBOD_params,
+ default_DOX_params=default_DOX_params,
+ default_N2_params=default_N2_params,
+ default_POM_params=default_POM_params,
+ default_pathogen_params=default_pathogen_params,
+ default_phosphorus_params=default_phosphorus_params,
+ default_gp_params=default_gp_params,
+ default_gvars_params=default_gvars_params
+ )
+
+ # Run the model
+ nsm1.increment_timestep()
+ Ap = nsm1.dataset.isel(
+ nsm1_time_step=-1).Ap.values.item()
+ assert isinstance(Ap, float)
+ assert pytest.approx(Ap, tolerance) == 53.096967
+
+def test_changed_g1_l2(
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ #default_algae_params['growth_rate_option'] = 3
+ default_algae_params['light_limitation_option'] = 2
+
+ # instantiate the model
+ nsm1: NutrientBudget = get_nutrient_budget_instance(
+ time_steps=time_steps,
+ initial_nsm1_state=initial_nsm1_state,
+ default_algae_params=default_algae_params,
+ default_alkalinity_params=default_alkalinity_params,
+ default_balgae_params=default_balgae_params,
+ default_nitrogen_params=default_nitrogen_params,
+ default_carbon_params=default_carbon_params,
+ default_CBOD_params=default_CBOD_params,
+ default_DOX_params=default_DOX_params,
+ default_N2_params=default_N2_params,
+ default_POM_params=default_POM_params,
+ default_pathogen_params=default_pathogen_params,
+ default_phosphorus_params=default_phosphorus_params,
+ default_gp_params=default_gp_params,
+ default_gvars_params=default_gvars_params
+ )
+
+ # Run the model
+ nsm1.increment_timestep()
+ Ap = nsm1.dataset.isel(
+ nsm1_time_step=-1).Ap.values.item()
+ assert isinstance(Ap, float)
+ assert pytest.approx(Ap, tolerance) == 59.847275
+
+def test_changed_g2_l2(
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ default_algae_params['growth_rate_option'] = 2
+ default_algae_params['light_limitation_option'] = 2
+
+ # instantiate the model
+ nsm1: NutrientBudget = get_nutrient_budget_instance(
+ time_steps=time_steps,
+ initial_nsm1_state=initial_nsm1_state,
+ default_algae_params=default_algae_params,
+ default_alkalinity_params=default_alkalinity_params,
+ default_balgae_params=default_balgae_params,
+ default_nitrogen_params=default_nitrogen_params,
+ default_carbon_params=default_carbon_params,
+ default_CBOD_params=default_CBOD_params,
+ default_DOX_params=default_DOX_params,
+ default_N2_params=default_N2_params,
+ default_POM_params=default_POM_params,
+ default_pathogen_params=default_pathogen_params,
+ default_phosphorus_params=default_phosphorus_params,
+ default_gp_params=default_gp_params,
+ default_gvars_params=default_gvars_params
+ )
+
+ # Run the model
+ nsm1.increment_timestep()
+ Ap = nsm1.dataset.isel(
+ nsm1_time_step=-1).Ap.values.item()
+ assert isinstance(Ap, float)
+ assert pytest.approx(Ap, tolerance) == 60.175682
+
+def test_changed_g3_l2(
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ default_algae_params['growth_rate_option'] = 3
+ default_algae_params['light_limitation_option'] = 2
+
+ # instantiate the model
+ nsm1: NutrientBudget = get_nutrient_budget_instance(
+ time_steps=time_steps,
+ initial_nsm1_state=initial_nsm1_state,
+ default_algae_params=default_algae_params,
+ default_alkalinity_params=default_alkalinity_params,
+ default_balgae_params=default_balgae_params,
+ default_nitrogen_params=default_nitrogen_params,
+ default_carbon_params=default_carbon_params,
+ default_CBOD_params=default_CBOD_params,
+ default_DOX_params=default_DOX_params,
+ default_N2_params=default_N2_params,
+ default_POM_params=default_POM_params,
+ default_pathogen_params=default_pathogen_params,
+ default_phosphorus_params=default_phosphorus_params,
+ default_gp_params=default_gp_params,
+ default_gvars_params=default_gvars_params
+ )
+
+ # Run the model
+ nsm1.increment_timestep()
+ Ap = nsm1.dataset.isel(
+ nsm1_time_step=-1).Ap.values.item()
+ assert isinstance(Ap, float)
+ assert pytest.approx(Ap, tolerance) == 60.365992
+
+def test_changed_g1_l3(
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ default_algae_params['growth_rate_option'] = 1
+ default_algae_params['light_limitation_option'] = 3
+
+ # instantiate the model
+ nsm1: NutrientBudget = get_nutrient_budget_instance(
+ time_steps=time_steps,
+ initial_nsm1_state=initial_nsm1_state,
+ default_algae_params=default_algae_params,
+ default_alkalinity_params=default_alkalinity_params,
+ default_balgae_params=default_balgae_params,
+ default_nitrogen_params=default_nitrogen_params,
+ default_carbon_params=default_carbon_params,
+ default_CBOD_params=default_CBOD_params,
+ default_DOX_params=default_DOX_params,
+ default_N2_params=default_N2_params,
+ default_POM_params=default_POM_params,
+ default_pathogen_params=default_pathogen_params,
+ default_phosphorus_params=default_phosphorus_params,
+ default_gp_params=default_gp_params,
+ default_gvars_params=default_gvars_params
+ )
+
+ # Run the model
+ nsm1.increment_timestep()
+ Ap = nsm1.dataset.isel(
+ nsm1_time_step=-1).Ap.values.item()
+ assert isinstance(Ap, float)
+ assert pytest.approx(Ap, tolerance) == 40.479472
+
+def test_changed_lambda0(
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ default_gvars_params['lambda0'] = 5
+
+ # instantiate the model
+ nsm1: NutrientBudget = get_nutrient_budget_instance(
+ time_steps=time_steps,
+ initial_nsm1_state=initial_nsm1_state,
+ default_algae_params=default_algae_params,
+ default_alkalinity_params=default_alkalinity_params,
+ default_balgae_params=default_balgae_params,
+ default_nitrogen_params=default_nitrogen_params,
+ default_carbon_params=default_carbon_params,
+ default_CBOD_params=default_CBOD_params,
+ default_DOX_params=default_DOX_params,
+ default_N2_params=default_N2_params,
+ default_POM_params=default_POM_params,
+ default_pathogen_params=default_pathogen_params,
+ default_phosphorus_params=default_phosphorus_params,
+ default_gp_params=default_gp_params,
+ default_gvars_params=default_gvars_params
+ )
+
+ # Run the model
+ nsm1.increment_timestep()
+ Ap = nsm1.dataset.isel(
+ nsm1_time_step=-1).Ap.values.item()
+ assert isinstance(Ap, float)
+ assert pytest.approx(Ap, tolerance) == 31.938218
+
+def test_changed_lambda1(
+
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ default_gvars_params['lambda1'] = 0.03
+
+ # instantiate the model
+ nsm1: NutrientBudget = get_nutrient_budget_instance(
+ time_steps=time_steps,
+ initial_nsm1_state=initial_nsm1_state,
+ default_algae_params=default_algae_params,
+ default_alkalinity_params=default_alkalinity_params,
+ default_balgae_params=default_balgae_params,
+ default_nitrogen_params=default_nitrogen_params,
+ default_carbon_params=default_carbon_params,
+ default_CBOD_params=default_CBOD_params,
+ default_DOX_params=default_DOX_params,
+ default_N2_params=default_N2_params,
+ default_POM_params=default_POM_params,
+ default_pathogen_params=default_pathogen_params,
+ default_phosphorus_params=default_phosphorus_params,
+ default_gp_params=default_gp_params,
+ default_gvars_params=default_gvars_params
+ )
+
+ # Run the model
+ nsm1.increment_timestep()
+ Ap = nsm1.dataset.isel(
+ nsm1_time_step=-1).Ap.values.item()
+ assert isinstance(Ap, float)
+ assert pytest.approx(Ap, tolerance) == 46.601473
+
+def test_changed_lambda2(
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ default_gvars_params['lambda2'] = 0.02
+
+ # instantiate the model
+ nsm1: NutrientBudget = get_nutrient_budget_instance(
+ time_steps=time_steps,
+ initial_nsm1_state=initial_nsm1_state,
+ default_algae_params=default_algae_params,
+ default_alkalinity_params=default_alkalinity_params,
+ default_balgae_params=default_balgae_params,
+ default_nitrogen_params=default_nitrogen_params,
+ default_carbon_params=default_carbon_params,
+ default_CBOD_params=default_CBOD_params,
+ default_DOX_params=default_DOX_params,
+ default_N2_params=default_N2_params,
+ default_POM_params=default_POM_params,
+ default_pathogen_params=default_pathogen_params,
+ default_phosphorus_params=default_phosphorus_params,
+ default_gp_params=default_gp_params,
+ default_gvars_params=default_gvars_params
+ )
+
+ # Run the model
+ nsm1.increment_timestep()
+ Ap = nsm1.dataset.isel(
+ nsm1_time_step=-1).Ap.values.item()
+ assert isinstance(Ap, float)
+ assert pytest.approx(Ap, tolerance) == 55.635473
+
+def test_changed_lambdam(
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ default_gvars_params['lambdam'] = 0.009
+
+ # instantiate the model
+ nsm1: NutrientBudget = get_nutrient_budget_instance(
+ time_steps=time_steps,
+ initial_nsm1_state=initial_nsm1_state,
+ default_algae_params=default_algae_params,
+ default_alkalinity_params=default_alkalinity_params,
+ default_balgae_params=default_balgae_params,
+ default_nitrogen_params=default_nitrogen_params,
+ default_carbon_params=default_carbon_params,
+ default_CBOD_params=default_CBOD_params,
+ default_DOX_params=default_DOX_params,
+ default_N2_params=default_N2_params,
+ default_POM_params=default_POM_params,
+ default_pathogen_params=default_pathogen_params,
+ default_phosphorus_params=default_phosphorus_params,
+ default_gp_params=default_gp_params,
+ default_gvars_params=default_gvars_params
+ )
+
+ # Run the model
+ nsm1.increment_timestep()
+ Ap = nsm1.dataset.isel(
+ nsm1_time_step=-1).Ap.values.item()
+ assert isinstance(Ap, float)
+ assert pytest.approx(Ap, tolerance) == 62.784764
+
+def test_changed_use_POC(
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ default_gp_params['use_POC'] = False
+
+ # instantiate the model
+ nsm1: NutrientBudget = get_nutrient_budget_instance(
+ time_steps=time_steps,
+ initial_nsm1_state=initial_nsm1_state,
+ default_algae_params=default_algae_params,
+ default_alkalinity_params=default_alkalinity_params,
+ default_balgae_params=default_balgae_params,
+ default_nitrogen_params=default_nitrogen_params,
+ default_carbon_params=default_carbon_params,
+ default_CBOD_params=default_CBOD_params,
+ default_DOX_params=default_DOX_params,
+ default_N2_params=default_N2_params,
+ default_POM_params=default_POM_params,
+ default_pathogen_params=default_pathogen_params,
+ default_phosphorus_params=default_phosphorus_params,
+ default_gp_params=default_gp_params,
+ default_gvars_params=default_gvars_params
+ )
+
+ # Run the model
+ nsm1.increment_timestep()
+ Ap = nsm1.dataset.isel(
+ nsm1_time_step=-1).Ap.values.item()
+ assert isinstance(Ap, float)
+ assert pytest.approx(Ap, tolerance) == 63.113783
+
+def test_changed_POC(
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ initial_state_dict['POC'] = 6
+
+ # instantiate the model
+ nsm1: NutrientBudget = get_nutrient_budget_instance(
+ time_steps=time_steps,
+ initial_nsm1_state=initial_nsm1_state,
+ default_algae_params=default_algae_params,
+ default_alkalinity_params=default_alkalinity_params,
+ default_balgae_params=default_balgae_params,
+ default_nitrogen_params=default_nitrogen_params,
+ default_carbon_params=default_carbon_params,
+ default_CBOD_params=default_CBOD_params,
+ default_DOX_params=default_DOX_params,
+ default_N2_params=default_N2_params,
+ default_POM_params=default_POM_params,
+ default_pathogen_params=default_pathogen_params,
+ default_phosphorus_params=default_phosphorus_params,
+ default_gp_params=default_gp_params,
+ default_gvars_params=default_gvars_params
+ )
+
+ # Run the model
+ nsm1.increment_timestep()
+ Ap = nsm1.dataset.isel(
+ nsm1_time_step=-1).Ap.values.item()
+ assert isinstance(Ap, float)
+ assert pytest.approx(Ap, tolerance) == 46.458270
+
+def test_changed_fcom(
+ time_steps,
+ initial_nsm1_state,
+ default_algae_params,
+ default_alkalinity_params,
+ default_balgae_params,
+ default_nitrogen_params,
+ default_carbon_params,
+ default_CBOD_params,
+ default_DOX_params,
+ default_N2_params,
+ default_POM_params,
+ default_pathogen_params,
+ default_phosphorus_params,
+ default_gp_params,
+ default_gvars_params,
+ tolerance,
+) -> None:
+ """Test the model with default parameters."""
+ # alter parameters as necessary
+ initial_state_dict = initial_nsm1_state
+ default_gvars_params['fcom'] = 0.6
+
+ # instantiate the model
+ nsm1: NutrientBudget = get_nutrient_budget_instance(
+ time_steps=time_steps,
+ initial_nsm1_state=initial_nsm1_state,
+ default_algae_params=default_algae_params,
+ default_alkalinity_params=default_alkalinity_params,
+ default_balgae_params=default_balgae_params,
+ default_nitrogen_params=default_nitrogen_params,
+ default_carbon_params=default_carbon_params,
+ default_CBOD_params=default_CBOD_params,
+ default_DOX_params=default_DOX_params,
+ default_N2_params=default_N2_params,
+ default_POM_params=default_POM_params,
+ default_pathogen_params=default_pathogen_params,
+ default_phosphorus_params=default_phosphorus_params,
+ default_gp_params=default_gp_params,
+ default_gvars_params=default_gvars_params
+ )
+
+ # Run the model
+ nsm1.increment_timestep()
+ Ap = nsm1.dataset.isel(
+ nsm1_time_step=-1).Ap.values.item()
+ assert isinstance(Ap, float)
+ assert pytest.approx(Ap, tolerance) == 56.937679
\ No newline at end of file
From 77ac3f7521b602b0e104d4e1069c2756b83a7f7d Mon Sep 17 00:00:00 2001
From: Isaac Mudge <66634423+imscw95@users.noreply.github.com>
Date: Thu, 28 Mar 2024 09:56:37 -0500
Subject: [PATCH 18/20] Corrected np.select syntax in the processes.py file,
troubleshooted time_dim error and other processes issues with math.isnan and
min.
---
examples/model_architecture.ipynb | 181 ++++++++++++-----------
src/clearwater_modules/nsm1/constants.py | 2 +-
src/clearwater_modules/nsm1/processes.py | 58 ++++----
tests/test_6_nsm_module.py | 1 -
4 files changed, 122 insertions(+), 120 deletions(-)
diff --git a/examples/model_architecture.ipynb b/examples/model_architecture.ipynb
index 1737146..4a9f8bd 100644
--- a/examples/model_architecture.ipynb
+++ b/examples/model_architecture.ipynb
@@ -170,52 +170,12 @@
},
{
"cell_type": "code",
- "execution_count": 3,
+ "execution_count": 2,
"id": "a5d34d2d-03a6-41e1-92fc-9e6fba72d6f5",
"metadata": {
"tags": []
},
"outputs": [
- {
- "data": {
- "application/javascript": "(function(root) {\n function now() {\n return new Date();\n }\n\n var force = true;\n var py_version = '3.2.2'.replace('rc', '-rc.').replace('.dev', '-dev.');\n var is_dev = py_version.indexOf(\"+\") !== -1 || py_version.indexOf(\"-\") !== -1;\n var reloading = false;\n var Bokeh = root.Bokeh;\n var bokeh_loaded = Bokeh != null && (Bokeh.version === py_version || (Bokeh.versions !== undefined && Bokeh.versions.has(py_version)));\n\n if (typeof (root._bokeh_timeout) === \"undefined\" || force) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks;\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, js_modules, js_exports, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n if (js_modules == null) js_modules = [];\n if (js_exports == null) js_exports = {};\n\n root._bokeh_onload_callbacks.push(callback);\n\n if (root._bokeh_is_loading > 0) {\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls.length === 0 && js_modules.length === 0 && Object.keys(js_exports).length === 0) {\n run_callbacks();\n return null;\n }\n if (!reloading) {\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n }\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n window._bokeh_on_load = on_load\n\n function on_error() {\n console.error(\"failed to load \" + url);\n }\n\n var skip = [];\n if (window.requirejs) {\n window.requirejs.config({'packages': {}, 'paths': {'jspanel': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/jspanel', 'jspanel-modal': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/modal/jspanel.modal', 'jspanel-tooltip': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/tooltip/jspanel.tooltip', 'jspanel-hint': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/hint/jspanel.hint', 'jspanel-layout': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/layout/jspanel.layout', 'jspanel-contextmenu': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/contextmenu/jspanel.contextmenu', 'jspanel-dock': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/dock/jspanel.dock', 'gridstack': 'https://cdn.jsdelivr.net/npm/gridstack@7.2.3/dist/gridstack-all', 'notyf': 'https://cdn.jsdelivr.net/npm/notyf@3/notyf.min'}, 'shim': {'jspanel': {'exports': 'jsPanel'}, 'gridstack': {'exports': 'GridStack'}}});\n require([\"jspanel\"], function(jsPanel) {\n\twindow.jsPanel = jsPanel\n\ton_load()\n })\n require([\"jspanel-modal\"], function() {\n\ton_load()\n })\n require([\"jspanel-tooltip\"], function() {\n\ton_load()\n })\n require([\"jspanel-hint\"], function() {\n\ton_load()\n })\n require([\"jspanel-layout\"], function() {\n\ton_load()\n })\n require([\"jspanel-contextmenu\"], function() {\n\ton_load()\n })\n require([\"jspanel-dock\"], function() {\n\ton_load()\n })\n require([\"gridstack\"], function(GridStack) {\n\twindow.GridStack = GridStack\n\ton_load()\n })\n require([\"notyf\"], function() {\n\ton_load()\n })\n root._bokeh_is_loading = css_urls.length + 9;\n } else {\n root._bokeh_is_loading = css_urls.length + js_urls.length + js_modules.length + Object.keys(js_exports).length;\n }\n\n var existing_stylesheets = []\n var links = document.getElementsByTagName('link')\n for (var i = 0; i < links.length; i++) {\n var link = links[i]\n if (link.href != null) {\n\texisting_stylesheets.push(link.href)\n }\n }\n for (var i = 0; i < css_urls.length; i++) {\n var url = css_urls[i];\n if (existing_stylesheets.indexOf(url) !== -1) {\n\ton_load()\n\tcontinue;\n }\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error;\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n } if (((window['jsPanel'] !== undefined) && (!(window['jsPanel'] instanceof HTMLElement))) || window.requirejs) {\n var urls = ['https://cdn.holoviz.org/panel/1.2.3/dist/bundled/floatpanel/jspanel4@4.12.0/dist/jspanel.js', 'https://cdn.holoviz.org/panel/1.2.3/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/modal/jspanel.modal.js', 'https://cdn.holoviz.org/panel/1.2.3/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/tooltip/jspanel.tooltip.js', 'https://cdn.holoviz.org/panel/1.2.3/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/hint/jspanel.hint.js', 'https://cdn.holoviz.org/panel/1.2.3/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/layout/jspanel.layout.js', 'https://cdn.holoviz.org/panel/1.2.3/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/contextmenu/jspanel.contextmenu.js', 'https://cdn.holoviz.org/panel/1.2.3/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/dock/jspanel.dock.js'];\n for (var i = 0; i < urls.length; i++) {\n skip.push(urls[i])\n }\n } if (((window['GridStack'] !== undefined) && (!(window['GridStack'] instanceof HTMLElement))) || window.requirejs) {\n var urls = ['https://cdn.holoviz.org/panel/1.2.3/dist/bundled/gridstack/gridstack@7.2.3/dist/gridstack-all.js'];\n for (var i = 0; i < urls.length; i++) {\n skip.push(urls[i])\n }\n } if (((window['Notyf'] !== undefined) && (!(window['Notyf'] instanceof HTMLElement))) || window.requirejs) {\n var urls = ['https://cdn.holoviz.org/panel/1.2.3/dist/bundled/notificationarea/notyf@3/notyf.min.js'];\n for (var i = 0; i < urls.length; i++) {\n skip.push(urls[i])\n }\n } var existing_scripts = []\n var scripts = document.getElementsByTagName('script')\n for (var i = 0; i < scripts.length; i++) {\n var script = scripts[i]\n if (script.src != null) {\n\texisting_scripts.push(script.src)\n }\n }\n for (var i = 0; i < js_urls.length; i++) {\n var url = js_urls[i];\n if (skip.indexOf(url) !== -1 || existing_scripts.indexOf(url) !== -1) {\n\tif (!window.requirejs) {\n\t on_load();\n\t}\n\tcontinue;\n }\n var element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error;\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n for (var i = 0; i < js_modules.length; i++) {\n var url = js_modules[i];\n if (skip.indexOf(url) !== -1 || existing_scripts.indexOf(url) !== -1) {\n\tif (!window.requirejs) {\n\t on_load();\n\t}\n\tcontinue;\n }\n var element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error;\n element.async = false;\n element.src = url;\n element.type = \"module\";\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n for (const name in js_exports) {\n var url = js_exports[name];\n if (skip.indexOf(url) >= 0 || root[name] != null) {\n\tif (!window.requirejs) {\n\t on_load();\n\t}\n\tcontinue;\n }\n var element = document.createElement('script');\n element.onerror = on_error;\n element.async = false;\n element.type = \"module\";\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n element.textContent = `\n import ${name} from \"${url}\"\n window.${name} = ${name}\n window._bokeh_on_load()\n `\n document.head.appendChild(element);\n }\n if (!js_urls.length && !js_modules.length) {\n on_load()\n }\n };\n\n function inject_raw_css(css) {\n const element = document.createElement(\"style\");\n element.appendChild(document.createTextNode(css));\n document.body.appendChild(element);\n }\n\n var js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-3.2.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.2.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.2.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.2.2.min.js\", \"https://cdn.holoviz.org/panel/1.2.3/dist/panel.min.js\"];\n var js_modules = [];\n var js_exports = {};\n var css_urls = [];\n var inline_js = [ function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\nfunction(Bokeh) {} // ensure no trailing comma for IE\n ];\n\n function run_inline_js() {\n if ((root.Bokeh !== undefined) || (force === true)) {\n for (var i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }\n // Cache old bokeh versions\n if (Bokeh != undefined && !reloading) {\n\tvar NewBokeh = root.Bokeh;\n\tif (Bokeh.versions === undefined) {\n\t Bokeh.versions = new Map();\n\t}\n\tif (NewBokeh.version !== Bokeh.version) {\n\t Bokeh.versions.set(NewBokeh.version, NewBokeh)\n\t}\n\troot.Bokeh = Bokeh;\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n }\n root._bokeh_is_initializing = false\n }\n\n function load_or_wait() {\n // Implement a backoff loop that tries to ensure we do not load multiple\n // versions of Bokeh and its dependencies at the same time.\n // In recent versions we use the root._bokeh_is_initializing flag\n // to determine whether there is an ongoing attempt to initialize\n // bokeh, however for backward compatibility we also try to ensure\n // that we do not start loading a newer (Panel>=1.0 and Bokeh>3) version\n // before older versions are fully initialized.\n if (root._bokeh_is_initializing && Date.now() > root._bokeh_timeout) {\n root._bokeh_is_initializing = false;\n root._bokeh_onload_callbacks = undefined;\n console.log(\"Bokeh: BokehJS was loaded multiple times but one version failed to initialize.\");\n load_or_wait();\n } else if (root._bokeh_is_initializing || (typeof root._bokeh_is_initializing === \"undefined\" && root._bokeh_onload_callbacks !== undefined)) {\n setTimeout(load_or_wait, 100);\n } else {\n Bokeh = root.Bokeh;\n bokeh_loaded = Bokeh != null && (Bokeh.version === py_version || (Bokeh.versions !== undefined && Bokeh.versions.has(py_version)));\n root._bokeh_is_initializing = true\n root._bokeh_onload_callbacks = []\n if (!reloading && (!bokeh_loaded || is_dev)) {\n\troot.Bokeh = undefined;\n }\n load_libs(css_urls, js_urls, js_modules, js_exports, function() {\n\tconsole.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n\trun_inline_js();\n });\n }\n }\n // Give older versions of the autoload script a head-start to ensure\n // they initialize before we start loading newer version.\n setTimeout(load_or_wait, 100)\n}(window));",
- "application/vnd.holoviews_load.v0+json": ""
- },
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "application/javascript": "\nif ((window.PyViz === undefined) || (window.PyViz instanceof HTMLElement)) {\n window.PyViz = {comms: {}, comm_status:{}, kernels:{}, receivers: {}, plot_index: []}\n}\n\n\n function JupyterCommManager() {\n }\n\n JupyterCommManager.prototype.register_target = function(plot_id, comm_id, msg_handler) {\n if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n comm_manager.register_target(comm_id, function(comm) {\n comm.on_msg(msg_handler);\n });\n } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n window.PyViz.kernels[plot_id].registerCommTarget(comm_id, function(comm) {\n comm.onMsg = msg_handler;\n });\n } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n google.colab.kernel.comms.registerTarget(comm_id, (comm) => {\n var messages = comm.messages[Symbol.asyncIterator]();\n function processIteratorResult(result) {\n var message = result.value;\n console.log(message)\n var content = {data: message.data, comm_id};\n var buffers = []\n for (var buffer of message.buffers || []) {\n buffers.push(new DataView(buffer))\n }\n var metadata = message.metadata || {};\n var msg = {content, buffers, metadata}\n msg_handler(msg);\n return messages.next().then(processIteratorResult);\n }\n return messages.next().then(processIteratorResult);\n })\n }\n }\n\n JupyterCommManager.prototype.get_client_comm = function(plot_id, comm_id, msg_handler) {\n if (comm_id in window.PyViz.comms) {\n return window.PyViz.comms[comm_id];\n } else if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n var comm = comm_manager.new_comm(comm_id, {}, {}, {}, comm_id);\n if (msg_handler) {\n comm.on_msg(msg_handler);\n }\n } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n var comm = window.PyViz.kernels[plot_id].connectToComm(comm_id);\n comm.open();\n if (msg_handler) {\n comm.onMsg = msg_handler;\n }\n } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n var comm_promise = google.colab.kernel.comms.open(comm_id)\n comm_promise.then((comm) => {\n window.PyViz.comms[comm_id] = comm;\n if (msg_handler) {\n var messages = comm.messages[Symbol.asyncIterator]();\n function processIteratorResult(result) {\n var message = result.value;\n var content = {data: message.data};\n var metadata = message.metadata || {comm_id};\n var msg = {content, metadata}\n msg_handler(msg);\n return messages.next().then(processIteratorResult);\n }\n return messages.next().then(processIteratorResult);\n }\n }) \n var sendClosure = (data, metadata, buffers, disposeOnDone) => {\n return comm_promise.then((comm) => {\n comm.send(data, metadata, buffers, disposeOnDone);\n });\n };\n var comm = {\n send: sendClosure\n };\n }\n window.PyViz.comms[comm_id] = comm;\n return comm;\n }\n window.PyViz.comm_manager = new JupyterCommManager();\n \n\n\nvar JS_MIME_TYPE = 'application/javascript';\nvar HTML_MIME_TYPE = 'text/html';\nvar EXEC_MIME_TYPE = 'application/vnd.holoviews_exec.v0+json';\nvar CLASS_NAME = 'output';\n\n/**\n * Render data to the DOM node\n */\nfunction render(props, node) {\n var div = document.createElement(\"div\");\n var script = document.createElement(\"script\");\n node.appendChild(div);\n node.appendChild(script);\n}\n\n/**\n * Handle when a new output is added\n */\nfunction handle_add_output(event, handle) {\n var output_area = handle.output_area;\n var output = handle.output;\n if ((output.data == undefined) || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n return\n }\n var id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n if (id !== undefined) {\n var nchildren = toinsert.length;\n var html_node = toinsert[nchildren-1].children[0];\n html_node.innerHTML = output.data[HTML_MIME_TYPE];\n var scripts = [];\n var nodelist = html_node.querySelectorAll(\"script\");\n for (var i in nodelist) {\n if (nodelist.hasOwnProperty(i)) {\n scripts.push(nodelist[i])\n }\n }\n\n scripts.forEach( function (oldScript) {\n var newScript = document.createElement(\"script\");\n var attrs = [];\n var nodemap = oldScript.attributes;\n for (var j in nodemap) {\n if (nodemap.hasOwnProperty(j)) {\n attrs.push(nodemap[j])\n }\n }\n attrs.forEach(function(attr) { newScript.setAttribute(attr.name, attr.value) });\n newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n oldScript.parentNode.replaceChild(newScript, oldScript);\n });\n if (JS_MIME_TYPE in output.data) {\n toinsert[nchildren-1].children[1].textContent = output.data[JS_MIME_TYPE];\n }\n output_area._hv_plot_id = id;\n if ((window.Bokeh !== undefined) && (id in Bokeh.index)) {\n window.PyViz.plot_index[id] = Bokeh.index[id];\n } else {\n window.PyViz.plot_index[id] = null;\n }\n } else if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n var bk_div = document.createElement(\"div\");\n bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n var script_attrs = bk_div.children[0].attributes;\n for (var i = 0; i < script_attrs.length; i++) {\n toinsert[toinsert.length - 1].childNodes[1].setAttribute(script_attrs[i].name, script_attrs[i].value);\n }\n // store reference to server id on output_area\n output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n }\n}\n\n/**\n * Handle when an output is cleared or removed\n */\nfunction handle_clear_output(event, handle) {\n var id = handle.cell.output_area._hv_plot_id;\n var server_id = handle.cell.output_area._bokeh_server_id;\n if (((id === undefined) || !(id in PyViz.plot_index)) && (server_id !== undefined)) { return; }\n var comm = window.PyViz.comm_manager.get_client_comm(\"hv-extension-comm\", \"hv-extension-comm\", function () {});\n if (server_id !== null) {\n comm.send({event_type: 'server_delete', 'id': server_id});\n return;\n } else if (comm !== null) {\n comm.send({event_type: 'delete', 'id': id});\n }\n delete PyViz.plot_index[id];\n if ((window.Bokeh !== undefined) & (id in window.Bokeh.index)) {\n var doc = window.Bokeh.index[id].model.document\n doc.clear();\n const i = window.Bokeh.documents.indexOf(doc);\n if (i > -1) {\n window.Bokeh.documents.splice(i, 1);\n }\n }\n}\n\n/**\n * Handle kernel restart event\n */\nfunction handle_kernel_cleanup(event, handle) {\n delete PyViz.comms[\"hv-extension-comm\"];\n window.PyViz.plot_index = {}\n}\n\n/**\n * Handle update_display_data messages\n */\nfunction handle_update_output(event, handle) {\n handle_clear_output(event, {cell: {output_area: handle.output_area}})\n handle_add_output(event, handle)\n}\n\nfunction register_renderer(events, OutputArea) {\n function append_mime(data, metadata, element) {\n // create a DOM node to render to\n var toinsert = this.create_output_subarea(\n metadata,\n CLASS_NAME,\n EXEC_MIME_TYPE\n );\n this.keyboard_manager.register_events(toinsert);\n // Render to node\n var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n render(props, toinsert[0]);\n element.append(toinsert);\n return toinsert\n }\n\n events.on('output_added.OutputArea', handle_add_output);\n events.on('output_updated.OutputArea', handle_update_output);\n events.on('clear_output.CodeCell', handle_clear_output);\n events.on('delete.Cell', handle_clear_output);\n events.on('kernel_ready.Kernel', handle_kernel_cleanup);\n\n OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n safe: true,\n index: 0\n });\n}\n\nif (window.Jupyter !== undefined) {\n try {\n var events = require('base/js/events');\n var OutputArea = require('notebook/js/outputarea').OutputArea;\n if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n register_renderer(events, OutputArea);\n }\n } catch(err) {\n }\n}\n",
- "application/vnd.holoviews_load.v0+json": ""
- },
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "text/html": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- },
{
"name": "stdout",
"output_type": "stream",
@@ -591,98 +551,98 @@
" fill: currentColor;\n",
"}\n",
"<xarray.Dataset>\n",
- "Dimensions: (year: 2, x: 1, y: 1)\n",
+ "Dimensions: (tsm_time_step: 2, x: 1, y: 1)\n",
"Coordinates:\n",
- " * year (year) int32 0 1\n",
+ " * tsm_time_step (tsm_time_step) int32 0 1\n",
" * x (x) float64 1.0\n",
" * y (y) float64 1.0\n",
"Data variables: (12/52)\n",
- " water_temp_c (year, x, y) float64 20.0 20.0\n",
- " surface_area (year, x, y) int32 1 1\n",
- " volume (year, x, y) int32 1 1\n",
+ " water_temp_c (tsm_time_step, x, y) float64 20.0 20.0\n",
+ " surface_area (tsm_time_step, x, y) float64 1.0 1.0\n",
+ " volume (tsm_time_step, x, y) float64 1.0 1.0\n",
" use_sed_temp (x, y) bool True\n",
" stefan_boltzmann (x, y) float64 5.67e-08\n",
" cp_air (x, y) int32 1005\n",
" ... ...\n",
- " q_sediment (year, x, y) float64 nan -401.5\n",
- " dTdt_sediment_c (year, x, y) float64 nan 129.6\n",
- " q_longwave_down (year, x, y) float64 nan 337.8\n",
- " q_longwave_up (year, x, y) float64 nan 406.2\n",
- " q_net (year, x, y) float64 nan -151.1\n",
- " dTdt_water_c (year, x, y) float64 nan -3.619e-05
water_temp_c
(year, x, y)
float64
20.0 20.0
- long_name :
- Water temperature
- units :
- degC
- description :
- TSM state variable for water temperature
array([[[20. ]],\n",
+ " q_sediment (tsm_time_step, x, y) float64 nan -401.5\n",
+ " dTdt_sediment_c (tsm_time_step, x, y) float64 nan 129.6\n",
+ " q_net (tsm_time_step, x, y) float64 nan -151.1\n",
+ " q_longwave_down (tsm_time_step, x, y) float64 nan 337.8\n",
+ " q_longwave_up (tsm_time_step, x, y) float64 nan 406.2\n",
+ " dTdt_water_c (tsm_time_step, x, y) float64 nan -3.619e-05
water_temp_c
(tsm_time_step, x, y)
float64
20.0 20.0
- long_name :
- Water temperature
- units :
- degC
- description :
- TSM state variable for water temperature
array([[[20. ]],\n",
"\n",
- " [[19.99996381]]])
surface_area
(year, x, y)
int32
1 1
- long_name :
- Surface area
- units :
- m^2
- description :
- Surface area
array([[[1]],\n",
+ " [[19.99996381]]])
surface_area
(tsm_time_step, x, y)
float64
1.0 1.0
- long_name :
- Surface area
- units :
- m^2
- description :
- Surface area
array([[[1.]],\n",
"\n",
- " [[1]]])
volume
(year, x, y)
int32
1 1
- long_name :
- Volume
- units :
- m^3
- description :
- Volume
array([[[1]],\n",
+ " [[1.]]])
volume
(tsm_time_step, x, y)
float64
1.0 1.0
- long_name :
- Volume
- units :
- m^3
- description :
- Volume
array([[[1.]],\n",
"\n",
- " [[1]]])
use_sed_temp
(x, y)
bool
True
- long_name :
- Use Sediment Temperature?
- units :
- boolean
- description :
- Controls whether to use/calculate sediment temperature or not.
stefan_boltzmann
(x, y)
float64
5.67e-08
- long_name :
- Stefan-Boltzmann Constant
- units :
- W m-2 K-4
- description :
- The Stefan-Boltzmann constant.
cp_air
(x, y)
int32
1005
- long_name :
- Specific Heat Capacity of Air
- units :
- J kg-1 K-1
- description :
- The specific heat capacity of air.
emissivity_water
(x, y)
float64
0.97
- long_name :
- Emissivity of Water
- units :
- 1
- description :
- The emissivity of water.
gravity
(x, y)
float64
9.806
- long_name :
- Gravity
- units :
- m s-2
- description :
- The acceleration due to gravity.
a0
(x, y)
float64
6.985e+03
- long_name :
- Albedo of Water
- units :
- unitless
- description :
- The albedo of water.
a1
(x, y)
float64
-188.9
- long_name :
- Albedo of Water
- units :
- unitless
- description :
- The albedo of water.
a2
(x, y)
float64
2.133
- long_name :
- Albedo of Water
- units :
- unitless
- description :
- The albedo of water.
a3
(x, y)
float64
-0.01289
- long_name :
- Albedo of Water
- units :
- unitless
- description :
- The albedo of water.
a4
(x, y)
float64
4.394e-05
- long_name :
- Albedo of Water
- units :
- unitless
- description :
- The albedo of water.
a5
(x, y)
float64
-8.024e-08
- long_name :
- Albedo of Water
- units :
- unitless
- description :
- The albedo of water.
a6
(x, y)
float64
6.137e-11
- long_name :
- Albedo of Water
- units :
- unitless
- description :
- The albedo of water.
pb
(x, y)
int32
1600
- long_name :
- Bulk Density of Sediment
- units :
- kg m-3
- description :
- The bulk density of sediment.
cps
(x, y)
int32
1673
- long_name :
- CPS
- units :
- J kg-1 K-1
- description :
- The CPS.
h2
(x, y)
float64
0.1
- long_name :
- H2
- units :
- m
- description :
- The H2.
alphas
(x, y)
float64
0.0432
- long_name :
- Alphas
- units :
- m-1
- description :
- The alphas.
richardson_option
(x, y)
bool
True
- long_name :
- Richardson Option
- units :
- unitless
- description :
- The Richardson option.
air_temp_c
(x, y)
int32
20
- long_name :
- Air Temperature
- units :
- C
- description :
- The air temperature.
q_solar
(x, y)
int32
400
- long_name :
- Solar Heat Flux
- units :
- W m-2
- description :
- The solar heat flux.
sed_temp_c
(x, y)
int32
5
- long_name :
- Sediment Temperature
- units :
- C
- description :
- The sediment temperature.
eair_mb
(x, y)
int32
1
- long_name :
- Eair MB
- units :
- mb
- description :
- The eair MB.
pressure_mb
(x, y)
int32
1013
- long_name :
- Pressure
- units :
- mb
- description :
- The pressure.
cloudiness
(x, y)
float64
0.1
- long_name :
- Cloudiness
- units :
- unitless
- description :
- The cloudiness.
wind_speed
(x, y)
int32
3
- long_name :
- Wind Speed
- units :
- m s-1
- description :
- The wind speed.
wind_a
(x, y)
float64
0.3
- long_name :
- Wind A
- units :
- m s-1
- description :
- The wind A.
wind_b
(x, y)
float64
1.5
- long_name :
- Wind B
- units :
- m s-1
- description :
- The wind B.
wind_c
(x, y)
int32
1
- long_name :
- Wind C
- units :
- m s-1
- description :
- The wind C.
wind_kh_kw
(x, y)
int32
1
- long_name :
- Wind KH KW
- units :
- m s-1
- description :
- The wind KH KW.
air_temp_k
(year, x, y)
float64
nan 293.2
- long_name :
- Air temperature
- units :
- K
- description :
- Air temperature
array([[[ nan]],\n",
+ " [[1.]]])
use_sed_temp
(x, y)
bool
True
- long_name :
- Use Sediment Temperature?
- units :
- boolean
- description :
- Controls whether to use/calculate sediment temperature or not.
stefan_boltzmann
(x, y)
float64
5.67e-08
- long_name :
- Stefan-Boltzmann Constant
- units :
- W m-2 K-4
- description :
- The Stefan-Boltzmann constant.
cp_air
(x, y)
int32
1005
- long_name :
- Specific Heat Capacity of Air
- units :
- J kg-1 K-1
- description :
- The specific heat capacity of air.
emissivity_water
(x, y)
float64
0.97
- long_name :
- Emissivity of Water
- units :
- 1
- description :
- The emissivity of water.
gravity
(x, y)
float64
9.806
- long_name :
- Gravity
- units :
- m s-2
- description :
- The acceleration due to gravity.
a0
(x, y)
float64
6.985e+03
- long_name :
- Albedo of Water
- units :
- unitless
- description :
- The albedo of water.
a1
(x, y)
float64
-188.9
- long_name :
- Albedo of Water
- units :
- unitless
- description :
- The albedo of water.
a2
(x, y)
float64
2.133
- long_name :
- Albedo of Water
- units :
- unitless
- description :
- The albedo of water.
a3
(x, y)
float64
-0.01289
- long_name :
- Albedo of Water
- units :
- unitless
- description :
- The albedo of water.
a4
(x, y)
float64
4.394e-05
- long_name :
- Albedo of Water
- units :
- unitless
- description :
- The albedo of water.
a5
(x, y)
float64
-8.024e-08
- long_name :
- Albedo of Water
- units :
- unitless
- description :
- The albedo of water.
a6
(x, y)
float64
6.137e-11
- long_name :
- Albedo of Water
- units :
- unitless
- description :
- The albedo of water.
pb
(x, y)
int32
1600
- long_name :
- Bulk Density of Sediment
- units :
- kg m-3
- description :
- The bulk density of sediment.
cps
(x, y)
int32
1673
- long_name :
- CPS
- units :
- J kg-1 K-1
- description :
- The CPS.
h2
(x, y)
float64
0.1
- long_name :
- H2
- units :
- m
- description :
- The H2.
alphas
(x, y)
float64
0.0432
- long_name :
- Alphas
- units :
- m-1
- description :
- The alphas.
richardson_option
(x, y)
bool
True
- long_name :
- Richardson Option
- units :
- unitless
- description :
- The Richardson option.
air_temp_c
(x, y)
int32
20
- long_name :
- Air Temperature
- units :
- C
- description :
- The air temperature.
q_solar
(x, y)
int32
400
- long_name :
- Solar Heat Flux
- units :
- W m-2
- description :
- The solar heat flux.
sed_temp_c
(x, y)
int32
5
- long_name :
- Sediment Temperature
- units :
- C
- description :
- The sediment temperature.
eair_mb
(x, y)
int32
1
- long_name :
- Eair MB
- units :
- mb
- description :
- The eair MB.
pressure_mb
(x, y)
int32
1013
- long_name :
- Pressure
- units :
- mb
- description :
- The pressure.
cloudiness
(x, y)
float64
0.1
- long_name :
- Cloudiness
- units :
- unitless
- description :
- The cloudiness.
wind_speed
(x, y)
int32
3
- long_name :
- Wind Speed
- units :
- m s-1
- description :
- The wind speed.
wind_a
(x, y)
float64
0.3
- long_name :
- Wind A
- units :
- m s-1
- description :
- The wind A.
wind_b
(x, y)
float64
1.5
- long_name :
- Wind B
- units :
- m s-1
- description :
- The wind B.
wind_c
(x, y)
int32
1
- long_name :
- Wind C
- units :
- m s-1
- description :
- The wind C.
wind_kh_kw
(x, y)
int32
1
- long_name :
- Wind KH KW
- units :
- m s-1
- description :
- The wind KH KW.
air_temp_k
(tsm_time_step, x, y)
float64
nan 293.2
- long_name :
- Air temperature
- units :
- K
- description :
- Air temperature
array([[[ nan]],\n",
"\n",
- " [[293.16]]])
water_temp_k
(year, x, y)
float64
nan 293.2
- long_name :
- Water temperature
- units :
- K
- description :
- Water temperature
array([[[ nan]],\n",
+ " [[293.16]]])
water_temp_k
(tsm_time_step, x, y)
float64
nan 293.2
- long_name :
- Water temperature
- units :
- K
- description :
- Water temperature
array([[[ nan]],\n",
"\n",
- " [[293.16]]])
mixing_ratio_air
(year, x, y)
float64
nan 0.0006146
- long_name :
- Mixing ratio of air
- units :
- unitless
- description :
- Mixing ratio of air
array([[[ nan]],\n",
+ " [[293.16]]])
mixing_ratio_air
(tsm_time_step, x, y)
float64
nan 0.0006146
- long_name :
- Mixing ratio of air
- units :
- unitless
- description :
- Mixing ratio of air
array([[[ nan]],\n",
"\n",
- " [[0.00061462]]])
density_air
(year, x, y)
float64
nan 1.202
- long_name :
- Density of air
- units :
- kg/m^3
- description :
- Density of air
array([[[ nan]],\n",
+ " [[0.00061462]]])
density_air
(tsm_time_step, x, y)
float64
nan 1.202
- long_name :
- Density of air
- units :
- kg/m^3
- description :
- Density of air
array([[[ nan]],\n",
"\n",
- " [[1.20204653]]])
density_water
(year, x, y)
float64
nan 998.2
- long_name :
- Density of water
- units :
- kg/m^3
- description :
- Density of water
array([[[ nan]],\n",
+ " [[1.20204653]]])
density_water
(tsm_time_step, x, y)
float64
nan 998.2
- long_name :
- Density of water
- units :
- kg/m^3
- description :
- Density of water
array([[[ nan]],\n",
"\n",
- " [[998.20668383]]])
esat_mb
(year, x, y)
float64
nan 23.63
- long_name :
- Saturation vapor pressure
- units :
- mb
- description :
- Saturation vapor pressure
array([[[ nan]],\n",
+ " [[998.20668383]]])
esat_mb
(tsm_time_step, x, y)
float64
nan 23.63
- long_name :
- Saturation vapor pressure
- units :
- mb
- description :
- Saturation vapor pressure
array([[[ nan]],\n",
"\n",
- " [[23.62941518]]])
density_air_sat
(year, x, y)
float64
nan 1.192
- long_name :
- Density of air at saturation
- units :
- kg/m^3
- description :
- Density of air at saturation
array([[[ nan]],\n",
+ " [[23.62941518]]])
density_air_sat
(tsm_time_step, x, y)
float64
nan 1.192
- long_name :
- Density of air at saturation
- units :
- kg/m^3
- description :
- Density of air at saturation
array([[[ nan]],\n",
"\n",
- " [[1.19185468]]])
ri_number
(year, x, y)
float64
nan 0.01848
- long_name :
- Richardson number
- units :
- unitless
- description :
- Richardson number
array([[[ nan]],\n",
+ " [[1.19185468]]])
ri_number
(tsm_time_step, x, y)
float64
nan 0.01848
- long_name :
- Richardson number
- units :
- unitless
- description :
- Richardson number
array([[[ nan]],\n",
"\n",
- " [[0.01847614]]])
ri_function
(year, x, y)
float64
nan 0.6771
- long_name :
- Richardson function
- units :
- unitless
- description :
- Richardson function
array([[[ nan]],\n",
+ " [[0.01847614]]])
ri_function
(tsm_time_step, x, y)
float64
nan 0.6771
- long_name :
- Richardson function
- units :
- unitless
- description :
- Richardson function
array([[[ nan]],\n",
"\n",
- " [[0.67707413]]])
lv
(year, x, y)
float64
nan 1.801e+06
- long_name :
- Latent heat of vaporization
- units :
- J/kg
- description :
- Latent heat of vaporization
array([[[ nan]],\n",
+ " [[0.67707413]]])
lv
(tsm_time_step, x, y)
float64
nan 1.801e+06
- long_name :
- Latent heat of vaporization
- units :
- J/kg
- description :
- Latent heat of vaporization
array([[[ nan]],\n",
"\n",
- " [[1800595.4616]]])
cp_water
(year, x, y)
float64
nan 4.182e+03
- long_name :
- Specific heat of water
- units :
- J/kg/K
- description :
- Specific heat of water
array([[[ nan]],\n",
+ " [[1800595.4616]]])
cp_water
(tsm_time_step, x, y)
float64
nan 4.182e+03
- long_name :
- Specific heat of water
- units :
- J/kg/K
- description :
- Specific heat of water
array([[[ nan]],\n",
"\n",
- " [[4182.]]])
emissivity_air
(year, x, y)
float64
nan 0.8053
- long_name :
- Emissivity of air
- units :
- unitless
- description :
- Emissivity of air
array([[[ nan]],\n",
+ " [[4182.]]])
emissivity_air
(tsm_time_step, x, y)
float64
nan 0.8053
- long_name :
- Emissivity of air
- units :
- unitless
- description :
- Emissivity of air
array([[[ nan]],\n",
"\n",
- " [[0.8052839]]])
wind_function
(year, x, y)
float64
nan 3.25e-06
- long_name :
- Wind function
- units :
- unitless
- description :
- Wind function
array([[[ nan]],\n",
+ " [[0.8052839]]])
wind_function
(tsm_time_step, x, y)
float64
nan 3.25e-06
- long_name :
- Wind function
- units :
- unitless
- description :
- Wind function
array([[[ nan]],\n",
"\n",
- " [[3.2499558e-06]]])
q_latent
(year, x, y)
float64
nan 81.16
- long_name :
- Latent heat flux
- units :
- W/m^2
- description :
- Latent heat flux
array([[[ nan]],\n",
+ " [[3.2499558e-06]]])
q_latent
(tsm_time_step, x, y)
float64
nan 81.16
- long_name :
- Latent heat flux
- units :
- W/m^2
- description :
- Latent heat flux
array([[[ nan]],\n",
"\n",
- " [[81.1649171]]])
q_sensible
(year, x, y)
float64
nan 0.0
- long_name :
- Sensible heat flux
- units :
- W/m^2
- description :
- Sensible heat flux
array([[[nan]],\n",
+ " [[81.1649171]]])
q_sensible
(tsm_time_step, x, y)
float64
nan 0.0
- long_name :
- Sensible heat flux
- units :
- W/m^2
- description :
- Sensible heat flux
array([[[nan]],\n",
"\n",
- " [[ 0.]]])
q_sediment
(year, x, y)
float64
nan -401.5
- long_name :
- Sediment heat flux
- units :
- W/m^2
- description :
- Sediment heat flux
array([[[ nan]],\n",
+ " [[ 0.]]])
q_sediment
(tsm_time_step, x, y)
float64
nan -401.5
- long_name :
- Sediment heat flux
- units :
- W/m^2
- description :
- Sediment heat flux
array([[[ nan]],\n",
"\n",
- " [[-401.52]]])
dTdt_sediment_c
(year, x, y)
float64
nan 129.6
- long_name :
- Sediment temperature change
- units :
- degC
- description :
- Sediment temperature change
array([[[ nan]],\n",
+ " [[-401.52]]])
dTdt_sediment_c
(tsm_time_step, x, y)
float64
nan 129.6
- long_name :
- Sediment temperature change
- units :
- degC
- description :
- Sediment temperature change
array([[[ nan]],\n",
"\n",
- " [[129.6]]])
q_longwave_down
(year, x, y)
float64
nan 337.8
- long_name :
- Downwelling longwave radiation
- units :
- W/m2
- description :
- Downwelling longwave radiation
array([[[ nan]],\n",
+ " [[129.6]]])
q_net
(tsm_time_step, x, y)
float64
nan -151.1
- long_name :
- Net heat flux
- units :
- W/m^2
- description :
- Net heat flux
array([[[ nan]],\n",
"\n",
- " [[337.82252346]]])
q_longwave_up
(year, x, y)
float64
nan 406.2
- long_name :
- Upwelling longwave radiation
- units :
- W/m2
- description :
- Upwelling longwave radiation
array([[[ nan]],\n",
+ " [[-151.09393929]]])
q_longwave_down
(tsm_time_step, x, y)
float64
nan 337.8
- long_name :
- Downwelling longwave radiation
- units :
- W/m2
- description :
- Downwelling longwave radiation
array([[[ nan]],\n",
"\n",
- " [[406.23154566]]])
q_net
(year, x, y)
float64
nan -151.1
- long_name :
- Net heat flux
- units :
- W/m^2
- description :
- Net heat flux
array([[[ nan]],\n",
+ " [[337.82252346]]])
q_longwave_up
(tsm_time_step, x, y)
float64
nan 406.2
- long_name :
- Upwelling longwave radiation
- units :
- W/m2
- description :
- Upwelling longwave radiation
array([[[ nan]],\n",
"\n",
- " [[-151.09393929]]])
dTdt_water_c
(year, x, y)
float64
nan -3.619e-05
- long_name :
- Water temperature change
- units :
- degC
- description :
- Water temperature change
array([[[ nan]],\n",
+ " [[406.23154566]]])
dTdt_water_c
(tsm_time_step, x, y)
float64
nan -3.619e-05
- long_name :
- Water temperature change
- units :
- degC
- description :
- Water temperature change
array([[[ nan]],\n",
"\n",
- " [[-3.61944967e-05]]])
"
+ " [[-3.61944967e-05]]])
"
],
"text/plain": [
"\n",
- "Dimensions: (year: 2, x: 1, y: 1)\n",
+ "Dimensions: (tsm_time_step: 2, x: 1, y: 1)\n",
"Coordinates:\n",
- " * year (year) int32 0 1\n",
+ " * tsm_time_step (tsm_time_step) int32 0 1\n",
" * x (x) float64 1.0\n",
" * y (y) float64 1.0\n",
"Data variables: (12/52)\n",
- " water_temp_c (year, x, y) float64 20.0 20.0\n",
- " surface_area (year, x, y) int32 1 1\n",
- " volume (year, x, y) int32 1 1\n",
+ " water_temp_c (tsm_time_step, x, y) float64 20.0 20.0\n",
+ " surface_area (tsm_time_step, x, y) float64 1.0 1.0\n",
+ " volume (tsm_time_step, x, y) float64 1.0 1.0\n",
" use_sed_temp (x, y) bool True\n",
" stefan_boltzmann (x, y) float64 5.67e-08\n",
" cp_air (x, y) int32 1005\n",
" ... ...\n",
- " q_sediment (year, x, y) float64 nan -401.5\n",
- " dTdt_sediment_c (year, x, y) float64 nan 129.6\n",
- " q_longwave_down (year, x, y) float64 nan 337.8\n",
- " q_longwave_up (year, x, y) float64 nan 406.2\n",
- " q_net (year, x, y) float64 nan -151.1\n",
- " dTdt_water_c (year, x, y) float64 nan -3.619e-05"
+ " q_sediment (tsm_time_step, x, y) float64 nan -401.5\n",
+ " dTdt_sediment_c (tsm_time_step, x, y) float64 nan 129.6\n",
+ " q_net (tsm_time_step, x, y) float64 nan -151.1\n",
+ " q_longwave_down (tsm_time_step, x, y) float64 nan 337.8\n",
+ " q_longwave_up (tsm_time_step, x, y) float64 nan 406.2\n",
+ " dTdt_water_c (tsm_time_step, x, y) float64 nan -3.619e-05"
]
},
- "execution_count": 1,
+ "execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
@@ -731,15 +691,58 @@
" 'richardson_option': True\n",
"}\n",
"\n",
+ "time_step = 1\n",
+ "\n",
"tsm_model = cwm.tsm.EnergyBudget(\n",
+ " time_steps=time_step,\n",
" initial_state_values=initial_state_values, # mandatory\n",
" temp_parameters=temp_parameters,\n",
" meteo_parameters=meteo_parameters,\n",
" track_dynamic_variables=True, # default is true\n",
" hotstart_dataset=None, # default is None\n",
- " time_dim='year', # default is \"timestep\"\n",
+ " time_dim='tsm_time_step', # default is \"timestep\"\n",
")\n",
"\n",
+ "tsm_model.increment_timestep()\n",
+ "tsm_model.dataset\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "id": "644f6baf",
+ "metadata": {},
+ "outputs": [
+ {
+ "ename": "KeyError",
+ "evalue": "\"not all values found in index 'tsm_time_step'. Try setting the `method` keyword argument (example: method='nearest').\"",
+ "output_type": "error",
+ "traceback": [
+ "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
+ "\u001b[1;31mKeyError\u001b[0m Traceback (most recent call last)",
+ "File \u001b[1;32mc:\\Anaconda3\\envs\\clearwater_dev_env\\Lib\\site-packages\\pandas\\core\\indexes\\base.py:3790\u001b[0m, in \u001b[0;36mIndex.get_loc\u001b[1;34m(self, key)\u001b[0m\n\u001b[0;32m 3789\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m-> 3790\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_engine\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget_loc\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcasted_key\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 3791\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mKeyError\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m err:\n",
+ "File \u001b[1;32mindex.pyx:152\u001b[0m, in \u001b[0;36mpandas._libs.index.IndexEngine.get_loc\u001b[1;34m()\u001b[0m\n",
+ "File \u001b[1;32mindex.pyx:181\u001b[0m, in \u001b[0;36mpandas._libs.index.IndexEngine.get_loc\u001b[1;34m()\u001b[0m\n",
+ "File \u001b[1;32mpandas\\_libs\\hashtable_class_helper.pxi:4484\u001b[0m, in \u001b[0;36mpandas._libs.hashtable.Int32HashTable.get_item\u001b[1;34m()\u001b[0m\n",
+ "File \u001b[1;32mpandas\\_libs\\hashtable_class_helper.pxi:4508\u001b[0m, in \u001b[0;36mpandas._libs.hashtable.Int32HashTable.get_item\u001b[1;34m()\u001b[0m\n",
+ "\u001b[1;31mKeyError\u001b[0m: 2",
+ "\nThe above exception was the direct cause of the following exception:\n",
+ "\u001b[1;31mKeyError\u001b[0m Traceback (most recent call last)",
+ "File \u001b[1;32mc:\\Anaconda3\\envs\\clearwater_dev_env\\Lib\\site-packages\\xarray\\core\\indexes.py:772\u001b[0m, in \u001b[0;36mPandasIndex.sel\u001b[1;34m(self, labels, method, tolerance)\u001b[0m\n\u001b[0;32m 771\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m--> 772\u001b[0m indexer \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mindex\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget_loc\u001b[49m\u001b[43m(\u001b[49m\u001b[43mlabel_value\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 773\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mKeyError\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m e:\n",
+ "File \u001b[1;32mc:\\Anaconda3\\envs\\clearwater_dev_env\\Lib\\site-packages\\pandas\\core\\indexes\\base.py:3797\u001b[0m, in \u001b[0;36mIndex.get_loc\u001b[1;34m(self, key)\u001b[0m\n\u001b[0;32m 3796\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m InvalidIndexError(key)\n\u001b[1;32m-> 3797\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mKeyError\u001b[39;00m(key) \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01merr\u001b[39;00m\n\u001b[0;32m 3798\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mTypeError\u001b[39;00m:\n\u001b[0;32m 3799\u001b[0m \u001b[38;5;66;03m# If we have a listlike key, _check_indexing_error will raise\u001b[39;00m\n\u001b[0;32m 3800\u001b[0m \u001b[38;5;66;03m# InvalidIndexError. Otherwise we fall through and re-raise\u001b[39;00m\n\u001b[0;32m 3801\u001b[0m \u001b[38;5;66;03m# the TypeError.\u001b[39;00m\n",
+ "\u001b[1;31mKeyError\u001b[0m: 2",
+ "\nThe above exception was the direct cause of the following exception:\n",
+ "\u001b[1;31mKeyError\u001b[0m Traceback (most recent call last)",
+ "Cell \u001b[1;32mIn[3], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[43mtsm_model\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mincrement_timestep\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 2\u001b[0m tsm_model\u001b[38;5;241m.\u001b[39mdataset\n",
+ "File \u001b[1;32m~\\Documents\\GitHub\\ClearWater-modules\\src\\clearwater_modules\\base.py:530\u001b[0m, in \u001b[0;36mModel.increment_timestep\u001b[1;34m(self, update_state_values)\u001b[0m\n\u001b[0;32m 523\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mtimestep_ds \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mtimestep_ds\u001b[38;5;241m.\u001b[39mdrop_vars(\n\u001b[0;32m 524\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mdynamic_variables_names\n\u001b[0;32m 525\u001b[0m )\n\u001b[0;32m 526\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mtimestep_ds \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mtimestep_ds\u001b[38;5;241m.\u001b[39mdrop_vars(\n\u001b[0;32m 527\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_non_updateable_static_variables\n\u001b[0;32m 528\u001b[0m )\n\u001b[1;32m--> 530\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdataset\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mtemporal_variables\u001b[49m\u001b[43m]\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mloc\u001b[49m\u001b[43m[\u001b[49m\n\u001b[0;32m 531\u001b[0m \u001b[43m \u001b[49m\u001b[43m{\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mtime_dim\u001b[49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mtimestep\u001b[49m\u001b[43m}\u001b[49m\n\u001b[0;32m 532\u001b[0m \u001b[43m\u001b[49m\u001b[43m]\u001b[49m \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mtimestep_ds\n\u001b[0;32m 534\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mdataset\n",
+ "File \u001b[1;32mc:\\Anaconda3\\envs\\clearwater_dev_env\\Lib\\site-packages\\xarray\\core\\dataset.py:510\u001b[0m, in \u001b[0;36m_LocIndexer.__setitem__\u001b[1;34m(self, key, value)\u001b[0m\n\u001b[0;32m 504\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mTypeError\u001b[39;00m(\n\u001b[0;32m 505\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcan only set locations defined by dictionaries from Dataset.loc.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m 506\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m Got: \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mkey\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m 507\u001b[0m )\n\u001b[0;32m 509\u001b[0m \u001b[38;5;66;03m# set new values\u001b[39;00m\n\u001b[1;32m--> 510\u001b[0m dim_indexers \u001b[38;5;241m=\u001b[39m \u001b[43mmap_index_queries\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdataset\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mkey\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241m.\u001b[39mdim_indexers\n\u001b[0;32m 511\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mdataset[dim_indexers] \u001b[38;5;241m=\u001b[39m value\n",
+ "File \u001b[1;32mc:\\Anaconda3\\envs\\clearwater_dev_env\\Lib\\site-packages\\xarray\\core\\indexing.py:193\u001b[0m, in \u001b[0;36mmap_index_queries\u001b[1;34m(obj, indexers, method, tolerance, **indexers_kwargs)\u001b[0m\n\u001b[0;32m 191\u001b[0m results\u001b[38;5;241m.\u001b[39mappend(IndexSelResult(labels))\n\u001b[0;32m 192\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m--> 193\u001b[0m results\u001b[38;5;241m.\u001b[39mappend(\u001b[43mindex\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43msel\u001b[49m\u001b[43m(\u001b[49m\u001b[43mlabels\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43moptions\u001b[49m\u001b[43m)\u001b[49m)\n\u001b[0;32m 195\u001b[0m merged \u001b[38;5;241m=\u001b[39m merge_sel_results(results)\n\u001b[0;32m 197\u001b[0m \u001b[38;5;66;03m# drop dimension coordinates found in dimension indexers\u001b[39;00m\n\u001b[0;32m 198\u001b[0m \u001b[38;5;66;03m# (also drop multi-index if any)\u001b[39;00m\n\u001b[0;32m 199\u001b[0m \u001b[38;5;66;03m# (.sel() already ensures alignment)\u001b[39;00m\n",
+ "File \u001b[1;32mc:\\Anaconda3\\envs\\clearwater_dev_env\\Lib\\site-packages\\xarray\\core\\indexes.py:774\u001b[0m, in \u001b[0;36mPandasIndex.sel\u001b[1;34m(self, labels, method, tolerance)\u001b[0m\n\u001b[0;32m 772\u001b[0m indexer \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mindex\u001b[38;5;241m.\u001b[39mget_loc(label_value)\n\u001b[0;32m 773\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mKeyError\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m e:\n\u001b[1;32m--> 774\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mKeyError\u001b[39;00m(\n\u001b[0;32m 775\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mnot all values found in index \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mcoord_name\u001b[38;5;132;01m!r}\u001b[39;00m\u001b[38;5;124m. \u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m 776\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mTry setting the `method` keyword argument (example: method=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mnearest\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m).\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m 777\u001b[0m ) \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01me\u001b[39;00m\n\u001b[0;32m 779\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m label_array\u001b[38;5;241m.\u001b[39mdtype\u001b[38;5;241m.\u001b[39mkind \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mb\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n\u001b[0;32m 780\u001b[0m indexer \u001b[38;5;241m=\u001b[39m label_array\n",
+ "\u001b[1;31mKeyError\u001b[0m: \"not all values found in index 'tsm_time_step'. Try setting the `method` keyword argument (example: method='nearest').\""
+ ]
+ }
+ ],
+ "source": [
"tsm_model.increment_timestep()\n",
"tsm_model.dataset"
]
diff --git a/src/clearwater_modules/nsm1/constants.py b/src/clearwater_modules/nsm1/constants.py
index 5d6cc6d..14af78b 100644
--- a/src/clearwater_modules/nsm1/constants.py
+++ b/src/clearwater_modules/nsm1/constants.py
@@ -285,7 +285,7 @@ class GlobalVars(TypedDict):
kah_20_user = 999,
hydraulic_reaeration_option = 2,
wind_reaeration_option = 2,
- timestep = 86400, #TODO Dynamic or static?
+ timestep = 1, #TODO Dynamic or static?
depth = 1.5, #TODO Dynamic or static?
TwaterC = 20,
theta = 1.047,
diff --git a/src/clearwater_modules/nsm1/processes.py b/src/clearwater_modules/nsm1/processes.py
index 7421312..e27f167 100644
--- a/src/clearwater_modules/nsm1/processes.py
+++ b/src/clearwater_modules/nsm1/processes.py
@@ -79,15 +79,15 @@ def kah_20(
hydraulic_reaeration_option == 2,
hydraulic_reaeration_option == 3,
hydraulic_reaeration_option == 4,
- hydraulic_reaeration_option == 5 and depth < 0.61,
- hydraulic_reaeration_option == 5 and depth > 0.61,
- hydraulic_reaeration_option == 5 and depth == 0.61,
- hydraulic_reaeration_option == 6 and flow < 0.556,
- hydraulic_reaeration_option == 6 and flow >= 0.556,
- hydraulic_reaeration_option == 7 and flow < 0.556,
- hydraulic_reaeration_option == 7 and flow >= 0.556,
- hydraulic_reaeration_option == 8 and flow < 0.425,
- hydraulic_reaeration_option == 8 and flow >= 0.425,
+ (hydraulic_reaeration_option == 5) & (depth < 0.61),
+ (hydraulic_reaeration_option == 5) & (depth > 0.61),
+ (hydraulic_reaeration_option == 5) & (depth == 0.61),
+ (hydraulic_reaeration_option == 6) & (flow < 0.556),
+ (hydraulic_reaeration_option == 6) & (flow >= 0.556),
+ (hydraulic_reaeration_option == 7) & (flow < 0.556),
+ (hydraulic_reaeration_option == 7) & (flow >= 0.556),
+ (hydraulic_reaeration_option == 8) & (flow < 0.425),
+ (hydraulic_reaeration_option == 8) & (flow >= 0.425),
hydraulic_reaeration_option == 9],
choicelist = [kah_20_user,
@@ -145,21 +145,21 @@ def kaw_20(
condlist = [
wind_reaeration_option == 1,
wind_reaeration_option == 2,
- wind_reaeration_option == 3 and Uw10 <= 3.5,
- wind_reaeration_option == 3 and Uw10 > 3.5,
+ (wind_reaeration_option == 3) & (Uw10 <= 3.5),
+ (wind_reaeration_option == 3) & (Uw10 > 3.5),
wind_reaeration_option == 4,
wind_reaeration_option == 5,
wind_reaeration_option == 6,
- wind_reaeration_option == 7 and Uw10 <= 5.5,
- wind_reaeration_option == 7 and Uw10 > 5.5,
+ (wind_reaeration_option == 7) & (Uw10 <= 5.5),
+ (wind_reaeration_option == 7) & (Uw10 > 5.5),
wind_reaeration_option == 8,
- wind_reaeration_option == 9 and Uw10 <= 4.1,
- wind_reaeration_option == 9 and Uw10 > 4.1,
+ (wind_reaeration_option == 9) & (Uw10 <= 4.1),
+ (wind_reaeration_option == 9) & (Uw10 > 4.1),
wind_reaeration_option == 10,
wind_reaeration_option == 11,
wind_reaeration_option == 12,
- wind_reaeration_option == 13 and Uw10 < 1.6,
- wind_reaeration_option == 13 and Uw10 >= 1.6,
+ (wind_reaeration_option == 13) & (Uw10 < 1.6),
+ (wind_reaeration_option == 13) & (Uw10 >= 1.6),
],
choicelist = [
@@ -289,7 +289,7 @@ def PAR(
q_solar: solar radiation (1/d),
Fr_PAR: fraction of solar radiation within the PAR of the spectrum
"""
- return xr.where (use_Algae or use_Balgae, q_solar * Fr_PAR, 0)
+ return xr.where ((use_Algae) | (use_Balgae), q_solar * Fr_PAR, 0)
#TODO does not appear HEC-RAS actually uses Solid in any calculations
def fdp(
@@ -433,12 +433,12 @@ def FL(
FL_orig: np.ndarray = np.select(
condlist = [
- Ap <= 0.0 or (L * depth) <= 0.0 or PAR <= 0.0,
+ (Ap <= 0.0) | (L * depth <= 0.0) | (PAR <= 0.0),
light_limitation_option == 1,
- light_limitation_option == 2 and np.abs(KL) < 0.0000000001,
- light_limitation_option == 2 and np.abs(KL) >= 0.0000000001,
- light_limitation_option == 3 and np.abs(KL) < 0.0000000001,
- light_limitation_option == 3 and np.abs(KL) >= 0.0000000001,
+ (light_limitation_option == 2) & (np.abs(KL) < 0.0000000001),
+ (light_limitation_option == 2) & (np.abs(KL) >= 0.0000000001),
+ (light_limitation_option == 3) & (np.abs(KL) < 0.0000000001),
+ (light_limitation_option == 3) & (np.abs(KL) >= 0.0000000001),
],
choicelist = [
@@ -492,10 +492,10 @@ def FN(
FN_orig: np.ndarray = np.select(
condlist= [
- use_NH4 == True and use_NO3 == True,
- use_NH4 == False and use_NO3 == True,
- use_NH4 == True and use_NO3 == False,
- use_NH4 == False and use_NO3 == False,
+ (use_NH4 == True) & (use_NO3 == True),
+ (use_NH4 == False) & (use_NO3 == True),
+ (use_NH4 == True) & (use_NO3 == False),
+ (use_NH4 == False) & (use_NO3 == False),
],
choicelist= [
@@ -582,8 +582,8 @@ def mu(
condlist = [
growth_rate_option == 1,
growth_rate_option == 2,
- growth_rate_option == 3 and (FN == 0.0 or FP == 0.0),
- growth_rate_option == 3 and FN != 0 and FP != 0
+ (growth_rate_option == 3) & ((FN == 0.0) | (FP == 0.0)),
+ (growth_rate_option == 3) & (FN != 0) & (FP != 0)
],
choicelist = [
diff --git a/tests/test_6_nsm_module.py b/tests/test_6_nsm_module.py
index e5afaf0..c3af4c7 100644
--- a/tests/test_6_nsm_module.py
+++ b/tests/test_6_nsm_module.py
@@ -112,7 +112,6 @@ def test_nsm1_variable_sorting(nutrient_budget_instance) -> None:
def test_nsm1_timestep(nutrient_budget_instance) -> None:
"""Checks that we can auto-sort our NSM1 variable"""
nutrient_budget_instance.increment_timestep()
-
assert len(nutrient_budget_instance.dataset.nsm1_time_step) == 2
assert nutrient_budget_instance.dataset.sel(nsm1_time_step=1).isnull().any() == False
From 33a748fbd5987bbd92ca27614b229e459bdd0e47 Mon Sep 17 00:00:00 2001
From: Isaac Mudge <66634423+imscw95@users.noreply.github.com>
Date: Fri, 29 Mar 2024 09:19:03 -0500
Subject: [PATCH 19/20] Corrected all processes.py syntax and functions to work
with test_6
---
src/clearwater_modules/nsm1/processes.py | 73 +++++++++++++++---------
tests/test_6_nsm_module.py | 4 +-
2 files changed, 47 insertions(+), 30 deletions(-)
diff --git a/src/clearwater_modules/nsm1/processes.py b/src/clearwater_modules/nsm1/processes.py
index e27f167..3837b07 100644
--- a/src/clearwater_modules/nsm1/processes.py
+++ b/src/clearwater_modules/nsm1/processes.py
@@ -511,7 +511,7 @@ def FN(
FN: np.ndarray = np.select(
condlist= [
- math.isnan(FN_orig),
+ np.isnan(FN_orig),
FN_orig > 1.0
],
@@ -545,7 +545,7 @@ def FP(
FP: np.ndarray = np.select(
condlist= [
- math.isnan(FP_orig),
+ np.isnan(FP_orig),
FP_orig > 1.0
],
@@ -581,14 +581,16 @@ def mu(
mu: np.ndarray = np.select(
condlist = [
growth_rate_option == 1,
- growth_rate_option == 2,
+ (growth_rate_option == 2) & (FP > FN),
+ (growth_rate_option == 2) & (FN > FP),
(growth_rate_option == 3) & ((FN == 0.0) | (FP == 0.0)),
(growth_rate_option == 3) & (FN != 0) & (FP != 0)
],
choicelist = [
mu_max_tc * FL * FP * FN,
- mu_max_tc * FL * min(FP, FN),
+ mu_max_tc * FL * FN,
+ mu_max_tc * FL * FP,
0,
mu_max_tc * FL * 2.0 / (1.0 / FN + 1.0 / FP)
],
@@ -814,15 +816,15 @@ def FLb(
# Note that KENT is defined differently here than it was for the algal equations.
# The equations are different, this expression is more convenient here.
- KEXT = math.exp(-L*depth)
+ KEXT = np.exp(-L*depth)
FLb_orig: np.ndarray = np.select(
condlist = [
- Ab <= 0.0 or KEXT <= 0.0 or PAR <= 0.0,
+ (Ab <= 0.0) | (KEXT <= 0.0) | (PAR <= 0.0),
b_light_limitation_option == 1,
b_light_limitation_option == 2,
- b_light_limitation_option == 3 and abs(KLb) < 1.0E-10,
- b_light_limitation_option == 3 and abs(KLb) >= 1.0E-10
+ (b_light_limitation_option == 3) & (abs(KLb) < 1.0E-10),
+ (b_light_limitation_option == 3) & (abs(KLb) >= 1.0E-10)
],
choicelist = [
@@ -830,7 +832,7 @@ def FLb(
PAR * KEXT / (KLb + PAR * KEXT),
PAR * KEXT / ((KLb**2.0 + (PAR * KEXT)**2.0)**0.5),
0.0,
- PAR * KEXT / KLb * math.exp(1.0 - PAR * KEXT / KLb)
+ PAR * KEXT / KLb * np.exp(1.0 - PAR * KEXT / KLb)
],
default = np.nan
@@ -875,10 +877,10 @@ def FNb(
FNb_orig: np.ndarray = np.select(
condlist= [
- use_NH4 == True and use_NO3 == True,
- use_NH4 == True and use_NO3 == False,
- use_NH4 == False and use_NO3 == True,
- use_NH4 == False and use_NO3 == False,
+ (use_NH4 == True) & (use_NO3 == True),
+ (use_NH4 == True) & (use_NO3 == False),
+ (use_NH4 == False) & (use_NO3 == True),
+ (use_NH4 == False) & (use_NO3 == False),
],
choicelist= [
@@ -893,7 +895,7 @@ def FNb(
FNb: np.ndarray = np.select(
condlist= [
- math.isnan(FNb_orig),
+ np.isnan(FNb_orig),
FNb_orig > 1.0
],
@@ -927,7 +929,7 @@ def FPb(
FPb: np.ndarray = np.select(
condlist= [
- math.isnan(FPb_orig),
+ np.isnan(FPb_orig),
FPb_orig > 1.0
],
@@ -959,7 +961,7 @@ def FSb(
FSb: np.ndarray = np.select(
condlist= [
- math.isnan(FSb_orig),
+ np.isnan(FSb_orig),
FSb_orig > 1.0
],
@@ -994,9 +996,24 @@ def mub(
"""
# Benthic Local Specific Growth Rate
- return xr.where(b_growth_rate_option == 1, mub_max_tc * FLb * FPb * FNb * FSb, mub_max_tc * FLb * FSb * min(FPb, FNb))
-
-
+
+ mub: np.ndarray = np.select(
+ condlist= [
+ b_growth_rate_option == 1,
+ (b_growth_rate_option != 1) & (FPb > FNb),
+ (b_growth_rate_option != 1) & (FNb > FPb)
+ ],
+
+ choicelist= [
+ mub_max_tc * FLb * FPb * FNb * FSb,
+ mub_max_tc * FLb * FSb * FNb,
+ mub_max_tc * FLb * FSb * FPb
+ ],
+
+ default = 0
+ )
+
+ return mub
def AbGrowth(
@@ -1209,7 +1226,7 @@ def ApUptakeFr_NH4(
)
# Check for case when NH4 and NO3 are very small. If so, force uptake_fractions appropriately.
- ApUptakeFr_NH4 = xr.where(math.isnan(ApUptakeFr_NH4),PN,ApUptakeFr_NH4)
+ ApUptakeFr_NH4 = xr.where(np.isnan(ApUptakeFr_NH4),PN,ApUptakeFr_NH4)
return ApUptakeFr_NH4
@@ -1248,10 +1265,10 @@ def AbUptakeFr_NH4(
"""
AbUptakeFr_NH4: np.ndarray = np.select(
condlist = [
- use_NH4 and not use_NO3,
- not use_NH4 and use_NO3,
- not use_NH4 and not use_NO3,
- use_Balgae and use_NH4 and use_NO3
+ (use_NH4) & (~use_NO3),
+ (~use_NH4) & (use_NO3),
+ (~use_NH4) & (~use_NO3),
+ (use_Balgae) & (use_NH4) & (use_NO3)
],
choicelist = [
@@ -1264,7 +1281,7 @@ def AbUptakeFr_NH4(
default = np.nan
)
- AbUptakeFr_NH4 = xr.where(math.isnan(AbUptakeFr_NH4),PNb,AbUptakeFr_NH4)
+ AbUptakeFr_NH4 = xr.where(np.isnan(AbUptakeFr_NH4),PNb,AbUptakeFr_NH4)
return AbUptakeFr_NH4
@@ -1585,7 +1602,7 @@ def NO3_Denit(
NO3_Denit: np.ndarray = np.select(
condlist = [
- use_DOX and math.isnan((1.0 - (DOX / (DOX + KsOxdn))) * kdnit_tc * NO3),
+ (use_DOX) & (np.isnan((1.0 - (DOX / (DOX + KsOxdn))) * kdnit_tc * NO3)),
use_DOX
],
@@ -3207,7 +3224,7 @@ def Alk_denitrification(
da: np.ndarray = np.select(
condlist = [
- use_NO3 and use_DOX,
+ (use_NO3) & (use_DOX),
use_NO3
],
@@ -3245,7 +3262,7 @@ def Alk_nitrification(
da: np.ndarray = np.select(
condlist = [
- use_NH4 and use_DOX,
+ (use_NH4) & (use_DOX),
use_NH4
],
diff --git a/tests/test_6_nsm_module.py b/tests/test_6_nsm_module.py
index c3af4c7..144816c 100644
--- a/tests/test_6_nsm_module.py
+++ b/tests/test_6_nsm_module.py
@@ -65,7 +65,7 @@ def nutrient_budget_instance(
return NutrientBudget(
time_steps=time_steps,
initial_state_values=initial_nsm1_state,
- updateable_static_variables=['a0'],
+ updateable_static_variables=['a10'],
time_dim='nsm1_time_step',
)
@@ -87,7 +87,7 @@ def test_nsm1_specific_attributes(nutrient_budget_instance) -> None:
assert isinstance(nutrient_budget_instance.global_parameters, dict)
assert isinstance(nutrient_budget_instance.global_vars, dict)
- assert nutrient_budget_instance.updateable_static_variables == ['a0']
+ assert nutrient_budget_instance.updateable_static_variables == ['a10']
assert nutrient_budget_instance.algae_parameters == DEFAULT_ALGAE
assert nutrient_budget_instance.alkalinity_parameters == DEFAULT_ALKALINITY
From 82a7ba9a0921a077ebab4d17636372126bbb4883 Mon Sep 17 00:00:00 2001
From: Sarah Jordan
Date: Tue, 23 Apr 2024 11:32:10 -0500
Subject: [PATCH 20/20] change updateable static variable
---
tests/test_6_nsm_module.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/test_6_nsm_module.py b/tests/test_6_nsm_module.py
index 144816c..93daf42 100644
--- a/tests/test_6_nsm_module.py
+++ b/tests/test_6_nsm_module.py
@@ -65,7 +65,7 @@ def nutrient_budget_instance(
return NutrientBudget(
time_steps=time_steps,
initial_state_values=initial_nsm1_state,
- updateable_static_variables=['a10'],
+ updateable_static_variables=['vson'],
time_dim='nsm1_time_step',
)
@@ -87,7 +87,7 @@ def test_nsm1_specific_attributes(nutrient_budget_instance) -> None:
assert isinstance(nutrient_budget_instance.global_parameters, dict)
assert isinstance(nutrient_budget_instance.global_vars, dict)
- assert nutrient_budget_instance.updateable_static_variables == ['a10']
+ assert nutrient_budget_instance.updateable_static_variables == ['vson']
assert nutrient_budget_instance.algae_parameters == DEFAULT_ALGAE
assert nutrient_budget_instance.alkalinity_parameters == DEFAULT_ALKALINITY