Skip to content

Commit

Permalink
fix @ref
Browse files Browse the repository at this point in the history
  • Loading branch information
JoostBuitink committed Oct 30, 2024
1 parent 9135395 commit 16f2be5
Show file tree
Hide file tree
Showing 16 changed files with 265 additions and 152 deletions.
4 changes: 2 additions & 2 deletions docs/developments/julia_structs.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ The `subsurface` part is mapped to the lateral subsurface flow kinematic wave co
`land` part is mapped the overland flow kinematic wave concept and the `river` part is mapped
to the river flow kinematic wave concept. Knowledge of this specific mapping is required to
understand and correctly set input, output and state variables in the TOML configuration file,
see also [Config and TOML](@ref config_toml). This mapping is described in more detail for each
see also [Config and TOML](../user_guide/toml_file.qmd). This mapping is described in more detail for each
model in the section Models. Also the `struct` of each mapped concept is provided, so one can
check the internal variables in the code. These structs are defined as a parametric composite
type, with type parameters between curly braces after the `struct` name. See also the next
paragraph [Vertical and lateral models](@ref) for a more detailed description.
paragraph [Vertical and lateral models](#vertical-and-lateral-models) for a more detailed description.

## Vertical and lateral models
The different model concepts used in wflow are defined as parametric [composite
Expand Down
116 changes: 66 additions & 50 deletions docs/getting_started/building_a_model.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ model schematization, (dynamic) forcing data, results and states.
The wflow plugin [hydroMT-wflow](https://github.com/Deltares/hydromt_wflow) of hydroMT can be
used to build and analyze the following model configurations:

- [wflow\_sbm + kinematic wave routing](../model_docs/model_configurations.html#sbm-kinematic-wave)
- [wflow\_sbm + local inertial river and floodplain](../model_docs/model_configurations.html#sbm-local-inertial-river)
- [wflow\_sbm + local inertial river (1D) and land (2D)](../model_docs/model_configurations.html#sbm-local-inertial-river-1d-and-land-2d)
- [wflow\_sbm + kinematic wave routing](../model_docs/model_configurations.qmd#sbm-kinematic-wave)
- [wflow\_sbm + local inertial river and floodplain](../model_docs/model_configurations.qmd#sbm-local-inertial-river)
- [wflow\_sbm + local inertial river (1D) and land (2D)](../model_docs/model_configurations.qmd#sbm-local-inertial-river-1d-and-land-2d)
- [wflow\_sediment](../model_docs/model_configurations.html#wflow_sediment)

To learn more about the wflow plugin of this Python package, we refer to the [hydroMT-wflow
documentation](https://deltares.github.io/hydromt_wflow/latest/index.html).

To inspect or modify (for example in QGIS) the netCDF static data of these wflow models it is
convenient to export the maps to a raster format. This can be done as part of the hydroMT-wflow
plugin, see also the following [example]
(https://deltares.github.io/hydromt_wflow/latest/_examples/convert_staticmaps_to_mapstack.html).
plugin, see also the following
[example](https://deltares.github.io/hydromt_wflow/latest/_examples/convert_staticmaps_to_mapstack.html).
It is also possible to create again the netCDF static data file based on the modified raster
map stack.

Expand All @@ -31,7 +31,8 @@ map stack.
The actual data requirements depend on the application of the Model and the Model type. Both
forcing and static data should be provided in netCDF format, with the same grid definition for
forcing and static data. The only exception is storage and rating curves for lakes, that should
be provided in CSV format, see also [Additional settings](@ref).
be provided in CSV format, see also [Additional settings for
waterbodies](../model_docs/lateral/waterbodies.qmd#additional-settings).

* Forcing data:
- Precipitation
Expand All @@ -57,65 +58,80 @@ An approach to generate `ldd` data is to make use of the Python package
data](https://deltares.github.io/pyflwdir/latest/_examples/from_dem.html),

see also Eilander et al. (2021) for more information. Pyflwdir is also used by the
[hydroMT](@ref) Python package described in the next paragraph. Another approach to generate
`ldd` data is to make use of PCRaster functionality, see for example
[hydroMT](https://github.com/Deltares/hydromt) Python package described in the next paragraph.
Another approach to generate `ldd` data is to make use of PCRaster functionality, see for
example
[lddcreate](https://pcraster.geo.uu.nl/pcraster/4.3.1/documentation/pcraster_manual/sphinx/op_lddcreate.html).

Optionally, but also not directly part of a model component are `gauge` locations, that are
used to extract gridded data from certain locations.

The different supported model configurations are described in the section [Model
configurations](@ref). Wflow\_sbm models have the vertical concept [SBM](@ref vert_sbm) in
common and input parameters for this component are described in the [SBM](@ref params_sbm)
section of Model parameters. For wflow\_sbm models there are two ways to include subsurface
flow:

1. The kinematic wave approach (see section [Subsurface flow routing](@ref)) as part of the
`sbm` model type. Parameters that are part of this component are described in the [Lateral
subsurface flow](@ref params_ssf) section of Model parameters. Input parameters for this
component are derived from the SBM vertical concept and the land slope. One external
parameter [`ksathorfrac`](@ref params_ssf) is used to calculate the horizontal hydraulic
conductivity at the soil surface `kh_0`.
2. Groundwater flow (see section [Groundwater flow component](@ref lateral_gwf)) as part of the
`sbm_gwf` model type. For the unconfined aquifer the input parameters are described in the
section [Unconfined aquifer](@ref) of Model parameters. The bottom (`bottom`) of the
groundwater layer is derived from from the `soilthickness` [mm] parameter of `SBM` and the
provided surface elevation `altitude` [m] as part of the static input. The `area` parameter
is derived from the model grid. Parameters that are part of the boundary conditions of the
unconfined aquifer are listed under [Constant Head](@ref) and [Boundary conditions](@ref) of
the Model parameters section.
configurations](../model_docs/model_configurations.qmd). Wflow\_sbm models have the vertical
concept [SBM](../model_docs/vertical/sbm.qmd) in common and input parameters for this component
are described in the [SBM model parameters table](../model_docs/parameters_vertical.qmd#sbm).
For wflow\_sbm models there are two ways to include subsurface flow:

1. The kinematic wave approach (see section [Subsurface flow
routing](../model_docs/lateral/kinwave.qmd#subsurface-flow-routing)) as part of the `sbm`
model type. Parameters that are part of this component are described in the [Lateral
subsurface flow](../model_docs/parameters_lateral.qmd#lateral-subsurface-flow) section of
Model parameters. Input parameters for this component are derived from the SBM vertical
concept and the land slope. One external parameter (`ksathorfrac`) is used to calculate the
horizontal hydraulic conductivity at the soil surface `kh_0`.
2. Groundwater flow (see section [Groundwater flow component](../model_docs/lateral/gwf.qmd))
as part of the `sbm_gwf` model type. For the unconfined aquifer the input parameters are
described in the section [Unconfined
aquifer](../model_docs/parameters_lateral.qmd#unconfined-aquifer) of Model parameters. The
bottom (`bottom`) of the groundwater layer is derived from from the `soilthickness` [mm]
parameter of `SBM` and the provided surface elevation `altitude` [m] as part of the static
input. The `area` parameter is derived from the model grid. Parameters that are part of the
boundary conditions of the unconfined aquifer are listed under [Constant
Head](../model_docs/lateral/gwf.qmd#head-boundary) and [Boundary
conditions](../model_docs/parameters_lateral.qmd#boundary-conditions) of the Model
parameters section.

Most hydrological model configurations make use of the kinematic wave surface routing (river
flow, overland flow or both) and input data required for the river and overland flow components
is described in [Surface flow](@ref). There is also the option to use the local inertial model
as part of the wflow\_sbm models (model types `sbm` and `sbm_gwf`):
+ for river flow, see also the [Local inertial river and floodplain](@ref
config_sbm_gwf_lie_river) model.
+ for 1D river flow and 2D overland flow combined, see also the [Local inertial river (1D)
and land (2D)](@ref config_sbm_gwf_lie_river_land) model.

Input parameters for this approach are described in [River flow (local inertial)](@ref
local-inertial_river_params), including the optional 1D [floodplain schematization](@ref
local-inertial_floodplain_params), and [Overland flow (local inertial)](@ref
local-inertial_land_params) of the Model parameters section.
is described in [Surface flow](../model_docs/parameters_lateral.qmd#surface-flow). There is
also the option to use the local inertial model as part of the wflow\_sbm models (model types
`sbm` and `sbm_gwf`):

+ for river flow, see also the [Local inertial river and
floodplain](../model_docs/model_configurations.qmd#sbm-local-inertial-river) model.
+ for 1D river flow and 2D overland flow combined, see also the [Local inertial river (1D) and
land (2D)](../model_docs/model_configurations.qmd#sbm-local-inertial-river-1d-and-land-2d)
model.

Input parameters for this approach are described in [River flow (local
inertial)](../model_docs/parameters_lateral.qmd#local-inertial), including the optional 1D
[floodplain schematization](../model_docs/parameters_lateral.qmd#d-floodplain), and [Overland
flow (local inertial)](../model_docs/parameters_lateral.qmd#overland-flow) of the Model
parameters section.

Reservoirs or lakes can be part of the kinematic wave or local inertial model for river flow
and input parameters are described in [Reservoirs](@ref reservoir_params) and [Lakes](@ref
lake_params).

The [wflow\_sediment](@ref config_sediment) model configuration consists of the vertical [Soil
Erosion](@ref) concept and the input parameters for this concept are described in the
[Sediment](@ref params_sediment) section of the Model parameters. The parameters of the lateral
[Sediment Flux in overland flow](@ref) concept are described in the [Overland flow](@ref)
section of the Model parameters. Parameters of this component are not directly set by data from
static input. The input parameters of the lateral concept [River Sediment Model](@ref) are
listed in [River flow](@ref) of the Model parameters section.
and input parameters are described in
[Reservoirs](../model_docs/parameters_lateral.qmd#reservoirs) and
[Lakes](../model_docs/parameters_lateral.qmd#lakes).

The [wflow\_sediment](../model_docs/model_configurations.qmd#wflow_sediment) model
configuration consists of the vertical [Soil Erosion](../model_docs/vertical/sediment.qmd)
concept and the input parameters for this concept are described in the
[Sediment](../model_docs/parameters_vertical.qmd#sediment) section of the Model parameters. The
parameters of the lateral [Sediment Flux in overland
flow](../model_docs/lateral/sediment_flux.qmd#sediment-flux-in-overland-flow) concept are
described in the [Overland flow](../model_docs/parameters_lateral.qmd#overland-flow-1) section
of the Model parameters. Parameters of this component are not directly set by data from static
input. The input parameters of the lateral concept [River Sediment
Model](../model_docs/lateral/sediment_flux.qmd#river-sediment-model) are listed in [River
flow](../model_docs/parameters_lateral.qmd#river-flow-1) of the Model parameters section.

The Model parameters section lists all the parameters per Model component and these Tables can
also be used to check which parameters can be part of the output, see also [Output netCDF
section](@ref) and [Output CSV section](@ref).
section](../user_guide/toml_file.qmd#output-netcdf-section) and [Output CSV
section](../user_guide/toml_file.qmd#output-csv-section).

Example models can be found in the [Example models section](@ref sample_data).
Example models can be found in the [Example models section](./download_example_models.qmd).

## References
+ Yamazaki, D., Ikeshima, D., Sosa, J., Bates, P. D., Allen, G. H. and Pavelsky, T. M.: MERIT
Expand Down
4 changes: 2 additions & 2 deletions docs/getting_started/download_example_models.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ listed in the Table below:

The associated Model files (input static, forcing and state files) can easily be downloaded and
for this we share the following Julia code (per Model) that downloads the required files to
your current working directory. For running these test model see also [Usage](@ref run_wflow)
and [Command Line Interface](@ref cli).
your current working directory. For running these test model see also [Usage](./running_wflow.qmd#running-a-simulation)
and [Command Line Interface](./running_wflow.qmd#using-the-command-line-interface).

## wflow\_sbm + kinematic wave
```julia
Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started/running_wflow.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ julia -e 'using Wflow; Wflow.run()' path/to/config.toml
```

Furthermore, it is possible to write a Julia script to run a simulation. Example data to
explore how this works can be found [here](@ref sample_data).
explore how this works can be found [here](./download_example_models.qmd).

```julia
using Wflow
Expand Down
4 changes: 2 additions & 2 deletions docs/model_docs/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ modelling framework of wflow. Descriptions are given regarding the model concept
the original scientific papers which explain the concepts in more detail. The model parameters
which influence the processes are also shown, using inline code blocks. An overview of all
model parameters is also provided for easy reference, including their short names, long
descriptions and their units (see [parameters vertical concepts](@ref params_vert) and
[parameters lateral concepts](@ref params_lat)).
descriptions and their units (see [parameters vertical concepts](./parameters_vertical.qmd) and
[parameters lateral concepts](./parameters_lateral.qmd)).

## Division between vertical and lateral

Expand Down
36 changes: 19 additions & 17 deletions docs/model_docs/lateral/gwf.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ where $\SIb{S}{m m^{-1}}$ is storativity (or specific yield), $\SIb{\phi}{m}$ is
head, $t$ is time, $\SIb{k}{m t^{-1}}$ is horizontal hydraulic conductivity, $\SIb{H}{m}$ is
the (saturated) aquifer height: groundwater level - aquifer bottom elevation and $\SIb{Q}{m
t^{-1}}$ represents fluxes from boundary conditions (e.g. recharge or abstraction), see also
[Aquifer boundary conditions](@ref).
[Aquifer boundary conditions](#aquifer-boundary-conditions).

The simplest finite difference formulation is forward in time, central in space, and can be
written as:
Expand All @@ -50,7 +50,7 @@ $$
where $i$ is the cell index, $t$ is time, $\Delta t$ is the step size, $C_{i-1}$ is the the
intercell conductance between cell $i-1$ and $i$ and $C_i$ is the intercell conductance between
cell $i$ and $i+1$. The connection data between cells is stored as part of the `Connectivity`
struct, see also [Connectivity](@ref) for more information.
struct, see also [Connectivity](#connectivity) for more information.

Conductance $C$ is defined as:

Expand All @@ -76,7 +76,7 @@ saturated thickness of a cell-to-cell is approximated using the cell with the hi
This results in a consistent overestimation of the saturated thickness, but it avoids
complexities related with cell drying and rewetting, such as having to define a "wetting
threshold" or a "wetting factor". See also the documentation for MODFLOW-NWT (Niswonger et al.,
2011) or MODFLOW6 (Langevin et al., 2017) for more background information. For more background
1) or MODFLOW6 (Langevin et al., 2017) for more background information. For more background
on drying and rewetting, see for example McDonald et al. (1991).

For the finite difference formulation, there is only one unknown, $\phi_i^{t+1}$. Reshuffling
Expand Down Expand Up @@ -164,9 +164,9 @@ the river bed exfiltration conductance, $\SIb{\subtext{B}{riv}}{L}$ the bottom o
bed, $\SIb{\subtext{h}{riv}}{L}$ is the river stage and $\SIb{\phi}{L}$ is the hydraulic head
in the river cell.

The Table in the Groundwater flow [river boundary condition](@ref gwf_river_params) section of
the Model parameters provides the parameters of the struct `River`. Parameters that can be set
directly from the static input data (netCDF) are marked in this Table.
The Table in the Groundwater flow [river boundary condition](../parameters_lateral.qmd#river)
section of the Model parameters provides the parameters of the struct `River`. Parameters that
can be set directly from the static input data (netCDF) are marked in this Table.

The exchange flux (river to aquifer) $\subtext{Q}{riv}$ is an output variable (field `flux` of
the `River` struct), and is used to update the total flux in a river cell. For the model `SBM +
Expand All @@ -184,9 +184,10 @@ where $\SIb{\subtext{Q}{drain}}{L^3 T^{-1}}$ is the exchange flux from drains to
$\SIb{\subtext{C}{drain}}{L^2 T^{-1}}$ is the drain conductance, $\SIb{\subtext{h}{drain}}{L}$
is the drain elevation and $\SIb{\phi}{L}$ is the hydraulic head in the cell with drainage.

The table in the Groundwater flow [drainage boundary condition](@ref gwf_drainage_params)
section of the Model parameters provides the parameters of the struct `Drainage`. Parameters
that can be set directly from the static input data (netCDF) are marked in this Table.
The table in the Groundwater flow [drainage boundary
condition](../parameters_lateral.qmd#drainage) section of the Model parameters provides the
parameters of the struct `Drainage`. Parameters that can be set directly from the static input
data (netCDF) are marked in this Table.

The exchange flux (drains to aquifer) $\subtext{Q}{drain}$ is an output variable (field `flux`
of struct `Drainage`), and is used to update the total flux in a cell with drains. For the
Expand All @@ -208,10 +209,10 @@ $$

with $\SIb{}{L T^{-1}}$ the recharge rate and $\SIb{A}{L^2}$ the area of the aquifer cell.

The table in the Groundwater flow [recharge boundary condition](@ref gwf_recharge_params)
section of the Model parameters section provides the parameters of the struct `Recharge`.
Parameters that can be set directly from the static input data (netCDF) are marked in this
Table.
The table in the Groundwater flow [recharge boundary
condition](../parameters_lateral.qmd#recharge) section of the Model parameters section provides
the parameters of the struct `Recharge`. Parameters that can be set directly from the static
input data (netCDF) are marked in this Table.

The recharge flux $Q_r$ is an output variable (field `flux` of struct `Recharge`), and is used
to update the total flux in a cell where recharge occurs. For the model `SBM + Groundwater
Expand All @@ -232,8 +233,9 @@ $$
with $\SIb{C_{hb}}{L^2 T^{-1}}$ the conductance of the head boundary, $\SIb{\phi_{hb}}{L}$ the
head of the head boundary and $\phi$ the head of the aquifer cell.

The table in the Groundwater flow [head boundary condition](@ref gwf_headboundary_params)
section of the Model parameters provides the parameters of the struct `HeadBoundary`.
The table in the Groundwater flow [head boundary
condition](../parameters_lateral.qmd#head-boundary) section of the Model parameters provides
the parameters of the struct `HeadBoundary`.

The head boundary flux $Q_{hb}$ is an output variable (field `flux` of struct `HeadBoundary`),
and is used to update the total flux in a cell where this type of boundary occurs. The
Expand All @@ -246,8 +248,8 @@ This boundary is not (yet) part of the model `SBM + Groundwater flow`.
### Well boundary
A volumetric well rate $\SIb{}{L^3 T^{-1}}$ can be specified as a boundary condition.

The Table in the [well boundary condition](@ref well_boundary_params) section of the Model
parameters provides the parameters of the struct `Well`.
The Table in the [well boundary condition](../parameters_lateral.qmd#well-boundary) section of
the Model parameters provides the parameters of the struct `Well`.

The volumetric well rate $\subtext{Q}{well}$ can be can be specified as a fixed or time
dependent value. If a cell is dry, the actual well flux `flux` is set to zero (see also the
Expand Down
Loading

0 comments on commit 16f2be5

Please sign in to comment.