08.09.2014 Views

On the Ecology of Mountainous Forests in a Changing Climate: A ...

On the Ecology of Mountainous Forests in a Changing Climate: A ...

On the Ecology of Mountainous Forests in a Changing Climate: A ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendix 241<br />

CONST lem = 3;<br />

VAR ef: FormFrame;<br />

ok: BOOLEAN;<br />

cl: INTEGER;<br />

button: ARRAY [MIN(Litter)..MAX(Litter)] OF RadioButtonID;<br />

allTypesB, selectedbutton: RadioButtonID;<br />

BEGIN<br />

cl := 2;<br />

WriteLabel(cl, lem-2, "Select litter type :"); INC(cl);<br />

Def<strong>in</strong>eRadioButtonSet(selectedbutton);<br />

IF NOT allTypes THEN selectedbutton := button[type] END;<br />

RadioButton( allTypesB, cl, lem, "All types"); INC(cl,2);<br />

RadioButton( button[leafFast], cl, lem, "Fast decay<strong>in</strong>g foliage"); INC(cl);<br />

RadioButton( button[leafMedium], cl, lem, "Medium decay<strong>in</strong>g foliage"); INC(cl);<br />

RadioButton( button[leafSlow], cl, lem, "Slowly decay<strong>in</strong>g foliage"); INC(cl);<br />

RadioButton( button[roots], cl, lem, "Roots"); INC(cl);<br />

RadioButton( button[twigs], cl, lem, "Twigs"); INC(cl);<br />

RadioButton( button[wood], cl, lem, "Wood"); INC(cl);<br />

INC(cl);<br />

CheckBox( cl, lem, "Every year", everyYear );<br />

INC(cl);<br />

ef.x := 0; ef.y := -1; (* display entry form <strong>in</strong> middle <strong>of</strong> screen *)<br />

ef.l<strong>in</strong>es := cl+1; ef.columns := 30;<br />

UseEntryForm(ef,ok);<br />

IF ok THEN<br />

IF selectedbutton = allTypesB THEN allTypes := TRUE;<br />

ELSE allTypes := FALSE;<br />

END;<br />

IF selectedbutton = button[leafFast] THEN type := leafFast;<br />

ELSIF selectedbutton = button[leafMedium] THEN type := leafMedium;<br />

ELSIF selectedbutton = button[leafSlow] THEN type := leafSlow;<br />

ELSIF selectedbutton = button[roots] THEN type := roots;<br />

ELSIF selectedbutton = button[twigs] THEN type := twigs;<br />

ELSIF selectedbutton = button[wood]<br />

END; (* IF *)<br />

END; (* IF *)<br />

END LitterInput;<br />

THEN type := wood;<br />

(********************************)<br />

(* Procedure ModelObjects *)<br />

(********************************)<br />

PROCEDURE ModelObjects;<br />

VAR i: Litter;<br />

BEGIN<br />

DeclSV( HOM, HOMNew, 0.0, 0.0, 100.0,<br />

'Humus organic matter', 'HOM', 't/ha');<br />

DeclSV( HN, HNNew, 0.0, 0.0, 10.0,<br />

'Humus nitrogen', 'HN', 't/ha');<br />

DeclMV( uAvN, 0.0, 500.0, 'Available nitrogen','uAvN','kg/ha',<br />

not<strong>On</strong>File,writeInTable,notInGraph);<br />

DeclMV( litterM, 0.0, 500.0, 'Litter organic matter','LOM','t/ha',<br />

not<strong>On</strong>File,writeInTable,notInGraph);<br />

DeclMV( litterN, 0.0, 50.0, 'Litter nitrogen','LN','t/ha',<br />

not<strong>On</strong>File,writeInTable,notInGraph);<br />

DeclMV( HOM, 0.0, 500.0, 'Humus organic matter','HOM','t/ha',<br />

not<strong>On</strong>File,writeInTable,notInGraph);<br />

DeclMV( HN, 0.0, 50.0, 'Humus nitrogen','HN','t/ha',<br />

not<strong>On</strong>File,writeInTable,notInGraph);<br />

DeclMV( gLNC, 0.0, 0.05, 'Litter N:C ratio','gLNC','--',<br />

not<strong>On</strong>File,notInTable,notInGraph);<br />

DeclMV( humCN, 0.0, 100.0, 'Humus C:N ratio','gHCN','--',<br />

not<strong>On</strong>File,notInTable,notInGraph);<br />

DeclMV( totCO2, 0.0, 25.0, 'total C(O2) emission','CO2(tot)','t/ha*yr',<br />

not<strong>On</strong>File,notInTable,notInGraph);<br />

DeclMV( totSOM, 0.0, 500.0, 'total soil organic matter','totSOM','t/ha',<br />

not<strong>On</strong>File,writeInTable,notInGraph);<br />

DeclMV( meanAvN, 0.0, 500.0, 'average available nitrogen','meanAvN','t/ha',<br />

not<strong>On</strong>File,notInTable,notInGraph);<br />

DeclMV( meanLitM, 0.0, 500.0, 'average litter organic matter','meanLOM','t/ha',<br />

not<strong>On</strong>File,notInTable,notInGraph);<br />

DeclMV( meanHumM, 0.0, 500.0, 'average humus organic matter','meanHOM ','t/ha',<br />

not<strong>On</strong>File,notInTable,notInGraph);<br />

DeclP( kNAtm, 5.0, 0.0, 100.0, rtc,<br />

'Atmospheric N <strong>in</strong>put', 'kNAtm', 'kg/ha*yr');<br />

DeclP( kAET, 1200.0, 0.0, 2000.0, rtc,<br />

'AET multiplier parameter', 'kAET', 'mm/yr');<br />

DeclP( kM<strong>in</strong>, 0.035, 0.0, 1.0, rtc,<br />

'Humus decay <strong>in</strong> absence <strong>of</strong> litter', 'kM<strong>in</strong>', '%');<br />

DeclP( kLeach, 0.16, 0.0, 1.0, rtc,<br />

'Leach<strong>in</strong>g from leaf litter', 'kLeach', '%');<br />

DeclP( decMlt, 1.0, 0.0, 1.0, rtc,<br />

'Decay multiplier', 'decMlt', '--');<br />

DeclP( k1, 0.9804, 0.0, 10.0, rtc,<br />

'Regression parameter', 'k1', '--');<br />

DeclP( k2, 0.09352, 0.0, 1.0, rtc,<br />

'Regression parameter', 'k2', '--');<br />

DeclP( k3, -0.4956, -1.0, 1.0, rtc,<br />

'Regression parameter', 'k3', '--');<br />

DeclP( k4, 0.00193, 0.0, 1.0, rtc,<br />

'Regression parameter', 'k4', '--');<br />

DeclP( k5, 0.0079702, 0.0, 1.0, rtc,<br />

'Regression parameter', 'k5', '--');<br />

DeclP( k6, -1.3173E-4, -1.0, 0.0, rtc,<br />

'Regression parameter', 'k6', '--');<br />

DeclP( kNC, 0.005, 0.0, 0.1, rtc,<br />

'N immobilized per unit weight loss', 'kNC', '--');<br />

FOR i := MIN(Litter) TO MAX(Litter) DO<br />

DeclP( kInitN[i], kInitN[i], 0.0, 0.05, rtc,<br />

'Initial nitrogen percentage', 'kInitN', '%/100');<br />

DeclP( kCritN[i], kCritN[i], 0.0, 0.1, rtc,<br />

'Critical N percentage', 'kCritN', '%/100');<br />

END;<br />

END ModelObjects;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!