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 ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Appendix 243<br />
Purpose Provides <strong>the</strong> basis for <strong>the</strong> ForClim model system<br />
Programm<strong>in</strong>g<br />
o Design<br />
H. Bugmann 16.12.1992<br />
o Implementation<br />
H. Bugmann 16.12.1992<br />
Swiss Federal Institute <strong>of</strong> Technology Zurich ETHZ<br />
Department <strong>of</strong> Environmental Sciences<br />
Systems <strong>Ecology</strong><br />
Grabenstr. 3<br />
CH-8952 Schlieren<br />
Switzerland<br />
Last revision <strong>of</strong> def<strong>in</strong>ition: 23.9.1993 hb<br />
****************************************)<br />
FROM SimBase<br />
FROM DMMenus<br />
FROM MultiNormal<br />
FROM StochStat<br />
IMPORT Model;<br />
IMPORT Menu, Command;<br />
IMPORT MultiNDistr;<br />
IMPORT StatArray;<br />
VAR<br />
kPatchSize: REAL; (* size <strong>of</strong> a forest patch [m^2] *)<br />
(*****************************)<br />
(* Objects def<strong>in</strong><strong>in</strong>g a site *)<br />
(*****************************)<br />
CONST maxMonSpec = 20; (* maximum number <strong>of</strong> species variables for monitor<strong>in</strong>g *)<br />
TYPE<br />
SiteRec = RECORD<br />
name: ARRAY [1..32] OF CHAR;<br />
kFC, (* soil field capacity [cm] *)<br />
kLat, (* latitude <strong>of</strong> <strong>the</strong> site [°] *)<br />
kSlAsp, (* slope & aspect qualifier [-2..2] *)<br />
(* <strong>the</strong> follow<strong>in</strong>g parameters are optional s<strong>in</strong>ce calculated also by ForClim-E *)<br />
kDD, (* average annual degree-days [°C*days] *)<br />
kAET, (* average annual evapotransp. [mm] *)<br />
kWiT, (* m<strong>in</strong>imum w<strong>in</strong>ter temperature [°C] *)<br />
kDrStr: REAL; (* average drought stress [-] *)<br />
END; (* RECORD *)<br />
VAR<br />
site: SiteRec;<br />
specIdent: ARRAY [1..maxMonSpec],[0..7] OF CHAR; (* for monitor<strong>in</strong>g *)<br />
PROCEDURE SelectSite( fn: ARRAY OF CHAR; VAR ok: BOOLEAN );<br />
(* reads site data from a text file; <strong>the</strong> rout<strong>in</strong>e tries to open <strong>the</strong><br />
file named 'fn'; if this is not successful or fn is an empty str<strong>in</strong>g,<br />
a dialog box is produced where a file can be selected<br />
*)<br />
PROCEDURE SetSiteParameters( kFC, kLat, kSlAsp: REAL );<br />
PROCEDURE ResetSiteParameters;<br />
(* sets / resets <strong>the</strong> site parameters kFC, kLat & kSlAsp to <strong>the</strong> values<br />
assigned <strong>the</strong> last time SelectSite was called<br />
*)<br />
PROCEDURE DeclSiteProc( p: PROC );<br />
PROCEDURE RemoveSiteProc( p: PROC );<br />
(* procedure to be executed every time SelectSite [see above] is executed;<br />
useful e.g. for updat<strong>in</strong>g a model's setup upon switch<strong>in</strong>g <strong>of</strong> sites *)<br />
(***************************************************************)<br />
(* Objects for def<strong>in</strong><strong>in</strong>g and manipulat<strong>in</strong>g climatic parameters *)<br />
(***************************************************************)<br />
TYPE<br />
Month = (Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec);<br />
<strong>Climate</strong> = RECORD<br />
mTVect, sdTVect, (* T mean, st.dev. *)<br />
mPVect, sdPVect, (* P mean, st.dev. *)<br />
corrVect (* T,P cross-correl. coeff. *)<br />
: ARRAY [Jan..Dec] OF REAL;<br />
mnDistr: ARRAY [Jan..Dec] OF MultiNDistr;<br />
(* multiple normal distributions for cross-correlations *)<br />
END(*RECORD*);<br />
PROCEDURE GetMonth(m: Month; VAR name: ARRAY OF CHAR);<br />
PROCEDURE GetCur<strong>Climate</strong>( VAR cc: <strong>Climate</strong> );<br />
PROCEDURE SetCur<strong>Climate</strong>( VAR cc: <strong>Climate</strong> );<br />
PROCEDURE GetDflt<strong>Climate</strong>( VAR dc: <strong>Climate</strong> );<br />
PROCEDURE SetDflt<strong>Climate</strong>( dc: <strong>Climate</strong> );<br />
PROCEDURE Reset<strong>Climate</strong>; (* resets current values to <strong>the</strong> default *)<br />
(**********************************************************)<br />
(* Objects used for communication between <strong>the</strong> submodels *)<br />
(**********************************************************)