Skip to content

Commit

Permalink
Updated ASHRAE notebook and fixed an error in Insolation
Browse files Browse the repository at this point in the history
  • Loading branch information
vonw committed Apr 25, 2023
1 parent bf9f43a commit 3b31b7d
Show file tree
Hide file tree
Showing 28 changed files with 4,854 additions and 169 deletions.
Binary file modified _build/.doctrees/chapter4/ASHRAE_Irradiance.doctree
Binary file not shown.
Binary file modified _build/.doctrees/chapter4/Insolation.doctree
Binary file not shown.
Binary file modified _build/.doctrees/environment.pickle
Binary file not shown.
Binary file added _build/html/_images/ASHRAE_Irradiance_17_1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _build/html/_images/ASHRAE_Irradiance_18_1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _build/html/_images/ASHRAE_Irradiance_8_0.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _build/html/_images/Insolation_17_1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _build/html/_images/Insolation_19_1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 20 additions & 6 deletions _build/html/_sources/chapter10/ExponentialGrowth_Dessler.ipynb
Expand Up @@ -190,7 +190,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 4,
"id": "e97813c5-bfc8-4494-bb2f-4e6e9b2e0b13",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -259,7 +259,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 5,
"id": "5f15e675",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -287,7 +287,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 6,
"id": "6e21bc6a-5352-41fd-8cdf-0728a60691c7",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -331,7 +331,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 7,
"id": "36d976e7-db53-4def-8a71-6fa09431dad2",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -400,10 +400,18 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 8,
"id": "e93966c1-7468-4cb3-966a-d642cf8ad1f8",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The value of the money after 100 years AT A DISCOUNT RATE OF 3% is $52032839850.21\n"
]
}
],
"source": [
"rate = 3\n",
"F = 1e12\n",
Expand Down Expand Up @@ -474,6 +482,12 @@
"source": [
"### The choice of discount rate makes a huge difference in climate problems."
]
},
{
"cell_type": "markdown",
"id": "fc24e1d7",
"metadata": {},
"source": []
}
],
"metadata": {
Expand Down
256 changes: 230 additions & 26 deletions _build/html/_sources/chapter4/ASHRAE_Irradiance.ipynb

Large diffs are not rendered by default.

101 changes: 84 additions & 17 deletions _build/html/_sources/chapter4/Insolation.ipynb

Large diffs are not rendered by default.

2,057 changes: 2,039 additions & 18 deletions _build/html/chapter4/ASHRAE_Irradiance.html

Large diffs are not rendered by default.

48 changes: 37 additions & 11 deletions _build/html/chapter4/Insolation.html
Expand Up @@ -482,8 +482,8 @@ <h1 class="site-logo" id="site-title">Climate Change Science and Engineering</h1
</a>
</li>
<li class="toc-h2 nav-item toc-entry">
<a class="reference internal nav-link" href="#latitudinal-variation-of-toa-insolation-on-solstices-and-equinoxes">
Latitudinal variation of TOA insolation on solstices and equinoxes
<a class="reference internal nav-link" href="#daily-average-insolation-over-pullman-wa">
Daily Average Insolation over Pullman, WA
</a>
</li>
</ul>
Expand Down Expand Up @@ -527,8 +527,8 @@ <h2> Contents </h2>
</a>
</li>
<li class="toc-h2 nav-item toc-entry">
<a class="reference internal nav-link" href="#latitudinal-variation-of-toa-insolation-on-solstices-and-equinoxes">
Latitudinal variation of TOA insolation on solstices and equinoxes
<a class="reference internal nav-link" href="#daily-average-insolation-over-pullman-wa">
Daily Average Insolation over Pullman, WA
</a>
</li>
</ul>
Expand Down Expand Up @@ -565,8 +565,8 @@ <h3>Solar flux per unit area at TOA (Equations from Hartmann, <i>Global Physical
<p><span class="math notranslate nohighlight">\( d_m \)</span> is the mean distance from the Sun to the Earth, and is equal to the length of semi-major axis (a) of the elliptical orbit (which is 149.6 million km).</p>
<p>d is the distance between the Earth and Sun on any given day, where the closest approach (perihelion) occurs on 3 January.</p>
<div class="math notranslate nohighlight">
\[ d = \frac{a(1+\epsilon^2)}{1 + \epsilon cos(\theta)} \]</div>
<p>where <span class="math notranslate nohighlight">\( \epsilon \)</span> is the eccentricity of Earth’s orbit (0.017) and <span class="math notranslate nohighlight">\( \theta \)</span> is an angle that relates the day number to the correct location of Earth in the elliptical orbit for that day.</p>
\[ d = \frac{a(1-\epsilon^2)}{1 + \epsilon cos(\theta)} \]</div>
<p>where <span class="math notranslate nohighlight">\( \epsilon \)</span> is the eccentricity of Earth’s orbit (0.017), a is the semi major axis of Earth’s orbit, and <span class="math notranslate nohighlight">\( \theta \)</span> is an angle that relates the day number to the correct location of Earth in the elliptical orbit for that day.</p>
<p><span class="math notranslate nohighlight">\(Q_{dayavg} = (S_o/\pi)(d_m/d)^2[h_o\sin{\phi}\sin{\delta}+\cos{\phi}\cos{\delta}\sin{h_o}]\)</span>, where cos(<span class="math notranslate nohighlight">\(h_o) = -\tan{\phi}\tan{\delta}\)</span>.</p>
<div class="cell docutils container">
<div class="cell_input docutils container">
Expand Down Expand Up @@ -654,9 +654,6 @@ <h2>Geographic distribution of insolation (solar radition) at TOA<a class="heade
<img alt="../_images/Insolation_16_0.png" src="../_images/Insolation_16_0.png" />
</div>
</div>
</section>
<section id="latitudinal-variation-of-toa-insolation-on-solstices-and-equinoxes">
<h2>Latitudinal variation of TOA insolation on solstices and equinoxes<a class="headerlink" href="#latitudinal-variation-of-toa-insolation-on-solstices-and-equinoxes" title="Permalink to this headline">#</a></h2>
<div class="cell docutils container">
<div class="cell_input docutils container">
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">mar20</span> <span class="o">=</span> <span class="mi">31</span><span class="o">+</span><span class="mi">28</span><span class="o">+</span><span class="mi">20</span>
Expand All @@ -678,10 +675,39 @@ <h2>Latitudinal variation of TOA insolation on solstices and equinoxes<a class="
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;matplotlib.legend.Legend at 0x110492200&gt;
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;matplotlib.legend.Legend at 0x11d27a4a0&gt;
</pre></div>
</div>
<img alt="../_images/Insolation_17_1.png" src="../_images/Insolation_17_1.png" />
</div>
</div>
</section>
<section id="daily-average-insolation-over-pullman-wa">
<h2>Daily Average Insolation over Pullman, WA<a class="headerlink" href="#daily-average-insolation-over-pullman-wa" title="Permalink to this headline">#</a></h2>
<div class="cell docutils container">
<div class="cell_input docutils container">
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">days</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mf">1.</span><span class="p">,</span><span class="mf">366.</span><span class="p">)</span>
<span class="n">lat</span> <span class="o">=</span> <span class="mf">46.7298</span>
<span class="n">lon</span> <span class="o">=</span> <span class="o">-</span><span class="mf">117.1817</span>

<span class="n">Q</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([])</span>
<span class="k">for</span> <span class="n">day</span> <span class="ow">in</span> <span class="n">days</span><span class="p">:</span>
<span class="n">Q</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">Q</span><span class="p">,</span> <span class="n">Qday_avg</span><span class="p">(</span><span class="n">lat</span><span class="p">,</span><span class="n">day</span><span class="p">))</span>

<span class="n">plt</span><span class="o">.</span><span class="n">figure</span><span class="p">(</span><span class="n">figsize</span><span class="o">=</span><span class="p">(</span><span class="mi">12</span><span class="p">,</span><span class="mi">6</span><span class="p">))</span>
<span class="n">plt</span><span class="o">.</span><span class="n">plot</span><span class="p">(</span><span class="n">days</span><span class="p">,</span> <span class="n">Q</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">grid</span><span class="p">()</span>
<span class="n">plt</span><span class="o">.</span><span class="n">xlabel</span><span class="p">(</span><span class="s1">&#39;Day of Year&#39;</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">ylabel</span><span class="p">(</span><span class="s1">&#39;Daily-Average Insolation (W m-2)&#39;</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">title</span><span class="p">(</span><span class="s1">&#39;TOA Insolation over Pullman, WA&#39;</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Text(0.5, 1.0, &#39;TOA Insolation over Pullman, WA&#39;)
</pre></div>
</div>
<img alt="../_images/Insolation_18_1.png" src="../_images/Insolation_18_1.png" />
<img alt="../_images/Insolation_19_1.png" src="../_images/Insolation_19_1.png" />
</div>
</div>
</section>
Expand Down
Binary file modified _build/html/objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion _build/html/searchindex.js

Large diffs are not rendered by default.

Expand Up @@ -482,6 +482,12 @@
"source": [
"### The choice of discount rate makes a huge difference in climate problems."
]
},
{
"cell_type": "markdown",
"id": "fc24e1d7",
"metadata": {},
"source": []
}
],
"metadata": {
Expand Down
2 changes: 2 additions & 0 deletions _build/jupyter_execute/chapter10/ExponentialGrowth_Dessler.py
Expand Up @@ -192,3 +192,5 @@
# BUT economists argue about which rate to use: 1% to 4%.

# ### The choice of discount rate makes a huge difference in climate problems.

#

0 comments on commit 3b31b7d

Please sign in to comment.