Klasse SoilLayerTransformer

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

public class SoilLayerTransformer extends net.simplace.sim.io.resources.FWSimResourceTransformer
WIKI_START Distributes values of n layers of arbitrary thickness to m layers with uniform thickness. == Description == Original resolution is taken from an array that contains the depth of the lower boundary of each layer. The input `depthfieldid` is used to name the resource variable that contains the depth information. To to specify the output data resolution either the `layercount` or the `layerthickness` input can be set. If `layercount` is given, then `layerthickness` is ignored, otherwise `layercount` is calculated by dividing the maximum soil depth by the layerthickness. Output will be written as follows: Scalar variables like CHAR,DOUBLE,INT,... are kept as they are. Array variables (layers) like DOUBLEARRAY and INTARRAY are transformed to an array of `layercount` elements. There are different modes how to determine the values of the target layer: - CENTER - takes the value of the source layer that hits the center of target layer (default method) - FIRST - takes the value of the first source layer that overlaps with the target layer - LAST - takes the value of the last source layer that overlaps with the target layer For numeric values (DOUBLEARRAY and INTARRAY) there are two additional methods available - AVG - takes the weighted average of the overlapping source layers - SUM - takes the sum of overlapping source layers, multiplied by the proportion of their overlap === Notice === If the values of a variable are amounts and not proportions, then they have to be summed up / partitioned for the new layers. Therefore one has to supply the `mode` attribute for the specific variable: `mode="SUM"`. (If the source layer overlaps several target layers, then the source layer value is partitioned to the target layers, if the target layer overlaps several source layers, then the source layers are summed up for the target layer.) == Configuration == {{{
... ...
depth 0.03
}}} The variable `depth` contains the depth information for the initial layers, therefore the input `depthfieldid` is set to `depth`. 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`. Only those variables mentioned in the transformer will be transformed. WIKI_END
Autor:
Andreas Enders, Guther Krauss
Siehe auch:
  • 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
    SoilLayerTransformer(net.simplace.sim.FWSimSession aSession, Integer aOrderNumber)
     
    SoilLayerTransformer(net.simplace.sim.FWSimSession aSession, org.jdom2.Element aResourceElement, Integer aOrderNumber)
     
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    HashMap<String,net.simplace.sim.util.FWSimVariable<?>>
     
    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
    net.simplace.sim.io.resources.FWSimResourceCache
    resampleSoilLayers(net.simplace.sim.util.FWSimVariable<Double> aThicknessOfLayers, net.simplace.sim.util.FWSimVariable<Integer> aLayerCount, net.simplace.sim.util.FWSimVariable<String> aDepthFieldName, String aProjectID, net.simplace.sim.io.resources.FWSimResourceCache aCache)
    Rescales the soil layer
    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

    • SoilLayerTransformer

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

      public SoilLayerTransformer(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
    • resampleSoilLayers

      public net.simplace.sim.io.resources.FWSimResourceCache resampleSoilLayers(net.simplace.sim.util.FWSimVariable<Double> aThicknessOfLayers, net.simplace.sim.util.FWSimVariable<Integer> aLayerCount, net.simplace.sim.util.FWSimVariable<String> aDepthFieldName, 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)