net.simplace.client.simulation.lap.transformer.SoilLayerTransformer

Takes data with n depth depended layers and creates m layers with the same information

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 data with these n different depth layers and creates layercount layers data with uniform thickness.

Either the layercount or the layerthickness can be defined to specify the output data resolution. The depthfield signifies the source field id with the depth information. Default is depth.

Output will be written as follows: Scalar field types like CHAR,DOUBLE,INT,... are kept as they are Array fields like DOUBLEARRAY and INTARRAY are transformed to the new array size concerning to layercount or layerthickness

Configuration

requested structure of configuration element:

<transform id="soil_transform" interface="simpool" resource="soil" source="vSoiltype"
class="net.simplace.client.simulation.lap.transformer.SoilLayerTransformer" >
<header>
<res id="soiltype" datatype="CHAR"  key="vSoiltype" />
<res id="dampingdepth" unit="m" datatype="DOUBLE"/>
<res id="soilwater_fc_global" unit="cm3*cm-3" datatype="DOUBLE"/>
...
<res id="clay" unit="g/100g" datatype="DOUBLEARRAY"/>
<res id="carbon" unit="g/100g" datatype="DOUBLEARRAY"/>
</header>
<input id="layercount" />
<input id="layerthickness">0.03</input>
<input id="depthfieldid">depth</input>
</transform>



public class SoilLayerTransformer extends
net.simplace.simulation.io.resources.FWSimResourceTransformer {
// Public Constructors
public SoilLayerTransformer(FWSimSession aSession, Element aResourceElement,
Integer aOrderNumber);
public SoilLayerTransformer(FWSimSession aSession, Integer aOrderNumber);


// Public Instance Methods
public HashMap createVariables(); // Defines
net.simplace.simulation.io.FWSimIOAdapter


public FWSimResourceCache getData(FWSimVarMap aVarMap)
throws MissingSimResourceException; // Defines
net.simplace.simulation.io.resources.FWSimInputAdapter


standard method from outside
public FWSimResourceCache getData(FWSimVarMap aVarMap, FWSimResourceCache
aResourceCache) throws MissingSimResourceException;

used by test cases
returns delivered new data from transformer
public FWSimResourceCache reScaleSoilLayers(FWSimVariable aThicknessOfLayers,
FWSimVariable aLayerCount, FWSimVariable aDepthFieldName, String
aProjectID, FWSimResourceCache aCache)
throws MissingSimResourceException;

Rescales the soil layer
returns the new created {@link FWSimResourceCache}
public void updateFields(FWObservable aObservable);
// Defines
net.simplace.simulation.io.resources.FWSimResourceTransformer




}



Hierarchy: java.lang.Object - net.simplace.simulation.io.FWSimIOAdapter (net.simplace.simulation.util.FWSimFieldContainer) - net.simplace.simulation.io.resources.FWSimInputAdapter - net.simplace.simulation.io.resources.FWSimResourceTransformer - SoilLayerTransformer