net.simplace.client.simulation.lap.transformer.LayerAggregationTransformer

Aggregates values of a layer up to the specified maximal depth. It can compute the sum for absolute values (e.g. N content in g/m^2) It can compute the avg for relative values (as volumetric water content m^3/m^3) == Configuration == * idname - name of the field, that contains values \(V_i\) to aggregate * depthfieldname - name of the field, that contains the depth \(d_i\) (lower boundary) of each layer * maxdepthfield - name of the field, that contains the maximum depth \(m\), up to which values should be aggregated * method - aggregation method - currently only sum and avg are supported == Calculation details == The layerthickness is calculated as \(t_0=d_0\) and \(t_i = d_{i}-d_{i-1}\) for \(i>0\) As maxdepth can be smaller than the profile depth, for each layer the remaining depth is calculated \(r_i = max(m-d_{i-1},0)\), which is zero if the actual layer is completely below maxdepth. === Sum of absolute values === Values from all layers, that are above maxdepth are summed up. From the layer that contains maxdepth, only the fraction from the upper boundary to maxdepth is summed up. \(\sum_0^{n-1}V_i \frac{min(t_i,r)}{t_i}\) === Average of relative values === Absolute values for all layers are computed by multiplying relative values with layer thickness. From the layer that contains maxdepth, only the fraction from the upper boundary to maxdepth is summed up. Then the sum is divided by maxdepth (or the total depth, if maxdepth ecxeeds the profile). \(\frac{\sum_0^{n-1}V_i min(t_i,r)}{min(m,d_{n-1})}\)


public class LayerAggregationTransformer extends
net.simplace.simulation.io.resources.FWSimResourceTransformer {
// Public Constructors
public LayerAggregationTransformer(FWSimSession aSession, Element
aResourceElement, Integer aOrderNumber);
public LayerAggregationTransformer(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 void fillVarMap(FWSimVarMap aVarMap);
// Defines
net.simplace.simulation.io.resources.FWSimResourceTransformer


public FWSimResourceCache calculateAggregatedData(FWSimVariable idname,
FWSimVariable depthfield, FWSimVariable maxdepthfield, FWSimVariable
method, String aProjectID, FWSimResourceCache aCache)
throws MissingSimResourceException;


returns the transformed resource cache
public Element toXML(); // Defines
net.simplace.simulation.io.resources.FWSimResourceTransformer


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 - LayerAggregationTransformer