Klasse SlimAlfaTransformer

java.lang.Object
net.simplace.sim.io.FWSimIOAdapter
net.simplace.sim.io.resources.FWSimInputAdapter
net.simplace.sim.io.resources.FWSimResourceTransformer
net.simplace.sim.transformers.SlimAlfaTransformer
Alle implementierten Schnittstellen:
net.simplace.sim.util.FWSimFieldContainer

public class SlimAlfaTransformer extends net.simplace.sim.io.resources.FWSimResourceTransformer
WIKI_START Extension of the !SoilLayerTransformer that calculates additionally the parameter ALFA for !SlimWater model. == Description == For rescaling layers see the description of the !SoilLayerTransformer. Here we add only information regarding the additional calculation of !SlimAlfa. The parameter ALFA is used by !SlimWater to determine the fraction of mobile water that moves from one layer to the next layer. It can be derived from clay content (in %) by the empirical formula from Addiscott and Whitmore: WIKI_END \[ \alpha_{ref}=\begin{cases} 1.0 Ungültige Eingabe: "&" \text{when } clay \le 9.5 \\ 1.0271 - 0.000302(clay)^2 Ungültige Eingabe: "&"\text{when } 9.5 \le clay \le 58.3 \\ 0 Ungültige Eingabe: "&"\text{when } clay \ge 58.3 \end{cases} \] WIKI_START This formula is valid for a layer thickness of 5cm=0.05m. For different layer thickness, the ALFA should be rescaled because otherwise the seeping will be underestimated for thinner layers and overestimated for thicker layers compared to 5cm. Actually the ALFA depends on the number of layers, but if the number of layers is above 6, then one can simplify the rescaling formula and make it dependend only on the layer thickness `thick` (in meter) of the transformed layers. WIKI_END \[ \alpha_{thick} \approx 2 \frac{ \frac{0.05}{thick}}{\frac{2}{\alpha_{ref}} - 1 + \frac{0.05}{thick}} \] WIKI_START This transformer takes the `ClayPercentage` values for each layer, calculates the reference ALFA for 5 cm (`SlimAlfaReference5cm`), the unbound rescaled ALFA (`SlimAlfaUnbound`) for the thickness of transformed layers and the ALFA that limits the unbound rescaled ALFA (`SlimAlfa`) to values between 0 and 1 by setting higher values to 1. === Notice === Changing layer thickness in SLIM has an impact on the results. Using a rescaled ALFA tries to maintain the overall soil water content and seeping at comparable ranges. There is also an interaction with the aliquot WALIQ which may lead to bigger differences especially on days with high rainfall. As !SlimWater moves the mobile water in two steps, it uses in each step ALFA/2. For thinner layers the required ALFA could then be above 1. Nevertheless, !SlimWater has not been specified to use ALFA values bigger than 1, although it might work technically. The transformer delivers therefore the unbound rescaled ALFA which could be higher than 1, as well as the ALFA limited to 1. So the user may decide, which ALFA to use in !SlimWater. Rescaling ALFA does not solve the problem of changing the layer thickness, but it may mitigate it. == Configuration == {{{
... ... ...
depth clay 0.03
}}} The variable `depth` contains the depth information for the initial layers, therefore the input `depthfieldid` is set to `depth`. The variable `clay` contains the clay information for the initial layers, therefore the input `claypercentagefieldid` is set to `clay`. Scalar values like `drainagerate` are not transformed, they are just passed unchanged to the transformer's output. The variable `nitrogen` contains amounts (absolute values), therefore the values from overlapping layers have to be summed up / partitioned. The resource variables to be transformed have to be all in the transformed resource `soil` except `SlimAlfaReference5cm`, `SlimAlfaUnbound`, `SlimAlfa`. Only those variables mentioned in the transformer will be transformed. ==References:== - Addiscott, T.M., Heys, P.J., Whitmore, A.P., 1986. Application of simple leaching models in heterogeneous soils. Geoderma 38, 185-194. - Addiscott, T.M., Whitmore, A.P., 1991. Simulation of solute leaching in soils with different permeabilities. Soil Use Manage. 7, 94-102. WIKI_END
Autor:
Gunther Krauss
  • Verschachtelte Klassen - Übersicht

    Von Klasse geerbte verschachtelte Klassen/Schnittstellen net.simplace.sim.io.FWSimIOAdapter

    net.simplace.sim.io.FWSimIOAdapter.FREQUENCE
  • Feldübersicht

    Von Klasse geerbte Felder net.simplace.sim.io.resources.FWSimResourceTransformer

    iFieldMap, iIntColumnMap, iLastInputValuesMap, iLastProjectID, iLastUniqueID, iPoolName, iSourceName

    Von Klasse geerbte Felder net.simplace.sim.io.resources.FWSimInputAdapter

    iJexlScript, iShouldCacheToDB

    Von Klasse geerbte Felder net.simplace.sim.io.FWSimIOAdapter

    iArrayMode, iFieldcount, iFrequence, iHeaderVariables, iInterface, iJexlRule, iKeyMap, iName, iOrderNumber, iProcessTime, iResourceElement, iSession, iSourceKey
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    SlimAlfaTransformer(net.simplace.sim.FWSimSession aSession, Integer aOrderNumber)
     
    SlimAlfaTransformer(net.simplace.sim.FWSimSession aSession, org.jdom2.Element aResourceElement, Integer aOrderNumber)
     
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    net.simplace.sim.io.resources.FWSimResourceCache
    calculateSlimAlfa(net.simplace.sim.util.FWSimVariable<Double> aThicknessOfLayers, net.simplace.sim.util.FWSimVariable<Integer> aLayerCount, net.simplace.sim.util.FWSimVariable<String> aDepthFieldName, net.simplace.sim.util.FWSimVariable<String> aClayFieldName, String aProjectID, net.simplace.sim.io.resources.FWSimResourceCache aCache)
    Rescales the soil layer
    HashMap<String,net.simplace.sim.util.FWSimVariable<?>>
     
    double
    getAlfa(double clay, double thickness)
     
    net.simplace.sim.io.resources.FWSimResourceCache
    getData(net.simplace.sim.util.FWSimVarMap aVarMap)
    standard method from outside
    net.simplace.sim.io.resources.FWSimResourceCache
    getData(net.simplace.sim.util.FWSimVarMap aVarMap, net.simplace.sim.io.resources.FWSimResourceCache aResourceCache)
    used by test cases
    double
    getReferenceAlfa(double clay)
     
    double
    getRescaledAlfa(double alfa, double thicknesssold, double thicknessnew)
     
    void
    updateFields(net.simplace.core.FWObservable aObservable)
     

    Von Klasse geerbte Methoden net.simplace.sim.io.resources.FWSimResourceTransformer

    addVariable, createFormFields, createResourceTransformer, createResourceTransformer, createResourceTransformer, fillVarMap, getCreateFormXML, getEditFormXML, getSourceResourceCache, getVariable, isUpdated, toXML

    Von Klasse geerbte Methoden net.simplace.sim.io.resources.FWSimInputAdapter

    getContentType, getInputVariables, getJexlScript, getOutputVariables, getVarMap, isTransformer, shouldCacheToDB, toHTMLTablestring

    Von Klasse geerbte Methoden net.simplace.sim.io.FWSimIOAdapter

    addProcessTime, checkCondition, createFormFields, finalize, getFieldMap, getFrequence, getHeaderVariables, getHeaderXML, getInterface, getJexlRule, getKeyMap, getName, getOrderNumber, isArrayMode, isConditionCheck, removeVariable, setInterface, setOrderNumber, toString, writeHeaderList

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Konstruktordetails

    • SlimAlfaTransformer

      public SlimAlfaTransformer(net.simplace.sim.FWSimSession aSession, org.jdom2.Element aResourceElement, Integer aOrderNumber)
      Parameter:
      aSession -
      aResourceElement -
      aOrderNumber -
    • SlimAlfaTransformer

      public SlimAlfaTransformer(net.simplace.sim.FWSimSession aSession, Integer aOrderNumber)
      Parameter:
      aSession -
      aOrderNumber -
  • Methodendetails

    • createVariables

      public HashMap<String,net.simplace.sim.util.FWSimVariable<?>> createVariables()
      Angegeben von:
      createVariables in Schnittstelle net.simplace.sim.util.FWSimFieldContainer
      Setzt außer Kraft:
      createVariables in Klasse net.simplace.sim.io.FWSimIOAdapter
    • getData

      public net.simplace.sim.io.resources.FWSimResourceCache getData(net.simplace.sim.util.FWSimVarMap aVarMap) throws net.simplace.sim.exceptions.MissingSimResourceException
      standard method from outside
      Angegeben von:
      getData in Klasse net.simplace.sim.io.resources.FWSimInputAdapter
      Löst aus:
      net.simplace.sim.exceptions.MissingSimResourceException
      Siehe auch:
      • FWSimInputAdapter.getData(net.simplace.sim.util.FWSimVarMap)
    • getData

      public net.simplace.sim.io.resources.FWSimResourceCache getData(net.simplace.sim.util.FWSimVarMap aVarMap, net.simplace.sim.io.resources.FWSimResourceCache aResourceCache) throws net.simplace.sim.exceptions.MissingSimResourceException
      used by test cases
      Parameter:
      aVarMap - variable map
      aResourceCache - Cached resources (soil data)
      Gibt zurück:
      delivered new data from transformer
      Löst aus:
      net.simplace.sim.exceptions.MissingSimResourceException
    • getReferenceAlfa

      public double getReferenceAlfa(double clay)
    • getRescaledAlfa

      public double getRescaledAlfa(double alfa, double thicknesssold, double thicknessnew)
    • getAlfa

      public double getAlfa(double clay, double thickness)
    • calculateSlimAlfa

      public net.simplace.sim.io.resources.FWSimResourceCache calculateSlimAlfa(net.simplace.sim.util.FWSimVariable<Double> aThicknessOfLayers, net.simplace.sim.util.FWSimVariable<Integer> aLayerCount, net.simplace.sim.util.FWSimVariable<String> aDepthFieldName, net.simplace.sim.util.FWSimVariable<String> aClayFieldName, String aProjectID, net.simplace.sim.io.resources.FWSimResourceCache aCache) throws net.simplace.sim.exceptions.MisconfiguredTransformerException
      Rescales the soil layer
      Parameter:
      aThicknessOfLayers - thickness of the layers
      aLayerCount - total number of layers
      aDepthFieldName - name of the depth field
      aProjectID - id of the project
      aCache - original soil info stored
      Gibt zurück:
      the new created FWSimResourceCache
      Löst aus:
      net.simplace.sim.exceptions.MisconfiguredTransformerException
    • updateFields

      public void updateFields(net.simplace.core.FWObservable aObservable)
      Angegeben von:
      updateFields in Klasse net.simplace.sim.io.resources.FWSimResourceTransformer
      Siehe auch:
      • FWSimResourceTransformer.updateFields(net.simplace.core.FWObservable)