Skip to content

TODO multilayersoil

TODOs for getting a SurEau-Ecos version that is independent of the number of soil layers

Input and parameterization

  • get rid of input parameters like depth1, depth2, depth3 and instead make it one parameter whose length determines the amount of layers, e.g. "depth;0.2;0.5;1" indicating 3 layers of lengths 0.2, 0.5, and 1 meters, respectively
  • instead of vegetation and soil parameter files (.csv) as inputs, it would be easier to each have a function that contains all default parameters and where you can adjust the ones needed, e.g. soil_paras(depth=c(0.2,0.5,1), n_vg=c(1.1,1.5,1), Kat_vg=30, RFC=c(0.3,0.6,0.5), ...). parameters will either have to be the length of the amount of layers or 1 (in which case they are recycled)

Initialisation and state handling

  • create an object that contains all important model data (options, parameters, state variables, contingency table, ...)
  • make object a closure that can be given to functions, so state variables will be mutable and can be edited inside other functions. this is important to separate soil and plant functions
  • enable sureau to start with initial conditions, i.e. import a previous model state to continue with
  • enable sureau to export the model state

Output

  • flexible output independent of number of soil layers, e.g. fluxSoilToStem1_mm, ...2, ... fluxSoilToStemN_mm and other output columns

Soil functions

  • vectorization-compatible functions (i.e. in functionsWBsoil.R) to flexibly work with any amount of rows in WBsoil (i.e. soil layers)
    • functionsWBsoil.R
    • create.soil.parameters.R
  • full richards(on)
    • incorporate capillary uptake
    • account for excess water when theta>1, e.g. in pptSoil to let it re-infiltrate when possible or re-allocate to different soil layer. what about ponding water at the surface when no surface runoff exists? this will introduce too much infiltration, especially in heavy rainfall events.
  • introduce a lower boundary condition to account for a (fully) saturated bottom layer, e.g. groundwater that can also influence above soil layers through capillary uptake
    • temporary workaround: set specific layer(s) to field capacity with set_SWCtoFieldCapacity_WBsoil()
    • add a real boundary condition, e.g. water potential at boundary

Plant functions

  • root water uptake via beta root profile to work with any amount of layers
  • fluxes of each soil layer to stem
  • solve issue when plant is disconnected from a specific soil layer (conductance=0), this case is desired to be possible, but division by 0 needs to be dealt with

misc

  • check "TODO:" tags in the R files to solve additional TODOs
  • proper documentation, examples and unit tests
  • compare results to main branch and ensure identical outputs (rounded results to specific digits suffice)
Edited by Gregor Rickert