Skip to content

Commit

Permalink
deploy: bf825bd
Browse files Browse the repository at this point in the history
  • Loading branch information
vers-w committed Dec 4, 2024
1 parent 6ff8360 commit 500e7fb
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 18 deletions.
3 changes: 3 additions & 0 deletions previews/PR513/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ <h3 class="anchored" data-anchor-id="fixed">Fixed</h3>
<li>Initialization of <code>LateralSSF</code> variables <code>ssf</code> and <code>ssfmax</code> with vertical hydraulic conductivity profile <code>exponential_constant</code>. Removed parameter <code>khfrac</code> from the computation, as it is already part of parameter <code>kh_0</code>.</li>
<li>Mutating BMI model control functions (<code>update</code>, <code>update_until</code> and <code>finalize</code>) and extended mutating BMI functions (<code>load_state</code> and <code>save_state</code>) should return <code>nothing</code>.</li>
<li>Added downloading of testdata to Dockerfile, to ensure an image was able to build.</li>
<li>The reservoir (<code>reservoir_index_f</code>) and lake (<code>lake_index_f</code>) indices as part of <code>network.river</code> were not correct. These were mapped to their own index in the <code>SimpleReservoir</code> and <code>Lake</code> struct, and not to the corresponding river index. This resulted in incorrect surface water abstractions from reservoir and lake volumes, and surface water abstractions were set at zero at the wrong river locations.</li>
<li>Wflow ZMQ server: allow JSON reading and writing of <code>NaN</code> and <code>Inf</code> values to avoid a JSON spec error. For example, during initialization of a wflow model, some (diagnostic) model variables are initialized with <code>NaN</code> values.</li>
</ul>
</section>
Expand All @@ -313,6 +314,8 @@ <h3 class="anchored" data-anchor-id="changed">Changed</h3>
<li>Removed vertical concepts <code>HBV</code> and <code>FLEXTopo</code>.</li>
<li>Removed metadata macros <code>exchange</code> and <code>grid_type</code>. The macro <code>grid_type</code> is not required because this functionality is already part of <code>BMI</code>. The macro <code>exchange</code> is replaced by a function used by <code>BMI</code>. Remaining metadata macros <code>get_units</code> and <code>grid_loc</code> are only used by <code>BMI</code>.</li>
<li>Refactor the vertical <code>SBM</code> concept: divide the long struct <code>SBM</code> into different model components for interception, snow, glacier, (open water) runoff, soil, water demand and allocation stored in the struct <code>LandHydrologySBM</code>. Additionally, the atmospheric forcing and a shared vegetation parameterset are stored as separate fields in struct <code>LandHydrologySBM</code> (with soil model <code>SbmSoilModel</code>). The model component structs have model <code>variables</code>, <code>parameters</code> and <code>boundary_conditions</code> (if applicable), including associated functions for initializing and updating these model components. The original long update function of the <code>SBM</code> soil part has been split into separate functions.</li>
<li>Refactor the lateral (routing) components: as for the vertical <code>SBM</code> concept split the structs into <code>variables</code>, <code>parameters</code> and <code>boundary_conditions</code> (if applicable).</li>
<li>Timestepping method parameters for solving the kinematic wave and local inertial approaches for river and overland flow are moved to a <code>TimeStepping</code> struct. The timestepping implementation for the kinematic wave is now similar to the local inertial method: a stable timestep is computed for each sub timestep (or a fixed sub timestep is used) as part of a while loop (for each model timestep).</li>
</ul>
</section>
<section id="added" class="level3">
Expand Down
2 changes: 1 addition & 1 deletion previews/PR513/model_docs/parameters_vertical.html
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ <h2 class="anchored" data-anchor-id="sbm">SBM</h2>
<td>0.038</td>
</tr>
<tr class="even">
<td style="text-align: left;"><strong><code>g_tt</code></strong></td>
<td style="text-align: left;"><strong><code>g_ttm</code></strong></td>
<td>threshold temperature for glacier melt</td>
<td>ᵒC</td>
<td>0.0</td>
Expand Down
14 changes: 7 additions & 7 deletions previews/PR513/model_docs/vertical/shared_processes.html
Original file line number Diff line number Diff line change
Expand Up @@ -409,12 +409,12 @@ <h3 class="anchored" data-anchor-id="snow-modelling">Snow modelling</h3>
# Figure created using python: # hide
# https://gist.github.com/JoostBuitink/21dd32e71fd1360117fcd1c532c4fd9d#file-snowfall_fig-py # hide
-->
<p>If precipitation occurs as snowfall, it is added to the dry snow component within the snow pack. Otherwise it ends up in the free water reservoir, which represents the liquid water content of the snow pack. Between the two components of the snow pack, interactions take place, either through snow melt (if temperatures are above a threshold <code>tt</code>) or through snow refreezing (if temperatures are below threshold <code>tt</code>).</p>
<p>If precipitation occurs as snowfall, it is added to the dry snow component within the snow pack. Otherwise it ends up in the free water reservoir, which represents the liquid water content of the snow pack. Between the two components of the snow pack, interactions take place, either through snow melt (if temperatures are above a threshold <code>ttm</code>) or through snow refreezing (if temperatures are below threshold <code>ttm</code>).</p>
<p>The respective rates of snow melt and refreezing are:</p>
<p><span class="math display">\[
\begin{align*}
Q_m &amp;=&amp; \subtext{\mathrm{cf}}{max}(T_a−\mathrm{tt})\, &amp;&amp;T_a &gt; \mathrm{tt} \\
Q_r &amp;=&amp; \subtext{\mathrm{cf}}{max} \, \mathrm{cf}_r(\mathrm{tt}−T_a) &amp;&amp;T_a &lt; \mathrm{tt}
Q_m &amp;=&amp; \subtext{\mathrm{cf}}{max}(T_a−\mathrm{ttm})\, &amp;&amp;T_a &gt; \mathrm{ttm} \\
Q_r &amp;=&amp; \subtext{\mathrm{cf}}{max} \, \mathrm{cf}_r(\mathrm{ttm}−T_a) &amp;&amp;T_a &lt; \mathrm{ttm}
\end{align*}
\]</span></p>
<p>where <span class="math inline">\(Q_m\)</span> is the rate of snow melt, <span class="math inline">\(Q_r\)</span> is the rate of snow refreezing, and <span class="math inline">\(\SIb{\subtext{\mathrm{cf}}{max}}{mm\;(\degree C)^{-1} day^{-1}}\)</span> and <span class="math inline">\(\mathrm{cf}_r\)</span> are user defined model parameters (the melting factor and the refreezing factor respectively).</p>
Expand All @@ -435,16 +435,16 @@ <h3 class="anchored" data-anchor-id="snow-modelling">Snow modelling</h3>
<section id="glacier-modelling" class="level3">
<h3 class="anchored" data-anchor-id="glacier-modelling">Glacier modelling</h3>
<p>Glacier processes can be modelled if the snow model is enabled. Glacier modelling is very similar to snow modelling and considers two main processes: glacier build-up from snow turning into firn/ice (using the HBV-light model) and glacier melt (using a temperature degree-day model).</p>
<p>The definition of glacier boundaries and initial volume is defined by two parameters. The parameter <code>glacierfrac</code> gives the fraction of each grid cell covered by a glacier as a number between zero and one. The state parameter <code>glacierstore</code> gives the amount of water (in mm w.e.) within the glaciers at each grid cell. Because the glacier store (<code>glacierstore</code>) cannot be initialized by running thFe model for a couple of years, a default initial state should be supplied by adding this parameter to the input static file. The required glacier data can be prepared from available glacier datasets.</p>
<p>The definition of glacier boundaries and initial volume is defined by two parameters. The parameter <code>glacierfrac</code> gives the fraction of each grid cell covered by a glacier as a number between zero and one. The state parameter <code>glacierstore</code> gives the amount of water (in mm w.e.) within the glaciers at each grid cell. Because the glacier store (<code>glacierstore</code>) cannot be initialized by running the model for a couple of years, a default initial state should be supplied by adding this parameter to the input static file. The required glacier data can be prepared from available glacier datasets.</p>
<p>First, a fixed fraction of the snowpack on top of the glacier is converted into ice for each timestep and added to the <code>glacierstore</code> using the HBV-light model (Seibert et al., 2018). This fraction <code>g_sifrac</code> typically ranges from <span class="math inline">\(0.001\)</span> to <span class="math inline">\(0.006\)</span>.</p>
<p>Then, when the snowpack on top of the glacier is almost all melted (snow cover <span class="math inline">\(&lt;
\SI{10}{mm}\)</span>), glacier melt is enabled and estimated with a degree-day model. If the air temperature, <span class="math inline">\(T_a\)</span>, is below a certain threshold <code>g_tt</code> (<span class="math inline">\(\SIb{}{\degree C}\)</span>) precipitation occurs as snowfall, whereas it occurs as rainfall if <span class="math inline">\(T_a ≥\)</span> <code>g_tt</code>.</p>
\SI{10}{mm}\)</span>), glacier melt is enabled and estimated with a degree-day model. If the air temperature, <span class="math inline">\(T_a\)</span>, is above a certain threshold <code>g_ttm</code> (<span class="math inline">\(\SIb{}{\degree C}\)</span>) glacier melt occurs.</p>
<p>With this the rate of glacier melt in mm is estimated as:</p>
<p><span class="math display">\[
Q_m = \subtext{g}{cfmax}(T_a − \subtext{g}{tt})\, ; \, T_a &gt; \subtext{g}{tt}
Q_m = \subtext{g}{cfmax}(T_a − \subtext{g}{ttm})\, ; \, T_a &gt; \subtext{g}{ttm}
\]</span></p>
<p>where <span class="math inline">\(Q_m\)</span> is the rate of glacier melt and <span class="math inline">\(\SIb{\subtext{g}{cfmax}}{mm (\degree
C)^{-1}day^{-1}}\)</span> is the melting factor. Parameter <code>g_tt</code> can be taken as equal to the snow <code>tt</code> parameter. Values of the melting factor <code>g_cfmax</code> normally varies from one glacier to another and some values are reported in the literature. <code>g_cfmax</code> can also be estimated by multiplying snow <code>cfmax</code> by a factor between 1 and 2, to take into account the higher albedo of ice compared to snow.</p>
C)^{-1}day^{-1}}\)</span> is the melting factor. Parameter <code>g_ttm</code> can be taken as equal to the snow <code>ttm</code> parameter. Values of the melting factor <code>g_cfmax</code> normally varies from one glacier to another and some values are reported in the literature. <code>g_cfmax</code> can also be estimated by multiplying snow <code>cfmax</code> by a factor between 1 and 2, to take into account the higher albedo of ice compared to snow.</p>
</section>
</section>
<section id="rainfall-interception" class="level2">
Expand Down
Loading

0 comments on commit 500e7fb

Please sign in to comment.