Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move docs to quarto for v1 #448

Draft
wants to merge 10 commits into
base: v1
Choose a base branch
from
Draft

Move docs to quarto for v1 #448

wants to merge 10 commits into from

Conversation

JoostBuitink
Copy link
Contributor

@JoostBuitink JoostBuitink commented Aug 15, 2024

Issue addressed

Fixes #224

Explanation

Moved all current docs to quarto format

Docs can be viewed via this link: https://deltares.github.io/Wflow.jl/quarto/

Additional Notes (optional)

Some items are still missing/need to be picked up

  • Many internal links to other pages are not yet working
  • The version switcher needs to be updated (check Delft-FIAT repo)
  • Examples are missing, but can be added in the future

verseve and others added 10 commits July 17, 2024 09:17
* initialization water demand (non-irrigation)
as part of vertical SBM concept

* file water_demand

* change netto to net

* non-irrigation water demand sectors
for each sector a struct is defined

* irrigation structs (not complete)

* water demand structs
- all structs part of SBM (domestic, industry, livestock, nonpaddy and paddy)
- for now assumption is that water demand arrays have the same lenght as SBM (can change later)

* impoved root water uptake (transpiration)
- soil water pressure heads of the root water uptake  (rwu) reduction function (Feddes) can be provided (netCDF)
- potential transpiration is partioned over depth using the root fraction
- h1 of the rwu reduction function can be provided, either as 1.0 (rwu not constrained during saturated conditions) or 0.0 (rwu constrained during saturated conditions)

* fix: add ust option
was missing in previous commit

* use crop coefficient kc (and not et_reftopot)

* run JuliaFormatter

* water demand calculation

* irrigation demand and tests
- update unit tests
- limit nonpaddy irrigation gross demand by soil infiltration capacity
- include irrigation efficieny in gross demand calculation

* move water demand (and allocation) calculation
now after snow and before recharge update

* add fields `WaterAllocation`
total_gross_demand, fraction groundwater used (irrigation and non irrigation) and allocation areas.

* surface water abstraction and allocation

* groundwater abstraction and allocation
and added field `volume` to lateral kinematic wave subsurface flow

* add surface water abstraction
to kinematic wave for river flow, this is computed actual surface water abstraction from `WaterAllocation`. A check is maded for external negative inflow (local abstraction), and local available surface water volume for surface water abstraction is adjusted.

* surface water abstraction (set and fix)
- set surface water `abstraction` from update of `WaterAllocation`
- fix update of `act_surfacewater_abst` at allocation area level (should be added to local abstraction).

* fix running update water demand and allocation
Errors related to variable names and indexing.

* add groundwater abstraction to `recharge` of `SBM`
actual groundwater abstraction from `WaterAllocation` is added to `recharge` of the model type `sbm`.

* fraction surface water and livestock
- use one value for fraction surface water (no subdivision between irrigated and non-irrigated demands)
- livestock can abstract from both surface and groundwater (was limited to surface water)

* fix groundwater demand, reset `surfacewater_alloc`
- groundwater demand calculation not correct (units)
-  reset `surfacewater_alloc` (0.0) for all cells

* precalculate `area` as part of `model.network.land`

* irrigation allocation, returnflow, units
- add allocated irrigation water to SBM
- compute return flow for non irrigation water withdrawal
- add units/descriptions to fields of structs water demand

* non irrigation returnflow and split waterallocation
- split waterallocation between river and land domain, this is also easier for writing output
- add non irrigation returnflow to river and overland flow kinematic wave routing

* fix check (add irrigation) and update waterdemand settings
- fix check to apply `irri_alloc` in `SBM`
- update waterdemand settings (read from TOML)

* update water demand settings

* Add root fraction and small fix nonpaddy irrigation
Use root fraction (length) for each unsaturated zone layer to scale required irrigation demand (only root zone). Fix computation infiltration_capacity and irri_dem_gross for nonpaddy irrigation (removed from unsaturated zone layers loop).

* local surface water abstraction
exclude lake and reservoir areas

* update metadata structs water demand

* Rename paddy variables `h_max` and `h_p`
`h_max` is defined as the optimal water depth for rice, renamed to `h_opt`, and `h_p` is the water depth when a rice fields starts spilling water, renamed to `h_max`.

* Add two missing modified files for merge 'master'

* Fix reservoir and lake indices water demand

* Fix logic check `Paddy` and `NonPaddy` areas

* Update tests run_sbm_gwf.jl

* Two missing modified files merge `master`

* Add `irrigation_trigger` (initialization)

* Add `irrigation_trigger` to update water demand

* Support water allocation from local inertial river routing
For model type `sbm`.

* Water allocation: reservoir and lake locations
Move river water abstraction at reservoir and lake locations to these locations (subtract abstraction from reservoir and lake volume), and set river water abstraction at zero for these locations.

* Refactor `update_water_allocation` and docstrings
Add sub functions to function `update_water_allocation` and docstring for water_demand.jl functions.

* Extend docstring `update_water_allocation`

* Fix non-ASCII characters
These were not resolved after merge with master.

* Fix update local `act_groundwater_abst_vol`

* Avoid small negative values
As part of update of local water demand and allocation.

* FIx `vwc` computation and unit groundwater abstraction
-  fix computation of `vwc` in function `vwc_brooks_corey` and include `theta_r`.
- fix unit groundwater abstraction from lateral subsurface flow of `sbm` model concept.

* Irrigation demand and infiltration capacity
Use for infiltration capacity only `infiltcapsoil` and `pathfrac`, and not `infiltcappath`

* Add paddy states and some small changes
- Change default values for `h_min`, `h_max` and `h_opt` of paddy areas.
- Check also for paddy `irrigation_areas` when looping over vertical cells.
- Run format.

* Add a couple of water demand and allocation tests

* Subtract `paddy_h_add` from `runoff`

* Fix update of `h3` first time step `update_water_demand`
For the first time step `h3` has NaN values in the `update_water_demand` function. This has been fixed by moving the update of `h3` before calling `update_water_demand`.

* Extend water demand tests and small fix
Fix update of `demand_gross` as part of `paddy` and `nonpaddy`.

* Exclude local groundwater abstraction below water bodies
Consistent with local surface water abstraction.

* Add `Paddy` water depth to total water storage computation

* Use one struct for non-irrigation demand

* Add parameters docs for water demand and allocation

* Fix update of `returnflow_fraction`

* Specify type of water demand fields in `SBM`
And move function `update_water_demand(sbm::SBM)` to sbm.jl.

* Refactor return flow functions non-irrigation sectors
To avoid code duplication.

* Support water demand and allocation for `sbm_gwf` concept
And also update lake `waterlevel` when lake `storage` is abstracted as part of  water demand and allocation computation.

* Water demand and allocation for `sbm_gwf`
- Add test model.
- Fix missing updates of water demand and allocation as part of sbm_gwf_model.jl.
- Change cold state initializaiton of `head` in sbm_gwf_model.jl: replaced constant value of 0.10 m below surface with `zi` from vertical `SBM` concept.

* Add test waterlevel lake

* Allow infiltration of paddy water

* Update piave test model

* Limit irrigation depth paddy and non-paddy
Default 25 mm/day, can be set through the TOML file. If the maximum irrigation depth is applied, irrigation continues at subsequent time steps until field capacity (non-paddy) or `h_opt` (paddY) is reached.

* Add code comments and update `paddy_h_add`
For `paddy_h_add` also include `sbm.runoff_land`.

* Parameter `maximum_irrigation_depth` as Vector
Also update docs for this parameter and added some more comments to the code.

* Fix unit `act_groundwater_abst`
In function `groundwater_allocation_area(land, network)`.

* Update wflow piave test model
Added parameter `frac_sw_used` to staticmaps-piave.nc.

* Start with water demand docs as part of `SBM` concept

* Update docs (root water uptake reduction changed)
Addition of `h3_low`, `h3_high` and `alpha_h1`

* Docs: add water demand and allocation to "Addition wflow options" section

* Update docs water demand and allocation

* Update changelog

* Fix unit for computation `max_abstract` of kinematic wave
Divide `sf.volume` by `dt`-

* Update changelog
Root water update reduction (Feddes).

* Fix `SBM` root water uptake computation
- fix correction of `rootfraction` when rooting depth is below water table `zi` in unsaturated soil layer above `zi`
- fix root water uptake from saturated store: use `wetroots` when rooting depth is equal or above `zi`, otherwise use combination of `wetroots` and remaining `rootfraction` for saturated store

* Consistent use of `rootingdepth` corrected by `soilthickness`
`rootingdepth` is corrected by `soilthickness` during initialization of the `sbm` model type

* Avoid actual transpiration > potential transpiration
By using remaining evaporation if  `zi` >= `rootingdepth`

* Update changelog
Model parameter `rootfraction` and partitioning of potential transpiration over soil layers.

* Update docs and changelog

* Fix adding `nonirri_returnflow` to overland flow

* Reset allocations and abstractions before update
Before updating surface water and groundwater allocations and abstractions reset to zero, so it is independent of the update at local and allocation area levels.

* Small fix unit `act_surfacewater_abst`

* Fix indexing `nonirri_returnflow` for river cells

* Compute `groundwater_demand` for all land cells
Water bodies were excluded in the computation of `groundwater_demand`.

* Simplify computation `groundwater_demand` local

* Adress review comment: replace `waterallocation` by `allocation`

* Adress review comment: replace `divide` by `bounded_divide`

* Adress review comment: extend tests Feddes reduction function

* Addres review comments: docs

* Adress review comment: rename variable `maximum_irrigation_depth`
Unit of this variable is mm/t so `maximum_irrigation_rate` is a better variable name. Also fixed a couple of typos in docs.

* Address remaining review comments

* Small docs improvements
* Stop using local JULIAUP_DEPOT_PATH

* Avoid error when override is already set
@JoostBuitink
Copy link
Contributor Author

Please ignore all changes in the src/ directory (I need to fix this still). These are inherited from (mainly) the recent water-demand updates. I included those to ensure all docs we aligned with the master branch when moving to quarto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants