Class PedotransferTransformer

java.lang.Object
net.simplace.sim.io.FWSimIOAdapter
net.simplace.sim.io.resources.FWSimInputAdapter
net.simplace.sim.io.resources.FWSimResourceTransformer
net.simplace.sim.transformers.PedotransferTransformer
All Implemented Interfaces:
net.simplace.sim.util.FWSimFieldContainer

public class PedotransferTransformer extends net.simplace.sim.io.resources.FWSimResourceTransformer

Takes data with

  • depth,
  • clay percentage,
  • silt percentage,
  • sand percentage (optional, default 100-(clay+silt)),
  • organic matter percentage (optional, default 0),
  • bulk density (optional, default 1.4),
  • top soil depth (optional, default 0.3 m),
  • pedotransfer function (optional, default 'Hypres'),
  • gravel percentage (optional, default 0)

in n soil layers and transforms it to Van Genuchten parameters alpha, l, m, n and Ks or Volumetric water contents.

Description

Soil data is mostly delivered with the layer specific information. The layers have different depth and are varying in their count. This Transformer takes the texture data with these n different depth layers and creates Van Genuchten and Volumetric Water Content data.

Array fields like DOUBLEARRAY for the different parameters. Depending on the fields that you put into the header the different fields are calculated.

Configuration

requested structure of configuration element:

| <transform id="soil_transform" resource="soil" source="vSoiltype" class="net.simplace.sim.transformers.PedotransferTransformer" >
|      <header>
|        <res id="soiltype" datatype="CHAR"  key="vSoiltype" />
|        <res id="depth" unit="m" datatype="DOUBLEARRAY"/>
|        <res id="VanGenuchtenAlpha" unit="m^-1" datatype="DOUBLEARRAY"/>
|        <res id="VanGenuchtenL" unit="1" datatype="DOUBLEARRAY"/>
|        <res id="VanGenuchtenM" unit="1" datatype="DOUBLEARRAY"/>
|        <res id="VanGenuchtenN" unit="1" datatype="DOUBLEARRAY"/>
|        <res id="SaturatedHydraulicConductivity" unit="m/s" datatype="DOUBLEARRAY"/>
|        <res id="VolumetricWaterContent0" unit="1" datatype="DOUBLEARRAY"/>
|        <res id="VolumetricWaterContent6" unit="1" datatype="DOUBLEARRAY"/>
|        <res id="VolumetricWaterContent33" unit="1" datatype="DOUBLEARRAY"/>
|        <res id="VolumetricWaterContent200" unit="1" datatype="DOUBLEARRAY"/>
|        <res id="VolumetricWaterContent1500" unit="1" datatype="DOUBLEARRAY"/>
|        <res id="VolumetricWaterContent3100" unit="1" datatype="DOUBLEARRAY"/>
|        <res id="VolumetricWaterContentResidual" unit="1" datatype="DOUBLEARRAY"/>
|        <res id="VolumetricWaterContent6to1500" unit="1" datatype="DOUBLEARRAY"/>
|        <res id="VolumetricWaterContent33to1500" unit="1" datatype="DOUBLEARRAY"/>
|        <res id="VolumetricWaterContent33Plus1500Half" unit="1" datatype="DOUBLEARRAY"/>
|
|        <res id="TopsoilVanGenuchtenAlpha" unit="m^-1" datatype="DOUBLE"/>
|        <res id="TopsoilVanGenuchtenL" unit="1" datatype="DOUBLE"/>
|        <res id="TopsoilVanGenuchtenM" unit="1" datatype="DOUBLE"/>
|        <res id="TopsoilVanGenuchtenN" unit="1" datatype="DOUBLE"/>
|        <res id="TopsoilSaturatedHydraulicConductivity" unit="m/s" datatype="DOUBLE"/>
|        <res id="TopsoilVolumetricWaterContent0" unit="1" datatype="DOUBLE"/>
|        <res id="TopsoilVolumetricWaterContent6" unit="1" datatype="DOUBLE"/>
|        <res id="TopsoilVolumetricWaterContent33" unit="1" datatype="DOUBLE"/>
|        <res id="TopsoilVolumetricWaterContent200" unit="1" datatype="DOUBLE"/>
|        <res id="TopsoilVolumetricWaterContent1500" unit="1" datatype="DOUBLE"/>
|        <res id="TopsoilVolumetricWaterContent3100" unit="1" datatype="DOUBLE"/>
|        <res id="TopsoilVolumetricWaterContentResidual" unit="1" datatype="DOUBLE"/>
|        <res id="TopsoilVolumetricWaterContent6to1500" unit="1" datatype="DOUBLE"/>
|        <res id="TopsoilVolumetricWaterContent33to1500" unit="1" datatype="DOUBLE"/>
|        <res id="TopsoilVolumetricWaterContent33Plus1500Half" unit="1" datatype="DOUBLE"/>
|
|        <res id="InterflowVanGenuchtenAlpha" unit="m^-1" datatype="DOUBLE"/>
|        <res id="InterflowVanGenuchtenL" unit="1" datatype="DOUBLE"/>
|        <res id="InterflowVanGenuchtenM" unit="1" datatype="DOUBLE"/>
|        <res id="InterflowVanGenuchtenN" unit="1" datatype="DOUBLE"/>
|        <res id="InterflowSaturatedHydraulicConductivity" unit="m/s" datatype="DOUBLE"/>
|        <res id="InterflowVolumetricWaterContent0" unit="1" datatype="DOUBLE"/>
|        <res id="InterflowVolumetricWaterContent6" unit="1" datatype="DOUBLE"/>
|        <res id="InterflowVolumetricWaterContent33" unit="1" datatype="DOUBLE"/>
|        <res id="InterflowVolumetricWaterContent200" unit="1" datatype="DOUBLE"/>
|        <res id="InterflowVolumetricWaterContent1500" unit="1" datatype="DOUBLE"/>
|        <res id="InterflowVolumetricWaterContent3100" unit="1" datatype="DOUBLE"/>
|        <res id="InterflowVolumetricWaterContentResidual" unit="1" datatype="DOUBLE"/>
|        <res id="InterflowVolumetricWaterContent6to1500" unit="1" datatype="DOUBLE"/>
|        <res id="InterflowVolumetricWaterContent33to1500" unit="1" datatype="DOUBLE"/>
|        <res id="InterflowVolumetricWaterContent33Plus1500Half" unit="1" datatype="DOUBLE"/>
|
|      </header>
|      <input id="pedotransferfunction">Hypres</input> ... until now only Hypres and Rawls - default to Hypres
|      <input id="topsoildepth">0.3</input> ... in m, default to 0.3
|      <input id="interflowdepth">0.3</input> ... in m, default to 0.3
|      <input id="depthfieldid">depth</input> ... or ...
|      <input id="depth">{0.05,0.3,0.6,1.0,1.5}</input>
| </transform>

Please note: Only columns, where the column names have been added to the header of the resource definition are added. The range of the fields is free. The id's meanwhile are fixed and necessary. If additional columns are added they are directly taken from the source and not touched. Resource "soil" needs the following fields:

  • BulkDensity in g/cm3 (optional, default to 1.4)
  • GravelPercentage in g/g * 100 (optional, default to 0)
  • OrganicPercentage in g/g * 100 (optional, default to 0

One of those is optional and will be calculated from the others. Sum of the three fractions has to be 100!

  • SandPercentage in g/g * 100
  • SiltPercentage in g/g * 100
  • ClayPercentage in g/g * 100
Author:
Andreas Enders

Component Variables

Content TypeNameDescriptionData TypeUnitMin ValueMax ValueDefault Value
constantbulkdensityfieldidby default 'BulkDensity'CHAR--BulkDensity
constantclaypercentagefieldidby default 'ClayPercentage'CHAR--ClayPercentage
constantdepthby default 'depth'DOUBLEARRAY---
constantdepthfieldidby default 'depth'CHAR--depth
constantgravelpercentagefieldidby default 'GravelPercentage'CHAR--GravelPercentage
constantinterflowdepthinterflow zone depth in m, default 0.3DOUBLEm0.05.00.03
constantorganicpercentagefieldidby default 'OrganicPercentage'CHAR--OrganicPercentage
constantpedotransferfunctionChoose from existing functions: default 'Hypres'CHAR--Hypres
constantsandpercentagefieldidby default 'SandPercentage'CHAR--SandPercentage
constantsiltpercentagefieldidby default 'SiltPercentage'CHAR--SiltPercentage
constanttopsoildepthtopsoil depth in m, default 0.3DOUBLEm1.0E-45.00.03
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.simplace.sim.io.FWSimIOAdapter

    net.simplace.sim.io.FWSimIOAdapter.FREQUENCE
  • Field Summary

    Fields inherited from class net.simplace.sim.io.resources.FWSimResourceTransformer

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

    Fields inherited from class net.simplace.sim.io.resources.FWSimInputAdapter

    iJexlScript, iShouldCacheToDB

    Fields inherited from class net.simplace.sim.io.FWSimIOAdapter

    iArrayMode, iFieldcount, iFrequence, iHeaderVariables, iInterface, iJexlRule, iKeyMap, iName, iOrderNumber, iProcessTime, iResourceElement, iSession, iSourceKey
  • Constructor Summary

    Constructors
    Constructor
    Description
    used for ClassForName
    PedotransferTransformer(net.simplace.sim.FWSimSession aSession, Integer aOrderNumber)
     
    PedotransferTransformer(net.simplace.sim.FWSimSession aSession, org.jdom2.Element aResourceElement, Integer aOrderNumber)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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
    void
    updateFields(net.simplace.core.FWObservable aObservable)
     

    Methods inherited from class net.simplace.sim.io.resources.FWSimResourceTransformer

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

    Methods inherited from class net.simplace.sim.io.resources.FWSimInputAdapter

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

    Methods inherited from class 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

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PedotransferTransformer

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

      public PedotransferTransformer(net.simplace.sim.FWSimSession aSession, Integer aOrderNumber)
      Parameters:
      aSession -
      aOrderNumber -
    • PedotransferTransformer

      public PedotransferTransformer()
      used for ClassForName
  • Method Details

    • createVariables

      public HashMap<String,net.simplace.sim.util.FWSimVariable<?>> createVariables()
      Specified by:
      createVariables in interface net.simplace.sim.util.FWSimFieldContainer
      Overrides:
      createVariables in class 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
      Specified by:
      getData in class net.simplace.sim.io.resources.FWSimInputAdapter
      Throws:
      net.simplace.sim.exceptions.MissingSimResourceException
      See Also:
      • 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
      Parameters:
      aVarMap - variable map
      aResourceCache - Cached resources (soil data)
      Returns:
      delivered new data from transformer
      Throws:
      net.simplace.sim.exceptions.MissingSimResourceException
    • updateFields

      public void updateFields(net.simplace.core.FWObservable aObservable)
      Specified by:
      updateFields in class net.simplace.sim.io.resources.FWSimResourceTransformer