-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Narrative Text and Cleaning Repo (#23)
* Add Alex's Videos to edited.ipynb * Add Melt Rate section to edited.ipynb * Icing and Cleaning * Cleaning * More Cleaning, rm ipynb checkpoints * rename edited.ipynb -> SnowFlow.ipynb * rm OpenTopography API Key file * Add Dingman citation from Carlos
- Loading branch information
Showing
126 changed files
with
2,775 additions
and
3,430 deletions.
There are no files selected for viewing
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,269 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"id": "ecc44fa4-6561-49ee-83c2-738b02743ca9", | ||
"metadata": {}, | ||
"source": [ | ||
"## Section #1: Generating Melt Rate" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "f43efbd7-3868-4082-895d-6e887d85a55f", | ||
"metadata": {}, | ||
"source": [ | ||
"#### Goal: Calculate melt rate in mm/hr to use in the Overland Flow Model. \n", | ||
"In this section of the SnowFlow notebook, we we determine the melt rate of a hypothetical snow layer atop the Heil Ranch area which makes up the Geer Canyon watershed near Boulder Colorado, USA.\n", | ||
"\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "354142e0-cfdb-4cae-bad0-6ffe8a7fbce1", | ||
"metadata": {}, | ||
"source": [ | ||
"First, double check in the upper right-hand corner of the notebook to ensure that your kernel is either \"CSDMS\" or \"Ivy\".\n", | ||
"We will also need to import the numpy library to complete this notebook." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"id": "b6863af5", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import numpy as np" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "98cce2b4-095b-4af4-963c-49bde3719aae", | ||
"metadata": {}, | ||
"source": [ | ||
"We will start by defining three scenarios for melting. Generally, the degree-day-factor ($DDF$) for snow melt is about $3-5$ $\\frac {millimeters} {Day*Kelvin}$. \n", | ||
"\n", | ||
"$$ MeltRate = DDF * Temperature $$\n", | ||
"\n", | ||
"We will use 3 temperatures to generate three scenarios for $DDF$ : 0.5, 4, and 10 $^\\circ$$C$.\n", | ||
"\n", | ||
"We will start by creating a column vector with computed $DDF$ as values (dimensions of this vector will be 3-by-1)." | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "9ce0b898-6615-428e-b60c-de0ea7581811", | ||
"metadata": {}, | ||
"source": [ | ||
"First, start by creating a numpy array called Temperature with the temperature values of 0.5, 4, and 10 $^\\circ$$C$. Then, convert the vector into Kelvin." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "438e83f6-e062-4b42-ac4f-cee69e152af0", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "9ab9be93-9b8d-4ba2-8617-53e00e9fc8e0", | ||
"metadata": {}, | ||
"source": [ | ||
"<details>\n", | ||
" <summary>👉 <b>Click to see solution</b></summary>\n", | ||
"\n", | ||
"```python\n", | ||
"Temperature = np.array([0.5,4,10]) #Celsius\n", | ||
"Temperature = Temperature + 273 #Kelvin\n", | ||
"```\n", | ||
"</details>" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "ad060ed1-848b-4cdf-a2d3-0d230a055b14", | ||
"metadata": {}, | ||
"source": [ | ||
"Now, we need to define our $DDF$ variable, and convert it to units of $^\\circ$$C$. For this notebook, we will use $DDF = 4$ \n", | ||
"\n", | ||
"Keep in mind, the units of $DDF$ are $\\frac {millimeters} {Day*Kelvin}$, so you also need to convert the value to units of $\\frac {millimeters} {Hours*Kelvin}$." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "7f371272-4920-49b0-8e9d-0b04a4b1505a", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "35a25607-027a-4f05-8afb-c4332c617b5e", | ||
"metadata": {}, | ||
"source": [ | ||
"<details>\n", | ||
" <summary>👉 <b>Click to see solution</b></summary>\n", | ||
"\n", | ||
"```python\n", | ||
"DDF = 4 #daily\n", | ||
"DDF = DDF/24 #hourly\n", | ||
"```\n", | ||
"</details>" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "ad3f1b44-d958-4570-93c3-82d26674c076", | ||
"metadata": {}, | ||
"source": [ | ||
"\n", | ||
"Next, we will calculate the $MeltRate$ for each of the three scenarios and place their values in an array called Melt. \n", | ||
"\n", | ||
"The equation is as follow: $MeltRate = DDF * Temperature$." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "82155be9-33b7-4a86-b4d1-7a648faef3a9", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "dddfa559-13f5-4e0a-88a3-3ec3257325a2", | ||
"metadata": {}, | ||
"source": [ | ||
"<details>\n", | ||
" <summary>👉 <b>Click to see solution</b></summary>\n", | ||
"\n", | ||
"```python\n", | ||
"Melt = DDF * Temperature\n", | ||
"```\n", | ||
"</details>\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "f70636b2-e02c-4afd-9287-26b76bb4d22b", | ||
"metadata": {}, | ||
"source": [ | ||
"Now, we will round the numbers in the Melt array to three decimal points. Print the array." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "cd6a38b3-7230-404c-91c1-eed405477f21", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "903b2021-3cc8-4119-992e-6c024d935dca", | ||
"metadata": {}, | ||
"source": [ | ||
"<details>\n", | ||
" <summary>👉 <b>Click to see solution</b></summary>\n", | ||
"\n", | ||
"```python\n", | ||
"np.round(Melt, 3)\n", | ||
"```\n", | ||
"</details>" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "0c9a1350-ab09-4c78-a068-89cb31ebe641", | ||
"metadata": {}, | ||
"source": [ | ||
"At this point, we have computed melt rates for our three scenaiors via several seperate lines of code. However, this can also be done with a function called $Melt$.\n", | ||
"First, you will need to define the function $Melt$ to take an input temperature in units of $^\\circ$$C$. The same lines of code used above can be used below for our function. However, you can condense the lines of code to be more pythonic." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "d4dd9910-dbf4-400b-9b3c-fd752af4f6a9", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "2eeda5c5-5e0d-46d2-9ad6-0b071eed6bf7", | ||
"metadata": {}, | ||
"source": [ | ||
"<details>\n", | ||
" <summary>👉 <b>Click to see solution</b></summary>\n", | ||
"\n", | ||
"```python\n", | ||
"def Melt(Temperature):\n", | ||
" Temperature = Temperature + 273 # Conversion to Kelvin\n", | ||
" DDF = 4/24 #Conversion to hourly rate\n", | ||
" Melt = DDF * Temperature\n", | ||
" np.round(Melt, 3)\n", | ||
" return(Melt)\n", | ||
"```\n", | ||
"</details>" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "32105cd4-d551-4691-9de7-ce2110c61cf9", | ||
"metadata": {}, | ||
"source": [ | ||
"Now try running the $Melt$ function with a temperature of $0.5$ $^\\circ$$C$. The function should return the a value equal to the first value in the Melt array." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "92b3fa04-fac5-4d6b-89cd-3df465268240", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "83c54dbb-0474-4806-98bb-ea99d7e80749", | ||
"metadata": {}, | ||
"source": [ | ||
"<details>\n", | ||
" <summary>👉 <b>Click to see solution</b></summary>\n", | ||
"\n", | ||
"```python\n", | ||
"Melt(0.5)\n", | ||
"```\n", | ||
"</details>" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "CSDMS", | ||
"language": "python", | ||
"name": "csdms-2023" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.9.16" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
File renamed without changes.
2,738 changes: 2,346 additions & 392 deletions
2,738
overlandflow_usecase/overland_flow.ipynb → additional_notebooks/alex_overland.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
overlandflow_usecase/.ipynb_checkpoints/README-checkpoint.md
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.