Commit 21274f33 authored by jouke's avatar jouke
Browse files

Adding an idea about carbon stress factors.

parent 86cdd920
Loading
Loading
Loading
Loading
+1 −20
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright © 2016, The Pennsylvania State University
All rights reserved.

Copyright © 2016 Forschungszentrum Jülich GmbH
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted under the GNU General Public License v3 and provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

Disclaimer
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

You should have received the GNU GENERAL PUBLIC LICENSE v3 with this file in license.txt but can also be found at http://www.gnu.org/licenses/gpl-3.0.en.html

 -->
<?xml-stylesheet type="text/xsl" href="XML/treeview.xsl"?>
<SimulationModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:noNamespaceSchemaLocation="https://rootmodels.gitlab.io/opensimroot/XML/SimulaXMLSchema.xsd">
	<SimulaBase name="soil">
@@ -40,7 +22,6 @@ You should have received the GNU GENERAL PUBLIC LICENSE v3 with this file in lic
		</SimulaBase>
	</SimulaBase>
	
	
	<SimulaIncludeFile fileName="plantParameters/Squash/default/simulationControlParameters.xml"/>
	<SimulaIncludeFile fileName="templates/plantTemplateFullModel.xml"/>
	<SimulaIncludeFile fileName="environments/Rocksprings/Rocksprings-maize.xml"/>
@@ -49,7 +30,7 @@ You should have received the GNU GENERAL PUBLIC LICENSE v3 with this file in lic
	<SimulaIncludeFile fileName="templates/plantTemplate.IncludeGeometry.xml" />
	<SimulaIncludeFile fileName="templates/plantTemplate.IncludeDryweight.xml" />

	<SimulaIncludeFile fileName="templates/plantTemplate.IncludePhosphorusBC.xml" />
	<!-- SimulaIncludeFile fileName="templates/plantTemplate.IncludePhosphorusBC.xml" /-->
	<!--SimulaIncludeFile fileName="templates/plantTemplate.IncludePhosphorus3D.xml" /-->
	<SimulaIncludeFile fileName="templates/plantTemplate.IncludeNitrateBasic.xml"/>
	<!--SimulaIncludeFile fileName="templates/plantTemplate.IncludeWaterModule.xml"/>
+3 −14
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>

<!-- Simulation file for SimRoot version 5. This development version, build 
	July 2007 Author: Jouke Postma Note: PLEASE KEEP THIS HEADER UP TO DATE! 
	LIST BELOW WHO YOU ARE, WHEN AND WHAT CHANGES YOU MADE AND WHY. LIST YOUR 
	SOURCE AS MUCH AS POSSIBLE! change log: 11-july-07 added support for include 
	files. -->
<!--STYLE SHEET SECTION: feel free to attach any stylesheet of your choosing -->
<!--?xml-stylesheet type="text/xsl" href="tree-view2.xsl"? -->


<!--SIMULATION MODEL -->
<SimulationModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:noNamespaceSchemaLocation="https://rootmodels.gitlab.io/opensimroot/XML/SimulaXMLSchema.xsd"
<SimulationModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
	xsi:noNamespaceSchemaLocation="https://rootmodels.gitlab.io/opensimroot/XML/SimulaXMLSchema.xsd"
    defaultStartingTimeStep="0.2"
	synchronizationTimeStep="0.2" 
	defaultMaximumTimeStep="0.2"
@@ -37,8 +27,7 @@
	<SimulaIncludeFile fileName="templates/plantTemplateFullModel.xml" />
	<SimulaIncludeFile fileName="templates/plantTemplate.IncludeGeometry.xml" />
	<SimulaIncludeFile fileName="templates/plantTemplate.IncludeDryweight.xml" />
	<!--SimulaIncludeFile fileName="templates/plantTemplate.IncludePhosphorusBC.xml" 
		/ -->
	<!--SimulaIncludeFile fileName="templates/plantTemplate.IncludePhosphorusBC.xml"/ -->
	<!-- If leaving out water and nitrate, enable this to have a rough estimate 
		of carbon cost of nitrate fixation and uptake -->
	<!-- SimulaIncludeFile fileName="templates/plantTemplate.IncludeNitrateBasic.xml" 
+93 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>

<!-- todo this is an example for including a carbon stress factor in squash. This runs extremely slow, and is currently not usuable -->

<SimulationModelIncludeFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:noNamespaceSchemaLocation="https://rootmodels.gitlab.io/opensimroot/XML/SimulaXMLSchema.xsd">

	<SimulaDirective path="/plantTemplate">
		<SimulaBase name="carbon">
			<SimulaDerivative name="stressFactor" unit="100%"
				function="useFormula" >
		    <SimulaConstant name="formula" type="string">
		    <!--  2 * max((carbonReserves-0.43*((0.06/(1-0.06)*(shootDryWeight)+(percentSugarInStorageRoots/(1-percentSugarInStorageRoots))*(rootDryWeight_storageRoots+storageRootStarch)))),0.) -->
		     <!-- min((carbonReserves-0.43*((0.06/(1-0.06)*(shootDryWeight)+(percentSugarInStorageRoots/(1-percentSugarInStorageRoots))*(rootDryWeight_storageRoots+storageRootStarch)))),percentStarchInStorageRoots*(rootDryWeight_storageRoots*0.43)) -->
			 <!-- if(carbonReserves>(0.15*shootDryWeight+0.15*(rootDryWeight_storageRoots+storageRootStarch)*0.444),carbonReserves*percentCReserveForStarch,0) -->
			 if(t>12,min(1,max(0, c*100/(m*0.43)/3 )),1)
			</SimulaConstant>
			<SimulaBase name="variablePaths">
				<SimulaConstant name="c" type="string"> ../carbonReserves </SimulaConstant>
				<SimulaConstant name="m" type="string"> ../plantDryWeight </SimulaConstant>
			</SimulaBase>
			</SimulaDerivative>
		</SimulaBase>
	</SimulaDirective>
	<SimulaDirective path="/rootTypeParameters/squash/stressImpactFactors">
		<SimulaDirective path="impactOn:photosynthesis">
			<SimulaTable
				name_column2="impactBy:carbon"
				name_column1="stress factor">
				1 1  0 1.2
			</SimulaTable>
		</SimulaDirective>
		<SimulaDirective path="impactOn:leafRespiration">
			<SimulaTable
				name_column2="impactBy:carbon"
				name_column1="stress factor">
				1 1  0.2 1 0 0.3
			</SimulaTable>
		</SimulaDirective>
		<SimulaDirective path="impactOn:stemRespiration">
			<SimulaTable
				name_column2="impactBy:carbon"
				name_column1="stress factor">
				1 1  0.2 1 0 0.3
			</SimulaTable>
		</SimulaDirective>
		<SimulaDirective path="impactOn:rootSegmentCarbonCostOfExudates">
			<SimulaTable
				name_column2="impactBy:carbon"
				name_column1="stress factor">
				1 1  0.2 1 0 0.3
			</SimulaTable>
		</SimulaDirective>
		
		<SimulaDirective path="impactOn:rootSegmentRespiration">
			<SimulaTable
				name_column2="impactBy:carbon"
				name_column1="stress factor">
				1 1  0.2 1 0 0.3
			</SimulaTable>
		</SimulaDirective>
		<SimulaDirective path="impactOn:leafAreaExpansionRate">
			<SimulaTable
				name_column2="impactBy:carbon"
				name_column1="stress factor">
				1 1  0.5 1 0 0
			</SimulaTable>
		</SimulaDirective>
		<SimulaDirective path="impactOn:rootPotentialLongitudinalGrowth">
			<SimulaTable
				name_column2="impactBy:carbon"
				name_column1="stress factor">
				1 1  0.5 0 0 0
			</SimulaTable>
		</SimulaDirective>		
		<SimulaDirective path="impactOn:rootPotentialLongitudinalGrowthMultiplier">
			<SimulaTable
				name_column2="impactBy:carbon"
				name_column1="stress factor">
				1 1  0 1
			</SimulaTable>
		</SimulaDirective>		
		<SimulaDirective path="impactOn:rootSegmentSecondaryGrowth">
			<SimulaTable
				name_column2="impactBy:carbon"
				name_column1="stress factor">
				1 1  0.8 0 0 0
			</SimulaTable>
		</SimulaDirective>		
	</SimulaDirective>
</SimulationModelIncludeFile>