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.
Issue addressed
Fixes #382
Explanation
For now this is a tentative to restructure the vertical part (ie soil erosion) of the sediment model.
General
The main features of the restructuration are:
SoilLoss struct
and a new sediment_flux.jl forOverlandFlowSediment
andRiverSediment
RiverGeometry
andLandGeometry
struct that contains cell properties such as width, slope, length, area etc to avoid defining and passing these parameters that can be common to many structs.TODO left:
Vertical: SoilLoss
The main features of the restructuration are:
AbstractRainfallErosionModel
(with three modelsNoRainfallErosionModel
,RainfallErosionEurosemModel
,RainfallErosionAnswersModel
),AbstractOverlandFlowModel
(with two modelsNoOverlandFlowErosionModel
,OverlandFlowAnswersModel
) andSoilErosionModel
which is in charge of summing erosion from the different sources (for now rainfall and overland flow but in the future we could add wind, mass wasting from landslide etc.) and differentiating for the different particle classes. Each struct is defined in its own script but the equations are in a common file (erosion_process.jl)SoilLoss
struct, timestep is passed directly to the update functions.TODO left:
Lateral.land: OverlandFlowSediment
The main features of the restructuration are:
TransportCapacityGoversModel
,TransportCapacityYalinModel
,TransportCapacityYalinDifferentiationModel
); a sediment_flux model for the overland flow transport with two equations for with/without particle differentiation and a to_river to summarize the sediment reaching the river (with/without particle differentiation).TODO left:
Lateral.river: River Sediment
I thought I would be able to split more but because we need the upstream to compute the downstream, I ended up with less structures than planned and still quite a large structure for the mass balances (that still include then erosion and deposition). In the end this means the construction looks similar to lateral.land so this may not be for the worst. I also could not easily separate the reservoirs into an extra struct so I left it as is in master.
The main features of the restructuration are:
TransportCapacityBagnoldModel
,TransportCapacityEngelundModel
,TransportCapacityYangModel
,TransportCapacityMolinasModel
,TransportCapacityKodatieModel
); a potential_river_erosion model to get the maximum allowed direct bed and bank erosion (for example in the future to use delwaq concept this could be turned into none allowed); a sediment_flux model for the river flow transport (mass balance from upstream to downstream including deposition and erosion); and a concentrations to convert loads to concentrations and get the suspended vs bed part.TODO left:
Particle
structTesting of this PR
Checklist
v1
Additional Notes (optional)
Add any additional notes or information that may be helpful.