Skip to content

Commit

Permalink
Built site for gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
felixcremer committed Aug 29, 2024
1 parent f1b0f0d commit 3ce7244
Show file tree
Hide file tree
Showing 6 changed files with 559 additions and 383 deletions.
2 changes: 1 addition & 1 deletion .nojekyll
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9de8ff0f
1296afe7
113 changes: 112 additions & 1 deletion exercise_timeseries.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,71 @@
margin: 0 0.8em 0.2em -1em; /* quarto-specific, see https://github.com/quarto-dev/quarto-cli/issues/4556 */
vertical-align: middle;
}
/* CSS for syntax highlighting */
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
pre.numberSource code > span
{ position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode
{ color: #003b4f; background-color: #f1f3f5; }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span { color: #003b4f; } /* Normal */
code span.al { color: #ad0000; } /* Alert */
code span.an { color: #5e5e5e; } /* Annotation */
code span.at { color: #657422; } /* Attribute */
code span.bn { color: #ad0000; } /* BaseN */
code span.bu { } /* BuiltIn */
code span.cf { color: #003b4f; font-weight: bold; } /* ControlFlow */
code span.ch { color: #20794d; } /* Char */
code span.cn { color: #8f5902; } /* Constant */
code span.co { color: #5e5e5e; } /* Comment */
code span.cv { color: #5e5e5e; font-style: italic; } /* CommentVar */
code span.do { color: #5e5e5e; font-style: italic; } /* Documentation */
code span.dt { color: #ad0000; } /* DataType */
code span.dv { color: #ad0000; } /* DecVal */
code span.er { color: #ad0000; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #ad0000; } /* Float */
code span.fu { color: #4758ab; } /* Function */
code span.im { color: #00769e; } /* Import */
code span.in { color: #5e5e5e; } /* Information */
code span.kw { color: #003b4f; font-weight: bold; } /* Keyword */
code span.op { color: #5e5e5e; } /* Operator */
code span.ot { color: #003b4f; } /* Other */
code span.pp { color: #ad0000; } /* Preprocessor */
code span.sc { color: #5e5e5e; } /* SpecialChar */
code span.ss { color: #20794d; } /* SpecialString */
code span.st { color: #20794d; } /* String */
code span.va { color: #111111; } /* Variable */
code span.vs { color: #20794d; } /* VerbatimString */
code span.wa { color: #5e5e5e; font-style: italic; } /* Warning */
</style>
<link rel="stylesheet" href="site_libs/revealjs/dist/theme/quarto.css">
<link href="site_libs/revealjs/plugin/quarto-line-highlight/line-highlight.css" rel="stylesheet">
Expand Down Expand Up @@ -351,6 +416,7 @@ <h1>Dataset</h1>

</section>

<section>
<section id="possible-time-series-analyses" class="title-slide slide level1 center">
<h1>Possible time series analyses</h1>
<ul>
Expand All @@ -362,10 +428,55 @@ <h1>Possible time series analyses</h1>
<li>RQA</li>
<li>Histogram per decade</li>
</ul>
<div class="sourceCode" id="cb1"><pre class="sourceCode numberSource julia number-lines code-with-copy"><code class="sourceCode julia"><span id="cb1-1"><a></a><span class="co"># Data loading</span></span>
<span id="cb1-2"><a></a><span class="im">using</span> <span class="bu">DataFrames</span></span>
<span id="cb1-3"><a></a><span class="im">using</span> <span class="bu">CSV</span></span>
<span id="cb1-4"><a></a>jena <span class="op">=</span> CSV.<span class="fu">read</span>(<span class="st">"examples/data/jena.csv"</span>, DataFrame)</span>
<span id="cb1-5"><a></a>t2mmints <span class="op">=</span> jena[!, <span class="op">:</span>Variable_t2mmin]</span>
<span id="cb1-6"><a></a>datets <span class="op">=</span> jena[!, <span class="op">:</span>]</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</section>

<section id="mean-seasonal-cycle" class="slide level2">
<h2>Mean seasonal cycle</h2>
<div class="sourceCode" id="cb2"><pre class="sourceCode numberSource julia number-lines code-with-copy"><code class="sourceCode julia"><span id="cb2-1"><a></a><span class="kw">function</span> <span class="fu">yearhistsview</span>(ts, dates)</span>
<span id="cb2-2"><a></a> years <span class="op">=</span> <span class="fu">unique</span>(<span class="fu">year</span>.(jena.Ti))</span>
<span id="cb2-3"><a></a> yearbins <span class="op">=</span> []</span>
<span id="cb2-4"><a></a> <span class="cf">for</span> y <span class="kw">in</span> years </span>
<span id="cb2-5"><a></a> ybegin <span class="op">=</span> <span class="fu">findfirst</span>(<span class="fu">x-&gt;year</span>(x)<span class="op">==</span>y, dates)</span>
<span id="cb2-6"><a></a> ylast <span class="op">=</span> <span class="fu">findlast</span>(x<span class="op">-&gt;</span> <span class="fu">year</span>(x)<span class="op">==</span>y, dates)</span>
<span id="cb2-7"><a></a> ydata <span class="op">=</span> <span class="fu">view</span>(ts,ybegin<span class="op">:</span>ylast)</span>
<span id="cb2-8"><a></a> <span class="fu">push!</span>(yearbins, ydata)</span>
<span id="cb2-9"><a></a> <span class="cf">end</span></span>
<span id="cb2-10"><a></a><span class="kw">end</span></span>
<span id="cb2-11"><a></a></span>
<span id="cb2-12"><a></a>yearbins <span class="op">=</span> <span class="fu">yearhist</span>(jena.Variable_t2m, jena.Ti)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="sourceCode" id="cb3"><pre class="sourceCode numberSource julia number-lines code-with-copy"><code class="sourceCode julia"><span id="cb3-1"><a></a>dts_clim <span class="op">=</span> <span class="fu">DateTime</span>(<span class="fl">2020</span>, <span class="fl">1</span>, <span class="fl">1</span>, <span class="fl">0</span>)<span class="op">:</span><span class="fu">Day</span>(<span class="fl">1</span>)<span class="op">:</span><span class="fu">DateTime</span>(<span class="fl">2020</span>, <span class="fl">12</span>, <span class="fl">31</span>, <span class="fl">23</span>)</span>
<span id="cb3-2"><a></a></span>
<span id="cb3-3"><a></a>t2m_clim <span class="op">=</span> <span class="fu">zeros</span>(<span class="fu">length</span>(dts_clim))</span>
<span id="cb3-4"><a></a></span>
<span id="cb3-5"><a></a><span class="pp">@time</span> <span class="cf">begin</span></span>
<span id="cb3-6"><a></a></span>
<span id="cb3-7"><a></a><span class="cf">for</span> (i, dt) <span class="kw">in</span> <span class="fu">enumerate</span>(dts_clim)</span>
<span id="cb3-8"><a></a></span>
<span id="cb3-9"><a></a> t2m_clim[i] <span class="op">=</span> <span class="fu">mean</span>(<span class="fu">view</span>(t2m_jena, <span class="fu">dayofyear</span>(dt) <span class="op">.==</span> <span class="fu">dayofyear</span>.(dts_jena)))</span>
<span id="cb3-10"><a></a></span>
<span id="cb3-11"><a></a><span class="cf">end</span></span>
<span id="cb3-12"><a></a></span>
<span id="cb3-13"><a></a><span class="cf">end</span></span>
<span id="cb3-14"><a></a></span>
<span id="cb3-15"><a></a><span class="pp">@time</span> <span class="cf">begin</span></span>
<span id="cb3-16"><a></a></span>
<span id="cb3-17"><a></a><span class="cf">for</span> (i, dt) <span class="kw">in</span> <span class="fu">enumerate</span>(dts_clim)</span>
<span id="cb3-18"><a></a></span>
<span id="cb3-19"><a></a> t2m_clim[i] <span class="op">=</span> <span class="fu">mean</span>(<span class="fu">view</span>(t2m_jena, <span class="fu">dayofyear</span>(dt) <span class="op">.==</span> <span class="fu">dayofyear</span>.(dts_jena)))</span>
<span id="cb3-20"><a></a></span>
<span id="cb3-21"><a></a><span class="cf">end</span></span>
<span id="cb3-22"><a></a></span>
<span id="cb3-23"><a></a><span class="cf">end</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</section></section>
<section id="plotting" class="title-slide slide level1 center">
<h1>Plotting</h1>
<div class="sourceCode" id="cb4"><pre class="sourceCode numberSource julia number-lines code-with-copy"><code class="sourceCode julia"><span id="cb4-1"><a></a><span class="im">using</span> <span class="bu">GLMakie</span></span>
<span id="cb4-2"><a></a><span class="fu">plot</span>(jena.Ti, t2mmints)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>

<div class="quarto-auto-generated-content">
<p><img src="images/logo2_mpi_nfdi4earth.png" class="slide-logo"></p>
Expand Down
16 changes: 4 additions & 12 deletions exercise_yaxarrays.html
Original file line number Diff line number Diff line change
Expand Up @@ -425,18 +425,10 @@ <h2>Dataset download</h2>
<div id="2" class="cell" data-execution_count="0">
<div class="sourceCode cell-code" id="cb1"><pre class="sourceCode numberSource julia number-lines code-with-copy"><code class="sourceCode julia"><span id="cb1-1"><a></a><span class="im">using</span> <span class="bu">YAXArrays</span></span>
<span id="cb1-2"><a></a><span class="im">using</span> <span class="bu">Zarr</span></span>
<span id="cb1-3"><a></a><span class="im">using</span> <span class="bu">DiskArrays</span></span>
<span id="cb1-4"><a></a><span class="im">using</span> <span class="bu">DimensionalData</span></span>
<span id="cb1-5"><a></a>era5url <span class="op">=</span> <span class="st">"https://s3.bgc-jena.mpg.de:9000/deepextremes/v3/ERA5Cube.zarr"</span></span>
<span id="cb1-6"><a></a>era5 <span class="op">=</span> <span class="fu">Cube</span>(era5url)</span>
<span id="cb1-7"><a></a>timedim <span class="op">=</span> <span class="fu">dimnum</span>(era5, Ti)</span>
<span id="cb1-8"><a></a>chunkinds <span class="op">=</span><span class="fu">ones</span>(<span class="dt">Int64</span>, <span class="fu">length</span>(<span class="fu">size</span>(era5)))</span>
<span id="cb1-9"><a></a>chunks <span class="op">=</span> <span class="fu">eachchunk</span>(era5)</span>
<span id="cb1-10"><a></a>chunkinds[timedim] <span class="op">=</span> <span class="fu">size</span>(chunks, timedim)<span class="op">-</span><span class="fl">1</span></span>
<span id="cb1-11"><a></a>lastchunk <span class="op">=</span> chunks[chunkinds<span class="op">...</span>]</span>
<span id="cb1-12"><a></a>timestart <span class="op">=</span> <span class="fu">first</span>(<span class="fu">dims</span>(era5,Ti)[lastchunk[timedim]])</span>
<span id="cb1-13"><a></a>timeend <span class="op">=</span> <span class="fu">last</span>(<span class="fu">dims</span>(era5,Ti))</span>
<span id="cb1-14"><a></a>sub <span class="op">=</span> era5[Ti<span class="op">=</span>timestart<span class="op">..</span>timeend, longitude<span class="op">=</span><span class="fl">0</span><span class="op">..</span><span class="fl">14.76</span>,latitude<span class="op">=</span><span class="fl">30.1</span><span class="op">..</span><span class="fl">60</span>]</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb1-3"><a></a>era5url <span class="op">=</span> <span class="st">"https://s3.bgc-jena.mpg.de:9000/deepextremes/v3/ERA5Cube.zarr"</span></span>
<span id="cb1-4"><a></a>ds <span class="op">=</span> <span class="fu">open_dataset</span>(era5url)</span>
<span id="cb1-5"><a></a>sub <span class="op">=</span> ds[Ti<span class="op">=</span><span class="fu">DateTime</span>(<span class="fl">1998</span>,<span class="fl">1</span>,<span class="fl">1</span>)<span class="op">..</span><span class="fu">DateTime</span>(<span class="fl">2022</span>,<span class="fl">12</span>,<span class="fl">31</span>), longitude<span class="op">=</span><span class="fl">0</span><span class="op">..</span><span class="fl">14.76</span>,latitude<span class="op">=</span><span class="fl">30.1</span><span class="op">..</span><span class="fl">60</span>]</span>
<span id="cb1-6"><a></a><span class="fu">savedataset</span>(sub,path<span class="op">=</span><span class="st">"./era5.zarr"</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>

<div class="quarto-auto-generated-content">
Expand Down
Loading

0 comments on commit 3ce7244

Please sign in to comment.