Skip to content

Commit

Permalink
Replace non-ASCII characters by ASCII characters in the names of vari…
Browse files Browse the repository at this point in the history
…ables, structs, functions and macros (#388)

* Replace Greek characters by ASCII characters in Markdown files

* Replace Greek characters by ASCII characters in Julia files

* Replace apostrophe's by quotes in plain text

* Replace subscripts and superscripts with ASCII

* Remove redundant aliases

* Add backticks to format parameters as code

* Update changelog.md
  • Loading branch information
CFBaptista authored Apr 18, 2024
1 parent 6b8a5d0 commit cccf5cd
Show file tree
Hide file tree
Showing 43 changed files with 853 additions and 853 deletions.
4 changes: 4 additions & 0 deletions docs/src/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Always use fractions for the computation of potential evapotranspiration (interception and
transpiration) and potential evaporation (open water and soil). Replaced variable
`et_reftopot` by crop coefficient `kc` (use of `et_reftopot` has been deprecated).
- For improved code readability it is now discouraged to use non-ASCII characters for the
names of variables, structs, functions and macros. Using the non-ASCII character for
built-in operators is still allowed. This change in naming convention is now in effect and
all invalid uses of non-ASCII characters have been replaced by ASCII equivalents.

### Added
- Total water storage as an export variable for `SBM` concept. This is the total water stored
Expand Down
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CurrentModule = Wflow

# About wflow

Wflow is Deltares solution for modelling hydrological processes, allowing users to account
Wflow is Deltares' solution for modelling hydrological processes, allowing users to account
for precipitation, interception, snow accumulation and melt, evapotranspiration, soil water,
surface water and groundwater recharge in a fully distributed environment. Successfully
applied worldwide for analyzing flood hazards, drought, climate change impacts and land use
Expand Down
4 changes: 2 additions & 2 deletions docs/src/model_docs/lateral/kinwave.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ where ``Q`` is the surface runoff in the kinematic wave [m``^3``/s], ``x`` is th
the runoff pathway [m], ``A`` is the cross-section area of the runoff pathway [m``^{2}``],
``t`` is the integration timestep [s] and ``\alpha`` and ``\beta`` are coefficients.

These equations are solved with a nonlinear scheme using Newtons method and can also be
These equations are solved with a nonlinear scheme using Newton's method and can also be
iterated depending on the model space and time resolution. By default, the iterations are
performed until a stable solution is reached (``\epsilon < 10^{-12}``). For larger models,
the number of iterations can also be fixed for to a specific sub-timestep (in seconds) for
Expand Down Expand Up @@ -176,4 +176,4 @@ zero is applied to the upstream flow `qin`.

## References
+ Chow, V., Maidment, D. and Mays, L., 1988, Applied Hydrology. McGraw-Hill Book Company,
New York.
New York.
14 changes: 7 additions & 7 deletions docs/src/model_docs/lateral/sediment_flux.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ mobilize 5 classes of sediment:
where ``CLA``, ``SIL`` and ``SAN`` are the primary clay, silt, sand fractions of the topsoil
and ``PCL``, ``PSI``, ``PSA``, ``SAG`` and ``LAG`` are the clay, silt, sand, small and large
aggregates fractions of the detached sediment respectively. The transport capacity of the
flow using Yalins equation with particle differentiation, developed by Foster (1982), is:
flow using Yalin's equation with particle differentiation, developed by Foster (1982), is:
```math
TC_{i} = (P_{e})_{i} (S_{g})_{i} \, \rho_{w} \, g \, d_{i} V_{*}
```
Expand Down Expand Up @@ -79,7 +79,7 @@ are much rarer than for soil loss and inland dynamics. The simpler models such a
default sediment river model uses again the transport capacity of the flow to determine if
there is erosion or deposition (Neitsch et al., 2011). A more physics-based approach
(Partheniades, 1965) to determine river erosion is used by Liu et al. (2018) and in the new
SWATs approach developed by Narasimhan et al. (2017). For wflow\_sediment, the new
SWAT's approach developed by Narasimhan et al. (2017). For wflow\_sediment, the new
physics-based model of SWAT was chosen for transport and erosion as it enables the use of
parameter estimation for erosion of bed and bank of the channel and separates the suspended
from the bed loads.
Expand Down Expand Up @@ -313,7 +313,7 @@ deposited sediment and the river bed/bank erosion.
As sediments have a higher density than water, moving sediments in water can be deposited in
the river bed. The deposition process depends on the mass of the sediment, but also on flow
characteristics such as velocity. In wflow_sediment, as in SWAT, deposition is modelled with
Einsteins equation (Neitsch et al, 2011):
Einstein's equation (Neitsch et al, 2011):
```math
P_{dep}=\left(1-\dfrac{1}{e^{x}}\right)100
```
Expand Down Expand Up @@ -359,14 +359,14 @@ and shifted to the outlet cell. wflow\_sediment handles the lakes and reservoirs
cell belongs to a lake/reservoir and is not the outlet then the model assumes that no
erosion/deposition of sediments is happening and the sediments are only all transported to
the lake/reservoir outlet. Once the sediments reach the outlet, then sediments are deposited
in the lake/reservoir according to Camps model (1945) (Verstraeten et al, 2000):
in the lake/reservoir according to Camp's model (1945) (Verstraeten et al, 2000):
```math
TE = \dfrac{\omega_{s}}{u_{cr,res}} = \dfrac{A_{res}}{Q_{out,res}} \omega_{s}
```
where ``TE`` is the trapping efficiency of the lake/reservoir (or the fraction of particles
trapped), ``\omega_{s}`` is the particle velocity from Stokes (m s``^{-1}``), ``u_{cr,res}``
is the reservoirs critical settling velocity (m/s) which is equal to the reservoirs
outflow ``Q_{out,res}`` (m``^{3}`` s``^{-1}``) divided by the reservoirs surface area
is the reservoir's critical settling velocity (m/s) which is equal to the reservoir's
outflow ``Q_{out,res}`` (m``^{3}`` s``^{-1}``) divided by the reservoir's surface area
``A_{res}`` (m``^{2}``).

For reservoirs, coarse sediment particles from the bed load are also assumed to be trapped by the
Expand Down Expand Up @@ -439,4 +439,4 @@ transport in overland flow.
the Total Environment, 538:855-875, 2015. 10.1016/j.scitotenv.2015.08.095
+ O. Vigiak, A. Malago, F. Bouraoui, M. Vanmaercke, F. Obreja, J. Poesen, H. Habersack, J.
Feher, and S. Groselj. Modelling sediment fluxes in the Danube River Basin with SWAT.
Science of the Total Environment, 2017. 10.1016/j.scitotenv.2017.04.236
Science of the Total Environment, 2017. 10.1016/j.scitotenv.2017.04.236
66 changes: 33 additions & 33 deletions docs/src/model_docs/params_lateral.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ internal model parameter `sl`, and is listed in the Table below between parenthe

| parameter | description | unit | default |
|:--------------- | ------------------| ----- | -------- |
| `β` | constant in Manning's equation | - | - |
| `beta` | constant in Manning's equation | - | - |
| **`sl`** (`slope`) | slope | m m``^{-1}``| - |
| **`n`** | Manning's roughness | s m``^{-\frac{1}{3}}``| 0.036 |
| **`dl`** | length | m | - |
Expand All @@ -27,12 +27,12 @@ internal model parameter `sl`, and is listed in the Table below between parenthe
| `h` | water level | m | - |
| `h_av` | average water level | m | - |
| **`bankfull_depth`** | bankfull river depth | m | 1.0 |
| `Δt` | model time step | s | - |
| `dt` | model time step | s | - |
| `its` | number of fixed iterations | - | - |
| **`width`** | width | m | - |
| `alpha_pow` | used in the power part of ``\alpha`` | - | - |
| `alpha_term` | term used in computation of ``\alpha`` | - | - |
| `α` | constant in momentum equation ``A = \alpha Q^{\beta}`` | s``^{\frac{3}{5}}`` m``^{\frac{1}{5}}`` | - |
| `alpha` | constant in momentum equation ``A = \alpha Q^{\beta}`` | s``^{\frac{3}{5}}`` m``^{\frac{1}{5}}`` | - |
| `cel` | celerity of kinematic wave | m s``^{-1}`` | - |
| `reservoir_index` | map cell to 0 (no reservoir) or i (pick reservoir i in reservoir field) | - | - |
| `lake_index` | map cell to 0 (no lake) or i (pick lake i in lake field) | - | - |
Expand All @@ -50,7 +50,7 @@ internal model parameter `sl`, and is listed in the Table below between parenthe

| parameter | description | unit | default |
|:--------------- | ------------------| ----- | -------- |
| `β` | constant in Manning's equation | - | - |
| `beta` | constant in Manning's equation | - | - |
| **`sl`** (`slope`) | slope | m m``^{-1}``| - |
| **`n`** | Manning's roughness | s m``^{-\frac{1}{3}}``| 0.072 |
| `dl` | length | m | - |
Expand All @@ -62,12 +62,12 @@ internal model parameter `sl`, and is listed in the Table below between parenthe
| `volume` | kinematic wave volume |m``^3``| - |
| `h` | water level | m | - |
| `h_av` | average water level | m | - |
| `Δt` | model time step | s | - |
| `dt` | model time step | s | - |
| `its` | number of fixed iterations | - | - |
| `width` | width | m | - |
| `alpha_pow` | used in the power part of ``\alpha`` | - | - |
| `alpha_term` | term used in computation of ``\alpha`` | - | - |
| `α` | constant in momentum equation ``A = \alpha Q^{\beta}`` | s``^{\frac{3}{5}}`` m``^{\frac{1}{5}}`` | - |
| `alpha` | constant in momentum equation ``A = \alpha Q^{\beta}`` | s``^{\frac{3}{5}}`` m``^{\frac{1}{5}}`` | - |
| `cel` | celerity of kinematic wave | m s``^{-1}`` | - |
| `to_river` | part of overland flow that flows to the river | m``^3`` s``^{-1}`` | - |
| `kinwave_it` | boolean for kinematic wave iterations | - | false |
Expand Down Expand Up @@ -98,7 +98,7 @@ locs = "wflow_reservoirlocs"
| **`targetfullfrac`** | target fraction full (of max storage)| - | - |
| **`targetminfrac`** | target minimum full fraction (of max storage) | - | - |
| `demandrelease`| minimum (environmental) flow released from reservoir | m``^3`` s``^{-1}``| - |
| `Δt` | model time step | s | - |
| `dt` | model time step | s | - |
| `volume` | volume | m``^3`` | - |
| `inflow` | total inflow into reservoir | m``^3`` | - |
| `outflow` | outflow into reservoir | m``^3`` s``^{-1}`` | - |
Expand Down Expand Up @@ -141,7 +141,7 @@ between parentheses.
| **`lowerlake_ind`** (`linkedlakelocs`) | Index of lower lake (linked lakes) | - | 0 |
| **`sh`** | data for storage curve | - | - |
| **`hq`** | data rating curve | - | - |
| `Δt` | model time step | s | - |
| `dt` | model time step | s | - |
| `inflow` | total inflow to the lake | m``^3`` | - |
| `storage` | storage lake | m``^3`` | - |
| `maxstorage`| maximum storage lake with rating curve type 1 | m``^3`` | - |
Expand All @@ -155,19 +155,19 @@ between parentheses.
The Table below shows the parameters (fields) of struct `LateralSSF`, including a
description of these parameters, the unit, and default value if applicable. The parameters
in bold represent model parameters that can be set through static input data (netCDF). The
soil related parameters `f`, `soilthickness`, `z_exp`, `θₛ` and `θᵣ` are derived from the
soil related parameters `f`, `soilthickness`, `z_exp`, `theta_s` and `theta_r` are derived from the
vertical `SBM` concept (including unit conversion for `f`, `z_exp` and `soilthickness`), and
can be listed in the TOML configuration file under `[input.vertical]`, to map the internal
model parameter to the external netCDF variable. The internal slope model parameter `βₗ` is
model parameter to the external netCDF variable. The internal slope model parameter `slope` is
set through the TOML file as follows:

```toml
[input.lateral.land]
slope = "Slope"
```

The parameter `kh₀` is computed by multiplying the vertical hydraulic conductivity at the
soil surface `kv₀` (including unit conversion) of the vertical `SBM` concept with the
The parameter `kh_0` is computed by multiplying the vertical hydraulic conductivity at the
soil surface `kv_0` (including unit conversion) of the vertical `SBM` concept with the
internal parameter `khfrac` \[-\] (default value of 1.0). The internal model parameter
`khfrac` is set through the TOML file as follows:

Expand All @@ -176,34 +176,34 @@ internal parameter `khfrac` \[-\] (default value of 1.0). The internal model par
ksathorfrac = "KsatHorFrac"
```

The `khfrac` parameter compensates for anisotropy, small scale `kv₀` measurements (soil
The `khfrac` parameter compensates for anisotropy, small scale `kv_0` measurements (soil
core) that do not represent larger scale hydraulic conductivity, and smaller flow length
scales (hillslope) in reality, not represented by the model resolution.

For the vertical [SBM](@ref params_sbm) concept different vertical hydraulic conductivity
depth profiles are possible, and these also determine which `LateralSSF` parameters are used
including the input requirements for the computation of lateral subsurface flow. For the
`exponential` profile the model parameters `kh₀` and `f` are used. For the
`exponential_constant` profile `kh₀` and `f` are used, and `z_exp` is required as part of
`exponential` profile the model parameters `kh_0` and `f` are used. For the
`exponential_constant` profile `kh_0` and `f` are used, and `z_exp` is required as part of
`[input.vertical]`. For the `layered` profile, `SBM` model parameter `kv` is used, and for
the `layered_exponential` profile `kv` is used and `z_exp` is required as part of
`[input.vertical]`.

| parameter | description | unit | default |
|:---------------| --------------- | ---------------------- | ----- |
| `kh₀` | horizontal hydraulic conductivity at soil surface | m d``^{-1}`` | 3.0 |
| **`f`** | a scaling parameter (controls exponential decline of `kh₀`) | m``^{-1}`` | 1.0 |
| `kh_0` | horizontal hydraulic conductivity at soil surface | m d``^{-1}`` | 3.0 |
| **`f`** | a scaling parameter (controls exponential decline of `kh_0`) | m``^{-1}`` | 1.0 |
| `kh` | horizontal hydraulic conductivity | m d``^{-1}`` | - |
| **`khfrac`** (`ksathorfrac`) | a muliplication factor applied to vertical hydraulic conductivity `kv` | - | 100.0 |
| **`soilthickness`** | soil thickness | m | 2.0 |
| **`θₛ`** | saturated water content (porosity) | - | 0.6 |
| **`θᵣ`** | residual water content | - | 0.01 |
| `Δt` | model time step | d | - |
| **`βₗ`** (`slope`) | slope | m m``^{-1}`` | - |
| **`theta_s`** | saturated water content (porosity) | - | 0.6 |
| **`theta_r`** | residual water content | - | 0.01 |
| `dt` | model time step | d | - |
| **`slope`** | slope | m m``^{-1}`` | - |
| `dl` | drain length | m | - |
| `dw` | drain width | m | - |
| `zi` | pseudo-water table depth (top of the saturated zone) | m | - |
| **`z_exp`** | depth from soil surface for which exponential decline of `kh₀` is valid | m | - |
| **`z_exp`** | depth from soil surface for which exponential decline of `kh_0` is valid | m | - |
| `exfiltwater` | exfiltration (groundwater above surface level, saturated excess conditions) | m Δt⁻¹ | - |
| `recharge` | net recharge to saturated store | m``^2`` Δt⁻¹ | - |
| `ssf` | subsurface flow | m``^3`` d``{-1}`` | - |
Expand Down Expand Up @@ -247,18 +247,18 @@ model parameter `mannings_n`, and is listed in the Table below between parenthes
| `active_n` | active nodes | - | - |
| `active_e` | active edges | - | - |
| `g` | acceleration due to gravity | m s``^{-2}`` | - |
| `α` | stability coefficient (Bates et al., 2010) | - | 0.7 |
| `alpha` | stability coefficient (Bates et al., 2010) | - | 0.7 |
| `h_thresh` | depth threshold for calculating flow | m | 0.001 |
| `Δt` | model time step | s | - |
| `dt` | model time step | s | - |
| `q` | river discharge (subgrid channel) | m``^3`` s``^{-1}`` | - |
| `q_av` | average river channel (+ floodplain) discharge | m``^3`` s``^{-1}`` | - |
| `q_channel_av` | average river channel discharge | m``^3`` s``^{-1}`` | - |
| `zb_max` | maximum channel bed elevation | m | - |
| `mannings_n_sq` | Manning's roughness squared at edge/link | (s m``^{-\frac{1}{3}}``)``^2`` | - |
| `h` | water depth | m | - |
| `η_max` | maximum water elevation | m | - |
| `η_src` | water elevation of source node of edge | m | - |
| `η_dst` | water elevation of downstream node of edge | m | - |
| `zs_max` | maximum water elevation | m | - |
| `zs_src` | water elevation of source node of edge | m | - |
| `zs_dst` | water elevation of downstream node of edge | m | - |
| `hf` | water depth at edge/link | m | - |
| `h_av` | average water depth | m | - |
| `dl` | river length | m | - |
Expand Down Expand Up @@ -356,10 +356,10 @@ internal model parameter `z`, and is listed in the Table below between parenthes
| `xwidth`| effective flow width x direction (floodplain) | m | - |
| `ywidth`| effective flow width y direction (floodplain) | m | - |
| `g` | acceleration due to gravity | m s``^{-2}`` | - |
| `θ` | weighting factor (de Almeida et al., 2012) | - | 0.8 |
| `α` | stability coefficient (Bates et al., 2010) | - | 0.7 |
| `theta` | weighting factor (de Almeida et al., 2012) | - | 0.8 |
| `alpha` | stability coefficient (Bates et al., 2010) | - | 0.7 |
| `h_thresh` | depth threshold for calculating flow | m | 0.001 |
| `Δt` | model time step| s | - |
| `dt` | model time step| s | - |
| `qy0` | flow in y direction at previous time step| m``^3`` s``^{-1}`` | - |
| `qx0` | flow in x direction at previous time step| m``^3`` s``^{-1}`` | - |
| `qx` | flow in x direction | m``^3`` s``^{-1}`` | - |
Expand Down Expand Up @@ -412,11 +412,11 @@ altitude = "wflow_dem"
```

The input parameter `conductivity` (listed under `[input.lateral.subsurface]`) is not equal
to the internal model parameter `kh₀`, and is listed in the Table below between parentheses.
to the internal model parameter `kh_0`, and is listed in the Table below between parentheses.

| parameter | description | unit | default |
|:--------------- | ------------------| ----- | -------|
| **`kh₀`** (`conductivity`) | horizontal conductivity | m d``^{-1}``s | - |
| **`kh_0`** (`conductivity`) | horizontal conductivity | m d``^{-1}``s | - |
| **`specific_yield`** | specific yield | m m``^{-1}`` | - |
| **`top`** (`altitude`) | top groundwater layer | m | - |
| `bottom` | bottom groundwater layer | m | - |
Expand Down Expand Up @@ -592,7 +592,7 @@ slope = "RiverSlope"
| **`cbagnold`**| Bagnold c coefficient | - | - |
| **`ebagnold`**| Bagnold exponent | - | - |
| `n` | number of cells | - | - |
| `Δt` | model time step | s | - |
| `dt` | model time step | s | - |
| `ak` | Kodatie coefficient `a` | - | - |
| `bk` | Kodatie coefficient `b` | - | - |
| `ck` | Kodatie coefficient `c` | - | - |
Expand Down
Loading

0 comments on commit cccf5cd

Please sign in to comment.