Klasse SlimAlfaTransformer
- Alle implementierten Schnittstellen:
net.simplace.sim.util.FWSimFieldContainer
Extension of the SoilLayerTransformer that additionally calculates 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:
\[ \alpha_{ref}=\begin{cases} 1.0 & \text{when } clay \le 9.5 \\ 1.0271 - 0.000302(clay)^2 & \text{when } 9.5 \le clay \le 58.3 \\ 0 & \text{when } clay \ge 58.3 \end{cases} \]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.
\[ \alpha_{thick} \approx 2 \frac{ \frac{0.05}{thick}}{\frac{2}{\alpha_{ref}} - 1 + \frac{0.05}{thick}} \]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
| <transform id="soil_transform" interface="simpool" resource="soil" | class="net.simplace.sim.transformers.SlimAlfaTransformer" > | <header> | <res id="soiltype" datatype="CHAR" key="vSoiltype" /> | <res id="depth" unit="m" datatype="DOUBLEARRAY"/> | ... | <res id="drainagerate" unit="cm3*cm-3" datatype="DOUBLE"/> | ... | <res id="clay" unit="g/100g" datatype="DOUBLEARRAY"/> | <res id="nitrogen" unit="g/m^2" datatype="DOUBLEARRAY" mode="SUM"/> | | ... | <res id="SlimAlfaReference5cm" unit="" datatype="DOUBLEARRAY" /> | <res id="SlimAlfaUnbound" unit="" datatype="DOUBLEARRAY" /> | <res id="SlimAlfa" unit="" datatype="DOUBLEARRAY" /> | | </header> | <input id="depthfieldid">depth</input> | <input id="claypercentagefieldid">clay</input> | <input id="layercount" /> | <input id="layerthickness">0.03</input> | </transform>
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.
- Autor:
- Gunther Krauss
- Siehe auch:
Component Variables
| Content Type | Name | Description | Data Type | Unit | Min Value | Max Value | Default Value |
|---|---|---|---|---|---|---|---|
| constant | claypercentagefieldid | by default 'ClayPercentage' | CHAR | - | - | ClayPercentage | |
| constant | depthfieldid | - | CHAR | - | - | ||
| constant | layercount | Number of layers | INT | 1 | 200 | - | |
| constant | layerthickness | Thickness of layers - if layercount is given, thickness is ignored | DOUBLE | m | 1.0E-4 | 5.0 | 0.03 |
-
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, iSourceNameVon Klasse geerbte Felder net.simplace.sim.io.resources.FWSimInputAdapter
iJexlScript, iShouldCacheToDBVon Klasse geerbte Felder net.simplace.sim.io.FWSimIOAdapter
iArrayMode, iFieldcount, iFrequence, iHeaderVariables, iInterface, iJexlRule, iKeyMap, iName, iOrderNumber, iProcessTime, iResourceElement, iSession, iSourceKey -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungused for ClassForNameSlimAlfaTransformer(net.simplace.sim.FWSimSession aSession, Integer aOrderNumber) SlimAlfaTransformer(net.simplace.sim.FWSimSession aSession, org.jdom2.Element aResourceElement, Integer aOrderNumber) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungnet.simplace.sim.io.resources.FWSimResourceCachecalculateSlimAlfa(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 layerdoublegetAlfa(double clay, double thickness) net.simplace.sim.io.resources.FWSimResourceCachegetData(net.simplace.sim.util.FWSimVarMap aVarMap) standard method from outsidenet.simplace.sim.io.resources.FWSimResourceCachegetData(net.simplace.sim.util.FWSimVarMap aVarMap, net.simplace.sim.io.resources.FWSimResourceCache aResourceCache) used by test casesdoublegetReferenceAlfa(double clay) doublegetRescaledAlfa(double alfa, double thicknesssold, double thicknessnew) voidupdateFields(net.simplace.core.FWObservable aObservable) Von Klasse geerbte Methoden net.simplace.sim.io.resources.FWSimResourceTransformer
addVariable, createFormFields, createResourceTransformer, createResourceTransformer, createResourceTransformer, createSimTransformer, fillVarMap, getCreateFormXML, getEditFormXML, getSourceResourceCache, getVariable, isUpdated, toDocXML, toXMLVon Klasse geerbte Methoden net.simplace.sim.io.resources.FWSimInputAdapter
getContentType, getInputVariables, getJexlScript, getOutputVariables, getVarMap, isTransformer, shouldCacheToDB, toHTMLTablestringVon 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
-
Konstruktordetails
-
SlimAlfaTransformer
public SlimAlfaTransformer(net.simplace.sim.FWSimSession aSession, org.jdom2.Element aResourceElement, Integer aOrderNumber) - Parameter:
aSession-aResourceElement-aOrderNumber-
-
SlimAlfaTransformer
- Parameter:
aSession-aOrderNumber-
-
SlimAlfaTransformer
public SlimAlfaTransformer()used for ClassForName
-
-
Methodendetails
-
createVariables
- Angegeben von:
createVariablesin Schnittstellenet.simplace.sim.util.FWSimFieldContainer- Setzt außer Kraft:
createVariablesin Klassenet.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:
getDatain Klassenet.simplace.sim.io.resources.FWSimInputAdapter- Löst aus:
net.simplace.sim.exceptions.MissingSimResourceException- Siehe auch:
-
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 mapaResourceCache- 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 layersaLayerCount- total number of layersaDepthFieldName- name of the depth fieldaProjectID- id of the projectaCache- 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:
updateFieldsin Klassenet.simplace.sim.io.resources.FWSimResourceTransformer- Siehe auch:
-