-
Notifications
You must be signed in to change notification settings - Fork 21
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
JoostBuitink
wants to merge
10
commits into
v1
Choose a base branch
from
v1_quarto_docs
base: v1
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Commits on Jul 17, 2024
-
Water demand and allocation in
sbm
model concept (#402)* 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
Configuration menu - View commit details
-
Copy full SHA for 4f8b156 - Browse repository at this point
Copy the full SHA 4f8b156View commit details -
Stop using local JULIAUP_DEPOT_PATH (#438)
* Stop using local JULIAUP_DEPOT_PATH * Avoid error when override is already set
Configuration menu - View commit details
-
Copy full SHA for 6a28144 - Browse repository at this point
Copy the full SHA 6a28144View commit details
Commits on Aug 15, 2024
-
Configuration menu - View commit details
-
Copy full SHA for d5c4e39 - Browse repository at this point
Copy the full SHA d5c4e39View commit details -
Configuration menu - View commit details
-
Copy full SHA for ba3c384 - Browse repository at this point
Copy the full SHA ba3c384View commit details -
Configuration menu - View commit details
-
Copy full SHA for b2ae786 - Browse repository at this point
Copy the full SHA b2ae786View commit details -
Configuration menu - View commit details
-
Copy full SHA for 991f8e8 - Browse repository at this point
Copy the full SHA 991f8e8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2742761 - Browse repository at this point
Copy the full SHA 2742761View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2667586 - Browse repository at this point
Copy the full SHA 2667586View commit details -
Configuration menu - View commit details
-
Copy full SHA for edf50c3 - Browse repository at this point
Copy the full SHA edf50c3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 609acaf - Browse repository at this point
Copy the full SHA 609acafView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.