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

Remove vertical concepts HBV and FLEXTopo #433

Merged
merged 8 commits into from
Jul 1, 2024
Merged

Remove vertical concepts HBV and FLEXTopo #433

merged 8 commits into from
Jul 1, 2024

Conversation

verseve
Copy link
Member

@verseve verseve commented Jun 24, 2024

Issue addressed

Fixes #431

@verseve verseve self-assigned this Jun 24, 2024
@verseve verseve linked an issue Jun 24, 2024 that may be closed by this pull request
Copy link
Contributor

@JoostBuitink JoostBuitink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, just one minor typo

docs/src/model_docs/shared_concepts.md Outdated Show resolved Hide resolved
Co-authored-by: JoostBuitink <[email protected]>
@verseve verseve merged commit de91ed9 into v1 Jul 1, 2024
9 of 10 checks passed
@verseve verseve deleted the vertical_concepts branch July 18, 2024 14:39
verseve added a commit that referenced this pull request Nov 4, 2024
* Remove vertical concepts `HBV` and `FLEXTopo` (#433)

* Remove vertical concept `FLEXTopo`

* Remove vertical concept `HBV`

* Update download test data for build

* Cleanup docs
Removed `HBV` and `FLEXTopo` concepts.

* Removed code related to `FLEXTopo`
Use of extra dim `classes`.

* Remove and change river and land `inwater` functions
As a result of removing `HBV` and `FLEXTopo` concepts.

* Update changelog

* Fix typo in docs

Co-authored-by: JoostBuitink <[email protected]>

---------

Co-authored-by: JoostBuitink <[email protected]>

* Cleanup metadata macros (#434)

* Cleanup metadata structs
Remove `exchange`, `grid_type` and `grid_location` from metadata structs.  `grid_type` is not required, it is already implemented as part of BMI. `exhange` and `grid_location` are now implemented without the use of the FieldMetadata package.

* Update changelog

* Fix `exchange` function for `ShallowWaterLand`

* Add tests

* Move `exchange` and `grid_location` functions
To file bmi.jl as these functions are quite specific to BMI functionality.

* Add `v1` branch to CI

* Refactor/style guide (#437)

* Add configuration file for Julia Formatter

* Add format on save in vscode settings file

* Remove .vscode from gitignore

* Format all Julia files

* Sync wflow's style guide with ribasim's style guide

* Update formatting

* Update .vscode/settings.json

* Remove outdated comments

* Add workaround for VS Code bugs

* WIP: refactor `SBM` interception

* WIP: add `AtmosphericForcing` to store meteo input

* WIP: remove unused type parameter `A` from `SBM`

* WIP: add `RutterInterceptionModel`

* WIP: refactor `SBM` snow

* Stop using local JULIAUP_DEPOT_PATH (#438) (#440)

* Stop using local JULIAUP_DEPOT_PATH

* Avoid error when override is already set

Co-authored-by: Martijn Visser <[email protected]>

* WIP: refactor `SBM` glacier

* WIP: introduce types `NoSnowModel` and `NoGlacierModel`

* WIP:  `model` in `update` functions and add wrapper methods
In `update` functions use `model` for interception, snow and glacier models. Add wrapper methods for snow runoff and glacier melt.

* WIP: start refactor soil model of `SBM` (initialization)

* Update of `SBM` soil model (until recharge)

* Update run of refactored sbm concept (sbm_model)
This is with kinematic wave routing. Renamed the model for `SBM` from `soil` to `bucket` as it is more related to this type of model (Simple Bucket Model) than a soil model that for example solves the Richards equation for the unsaturated zone and upper part of the saturated zone.

* Delete `soil` folder

* Add `SBM` functions to seperate file (bucket_process.jl)
Also removed the vertical_process.jl file.

* Add water demand functionality

* Rename `vegetation_parameters` to `vegetation_parameter_set`

* Fix test Wflow ZMQ Server

* Refactor update of `LandHydrologySBM`
Add water demand and allocation, and snow transport computations.

* Further refactor of update `LandHydrologySBM`
Add separate functions to update the boundary conditions of the snow and `SBM` models.

* Rename `bucket` to `soil` and add `SurfaceRunoff` model
In addition:
- add a parameter set for LandParameters (to share accross model components).
- make use of type NamedTuple (for external models) in the update of models and boundary conditions, these external models provide input to the models and boundary conditions.
- move shared parameters (vegetation and land) to file Parameters.jl.

* Include `atmospheric_forcing` as a separate argument
In update of models and boundaries of `LandHydrologySBM`

* Remove land_parameter_set
It only contains two parameters that are not shared that much across different models of `LandHydrologySBM`.

* Rename outer constructors and couple of structs
Use the struct name for outer constructor functions.

* Add parameter `soil_fraction` to `SbmSoilParameters`

* Move function for `soil_fraction` to soil.jl

* Rename model  type `SurfaceRunoff` to `OpenWaterRunoff`

* Refactor water demand
For more efficient and cleaner code: 1) Support dispatching on types that represent non-existent Demand (e.g. NoDemand) or Allocation (e.g. NoAllocationLand) models is supported. 2) Add more wrapper functions to access variables of water demand and allocation structs.

* Move runoff,jl to separate folder

* Refactor update `SbmSoilModel`
Add functions for different processes that are part of the `SbmSoilModel` to improve code readability.

* Use types for hydraulic conductivity profiles
And reduce allocations.

* Rename `surface_water_flux` to `water_flux_surface`

* Small updates

* Boundary conditions `SbmSoilModel`
Change computation of `water_flux_surface` and `potential_soilevaporation` to represent fluxes for actual soil boundary by moving paddy evaporation and infiltration to the `update_boundary_conditions!` function.

* FIx some non-concrete types

* Delete log.txt file

* Refactor water demand
Split structs into variables and parameters and moved demand variables of `AllocationLand` to `Demand`.

* Add docstrings to snow model

* Add docstrings glacier model

* Add docstrings canopy and rename `interception_flux` variable

* Add docstrings open water runoff model

* Add docstrings SBM soil model

* Add docstrings water demand
And group structs and associated functions.

* Add comment about metadata and BMI (Wflow.jl)

* Add docstrings to vegetation parameters

* Add docstrings atmospheric forcing

* Cleanup metadata `get_units` and `grid_loc`
Only specify for variables that are exposed by BMI. Additionally added docstrings for `LandHydrologySBM` and simplified initialization of `LandHydrologySBM`.

* Update docstrings and comments

* Fix ZMQ Server tests

* Ksat_profile tests from PR #474
So we can close PR #474 as the fix is already part if this branch.

* Update changelog

* Update docstrings

* Add variable `snow_melt` to `SnowVariables`

* Update changelog

* Format Wflow.jl

* Suggestions from code review for water_demand

Co-authored-by: Bart de Koning <[email protected]>

* Address remaining review comments water_demand

* Remaining suggestions from code review

Co-authored-by: Bart de Koning <[email protected]>

* Address review comments
Simplify external constructors.

* Address review comment
Rewrite without explicit loop.

* Address review comment and bug fix
-Use consistently `!` for functions that are mutating, and return always  `nothing` for these functions.
- Fix missing `canonicalize` from `Dates`

* Fix typo

Co-authored-by: JoostBuitink <[email protected]>

* Address remaining comments 2nd reviewer

* Fix wflow server tests

* Revert back to using `isnothing`
As of Julia 1.7 there is no difference and `isnothing` is also used in other code sections.

---------

Co-authored-by: JoostBuitink <[email protected]>
Co-authored-by: Carlos Fernando Baptista <[email protected]>
Co-authored-by: Martijn Visser <[email protected]>
Co-authored-by: Bart de Koning <[email protected]>
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.

Remove vertical concepts HBV and FLEXTopo
2 participants