Skip to content

Commit

Permalink
build based on b440cc3
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Apr 26, 2024
1 parent c690d04 commit b6799b2
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion dev/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-04-26T08:32:23","documenter_version":"1.2.1"}}
{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-04-26T08:52:01","documenter_version":"1.2.1"}}
6 changes: 3 additions & 3 deletions dev/APIref/index.html

Large diffs are not rendered by default.

Binary file added dev/examples/glacialcycle/8d836ef6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dev/examples/glacialcycle/9a2c1e8d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dev/examples/glacialcycle/f8742ddf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 7 additions & 8 deletions dev/examples/glacialcycle/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,22 @@
Colorbar(fig[1, 2], hm, height = Relative(0.6))
return fig
end
niceheatmap(Tlitho)</code></pre><img src="18ff2ee0.png" alt="Example block output"/><p>In a similar way, we can load the log-viscosity field from (<a href="../../references/#pan-influence-2022">Pan <em>et al.</em>, 2022</a>) and plot it at about 300 km depth</p><pre><code class="language- hljs">(_, _, _), _, logeta_itp = load_logvisc_pan2022()
niceheatmap(Tlitho)</code></pre><img src="18ff2ee0.png" alt="Example block output"/><p>In a similar way, we can load the log-viscosity field from (<a href="../../references/#pan-influence-2022">Pan <em>et al.</em>, 2022</a>) and plot it at about 300 km depth</p><pre><code class="language-julia hljs">(_, _, _), _, logeta_itp = load_logvisc_pan2022()
logeta300 = logeta_itp.(Lon, Lat, c.r_equator - 300e3)
niceheatmap(logeta300)</code></pre><p>The number of layers and the depth of viscous half-space are arbitrary parameters that have to be defined by the user. We here use a relatively shallow model (half-space begins at 300 km depth) with 1 equalisation layer and 3 intermediate layers:</p><pre><code class="language- hljs">mindepth = maximum(Tlitho) + 1e3
niceheatmap(logeta300)</code></pre><img src="9a2c1e8d.png" alt="Example block output"/><p>The number of layers and the depth of viscous half-space are arbitrary parameters that have to be defined by the user. We here use a relatively shallow model (half-space begins at 300 km depth) with 1 equalisation layer and 3 intermediate layers:</p><pre><code class="language-julia hljs">mindepth = maximum(Tlitho) + 1e3
lb_vec = range(mindepth, stop = 300e3, length = 3)
lb = cat(Tlitho, [fill(lbval, Omega.Nx, Omega.Ny) for lbval in lb_vec]..., dims=3)

rlb = c.r_equator .- lb
nlb = size(rlb, 3)
lv_3D = 10 .^ cat([logeta_itp.(Lon, Lat, rlb[:, :, k]) for k in 1:nlb]..., dims=3);
nothing #hide</code></pre><p>To prevent extreme values of the viscosity, we require it to be larger than a minimal value, fixed to be $ 10^{16} \, \mathrm{Pa \, s} $. We subsequently generate a <a href="../../APIref/#FastIsostasy.LayeredEarth"><code>LayeredEarth</code></a> that embeds all the information that has been loaded so far:</p><pre><code class="language- hljs">eta_lowerbound = 1e16
lv_3D = 10 .^ cat([logeta_itp.(Lon, Lat, rlb[:, :, k]) for k in 1:nlb]..., dims=3);</code></pre><p>To prevent extreme values of the viscosity, we require it to be larger than a minimal value, fixed to be $ 10^{16} \, \mathrm{Pa \, s} $. We subsequently generate a <a href="../../APIref/#FastIsostasy.LayeredEarth"><code>LayeredEarth</code></a> that embeds all the information that has been loaded so far:</p><pre><code class="language-julia hljs">eta_lowerbound = 1e16
lv_3D[lv_3D .&lt; eta_lowerbound] .= eta_lowerbound
p = LayeredEarth(Omega, layer_boundaries = lb, layer_viscosities = lv_3D)
niceheatmap(p.effective_viscosity)</code></pre><p>We now load the ice thickness history from ICE6G<em>D, again helped by the convenience of [`load</em>dataset`](@ref). We then create a vector of anomaly snapshots, between which FastIsostasy automatically interpolates linearly. To get an idea of ICE6G_D, the ice thickness anomaly is then visualised at LGM:</p><pre><code class="language-julia hljs">(lon, lat, t), Hice, Hitp = load_ice6gd()
niceheatmap(p.effective_viscosity)</code></pre><img src="8d836ef6.png" alt="Example block output"/><p>We now load the ice thickness history from ICE6G<em>D, again helped by the convenience of [`load</em>dataset`](@ref). We then create a vector of anomaly snapshots, between which FastIsostasy automatically interpolates linearly. To get an idea of ICE6G_D, the ice thickness anomaly is then visualised at LGM:</p><pre><code class="language-julia hljs">(lon, lat, t), Hice, Hitp = load_ice6gd()
dHice = [Hitp.(Lon, Lat, tk) - Hitp.(Lon, Lat, minimum(t)) for tk in t]
niceheatmap(Hitp.(Lon, Lat, -26) - Hitp.(Lon, Lat, 0))</code></pre><img src="38186e7a.png" alt="Example block output"/><p>Finally, defining and solving the resulting <a href="../../APIref/#FastIsostasy.FastIsoProblem"><code>FastIsoProblem</code></a> is done by running:</p><pre><code class="language- hljs">tsec = years2seconds.(t .* 1e3)
niceheatmap(Hitp.(Lon, Lat, -26) - Hitp.(Lon, Lat, 0))</code></pre><img src="38186e7a.png" alt="Example block output"/><p>Finally, defining and solving the resulting <a href="../../APIref/#FastIsostasy.FastIsoProblem"><code>FastIsoProblem</code></a> is done by running:</p><pre><code class="language-julia hljs">tsec = years2seconds.(t .* 1e3)
fip = FastIsoProblem(Omega, c, p, tsec, tsec, dHice)
solve!(fip) # gives fip.out.computation_time = 53 s</code></pre><p>The computation time of this last step is less than a minute on a modern i7 (Intel i7-10750H CPU @ 2.60GHz). and for a resolution of 50 km resolution! We visualise three snapshots of displacements that roughly correspond to LGM, the end of the meltwater pulse 1A and the present-day:</p><pre><code class="language- hljs">tplot = [-26, -12, 0]
solve!(fip) # gives fip.out.computation_time = 53 s</code></pre><p>The computation time of this last step is less than a minute on a modern i7 (Intel i7-10750H CPU @ 2.60GHz). and for a resolution of 50 km resolution! We visualise three snapshots of displacements that roughly correspond to LGM, the end of the meltwater pulse 1A and the present-day:</p><pre><code class="language-julia hljs">tplot = [-26, -12, 0]
fig = Figure(size = (1800, 600))
opts = ( colormap = :PuOr, colorrange = (-400, 400) )
for k in eachindex(tplot)
Expand All @@ -44,4 +43,4 @@
println(kfi)
end
Colorbar(fig[1, 4], height = Relative(0.6); opts...)
fig</code></pre><p>The displayed fields are displacement anomalies w.r.t. to the last interglacial, defined as the reference for the ice thickness anomalies. In Swierczek-Jereczek et al., GMD, in rev., these computations are performed on a finer grid, with an interactive sea level, and show great agreement with a 3D GIA model that runs between 10,000-100,000 slower (however at with advantage of obtaining a global and richer output). You can find this more comprehensive example in the <code>/publication_v1.0</code> folder of the GitHub repository.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../tutorial/">« Tutorial</a><a class="docs-footer-nextpage" href="../inversion/">Parameter inversion »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 26 April 2024 08:32">Friday 26 April 2024</span>. Using Julia version 1.9.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
fig</code></pre><img src="f8742ddf.png" alt="Example block output"/><p>The displayed fields are displacement anomalies w.r.t. to the last interglacial, defined as the reference for the ice thickness anomalies. In Swierczek-Jereczek et al., GMD, in rev., these computations are performed on a finer grid, with an interactive sea level, and show great agreement with a 3D GIA model that runs between 10,000-100,000 slower (however at with advantage of obtaining a global and richer output). You can find this more comprehensive example in the <code>/publication_v1.0</code> folder of the GitHub repository.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../tutorial/">« Tutorial</a><a class="docs-footer-nextpage" href="../inversion/">Parameter inversion »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 26 April 2024 08:51">Friday 26 April 2024</span>. Using Julia version 1.9.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Binary file removed dev/examples/inversion/0be76569.png
Binary file not shown.
Binary file added dev/examples/inversion/2c48ce98.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion dev/examples/inversion/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@
return fig
end
fig1 = plot_viscfields(paraminv)</code></pre><img src="644f7b04.png" alt="Example block output"/><p>By performing a Kalman inversion, we can achieve a close match between ground truth and estimated viscosity field:</p><pre><code class="language-julia hljs">solve!(paraminv)
fig2 = plot_viscfields(paraminv)</code></pre><img src="0be76569.png" alt="Example block output"/><p>This remains an academic example, where we try to recover a known parameter field from data generated by the model itself. Nonetheless, the user should get a proof-of-concept and a scheme of how to implement such a procedure themself.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../glacialcycle/">« Glacial cycle</a><a class="docs-footer-nextpage" href="../../APIref/">API reference »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 26 April 2024 08:32">Friday 26 April 2024</span>. Using Julia version 1.9.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
fig2 = plot_viscfields(paraminv)</code></pre><img src="2c48ce98.png" alt="Example block output"/><p>This remains an academic example, where we try to recover a known parameter field from data generated by the model itself. Nonetheless, the user should get a proof-of-concept and a scheme of how to implement such a procedure themself.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../glacialcycle/">« Glacial cycle</a><a class="docs-footer-nextpage" href="../../APIref/">API reference »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 26 April 2024 08:51">Friday 26 April 2024</span>. Using Julia version 1.9.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
2 changes: 1 addition & 1 deletion dev/examples/tutorial/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@
opts = SolverOptions(deformation_model = :elra)
fip = FastIsoProblem(Omega, c, p, t_out, t_Hice, Hice, opts = opts)
solve!(fip)
fig = plot3D(fip, [lastindex(t_out) ÷ 2, lastindex(t_out)])</code></pre><img src="282fc552.png" alt="Example block output"/></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../../introGIA/">« Quick intro to GIA</a><a class="docs-footer-nextpage" href="../glacialcycle/">Glacial cycle »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 26 April 2024 08:32">Friday 26 April 2024</span>. Using Julia version 1.9.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
fig = plot3D(fip, [lastindex(t_out) ÷ 2, lastindex(t_out)])</code></pre><img src="282fc552.png" alt="Example block output"/></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../../introGIA/">« Quick intro to GIA</a><a class="docs-footer-nextpage" href="../glacialcycle/">Glacial cycle »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Friday 26 April 2024 08:52">Friday 26 April 2024</span>. Using Julia version 1.9.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit b6799b2

Please sign in to comment.