Package 'linkages'

Title: A Linked Forest Productivity - Soil Process Model
Description: LINKAGES is a forest gap model originally written in FORTRAN by Pastor and Post in 1985.
Authors: Ann Raiho
Maintainer: Ann Raiho <[email protected]>
License: MIT
Version: 0.1
Built: 2026-05-26 06:21:26 UTC
Source: https://github.com/araiho/linkages_package

Help Index


LINKAGES birth function

Description

BIRTH CALCULATES SEEDLING AND SPROUT BIRTH BASED ON SPECIES FECUNDITY, SEEDBED CONDITIONS, SUSCEPTIBILITY TO BROWSING, AND THE DEGREE TO WHICH LIGHT, SOIL MOISTURE, AND DEGREE DAYS ARE LESS THAN OPTIMUM FOR GROWTH. SOIL MOISTURE AND DEGREE DAY MULTIPLIERS ARE SUPPLIED BY SUBROUTINE GMULT. A SPECIES CAN HAVE SPROUTS IF AT LEAST ONE TREE WITH DIAMETER BETWEEN SPRTMN AND SPRTMX DIED LAST YEAR (KSPRT INCREMENTED BY 1 IN KILL). RANDOM NUMBERS USED TO DETERMINE OCCURENCE OF BROWSING, NUMBERS OF SEEDLINGS AND SPROUTS, AND DBH SUPPLIED BY rand.

Usage

birth(nspec, ntrees, frt, iage, slta, sltb, dbh, fwt, switch.mat, degd, dmin,
  dmax, frost, rt, itol, mplant, nogro, ksprt, sprtnd, max.ind, smgf, degdgf)

Arguments

nspec

number of species

ntrees

number of trees of each species

frt

foliage retention time

iage

age of each individual

slta

parameter to calculate crown area from diameter

sltb

parameter to calculate crown area from diameter

dbh

diameter of each individual

fwt

leaf weight per unit crown area

switch.mat

TRUE/FALSE switches for each species

degd

growing degree days from tempe.R

dmin

degree day minimum for each species

dmax

degree day maximum for each species

frost

minimum January temperature tolerated

rt

current monthly temperatures

itol

shade tolerance code for each species

mplant

maximum seeding in rate per plot

nogro

flags individuals that aren't growing well

ksprt

flags individuals that could sprout

sprtnd

number of sprouts per stump

max.ind

maximum number of individuals in a plot

smgf

soil moisture growing factor from gmult.R

degdgf

growing degree day growing factor from gmult.R

Value

iage age of each individual

dbh diameter of each individual

nogro flags individuals growing slowly

ntrees number of trees of each species

newtr records species considered 'eligible'

ksprt flags individuals that could sprout

Author(s)

Ann Raiho


LINKAGES decomp function

Description

DECOMP CALCULATES CARBON AND NITROGEN FLOWS THROUGH SOIL. AVAILABLE N (AVAILN) IS USED IN GMULT TO CALCULATE SOIL NITROGEN GROWTH MULTIPLIERS. AET IS FED IN FROM MOIST. THIS YEAR'S LEAF, TWIG, ROOT, AND WOOD LITTER IS FED IN FROM KILL (ARRAY TYL). THE SIMULATION STARTS ON BARE GROUND (ONLY HUMUS PRESENT. BASESC AND BASESN ARE STARTING HUMUS WEIGHT AND N CONTENTS READ IN INPUT). THREE TYPES OF SOIL ORGANIC MATTER ARE RECOGNIZED: COHORTS EITHER IMMOBILIZING OR RAPIDLY MINERALIZING NITROGEN AND A HOMOGENOUS HUMUS POOL SLOWLY MINERALIZING N.

Usage

decomp(fdat, aet, ncohrt, fc, dry, tyl, C.mat)

Arguments

fdat

current year

aet

average temperature by month for current year

ncohrt

average precipitation by month for current year

fc

field capacity

dry

wilting point

tyl

total yearly litter

C.mat

carbon matrix

Value

ff weights and n content of forest floor by litter type

availn available N

tyln leaf litter N content

hcn humus C:N ratio

sco2 total soil co2-c

ncohrt number of cohorts

C.mat matrix for data on litter cohorts

Author(s)

Ann Raiho


LINKAGES gmult function

Description

GMULT CALCULATES DEGREE DAY, SOIL MOISTURE, AND SOIL NITROGEN MULTIPLIERS USED IN SUBROUTINES BIRTH AND GROW BASED ON ON DEGD (SUPPLIED BY TEMPE), FJ (SUPPLIED BY MOIST), AND AVAILN (SUPPLIED BY DECOMP), RESPECTIVELY.

Usage

gmult(egs, bgs, availn, degd, dmin, dmax, d3, fj, cm1, cm3, cm2, cm4, cm5,
  nspec)

Arguments

egs

end of growing season day of year

bgs

beginning of growing season day of year

availn

available nitrogen

degd

total growing degree days

dmin

degree day minimum for each species

dmax

degree day maximum for each species

d3

drought tolerance (fraction of the growing season)

fj

number of dry days

cm1

parameter for nitrogen growth multipliers

cm3

parameter for nitrogen growth multipliers

cm2

parameter for nitrogen growth multipliers

cm4

parameter for nitrogen growth multipliers

cm5

parameter for nitrogen growth multipliers

nspec

number of species

Value

smgf soil moisture growth factor

sngf soil nitrogen growth factor

degdgf growing degree day growth factor

availn available nitrogen

Author(s)

Ann Raiho


LINKAGES growth function

Description

GROW CALCULATES DIAMETER GROWTH FOR EACH TREE BY DECREASING MAXIMAL GROWTH TO THE EXTENT THAT THE MOST LIMITING RESOURCE IS LESS THAN OPTIMAL.

Usage

grow(max.ind, nspec, ntrees, frt, slta, sltb, dbh, fwt, b2, b3, itol, g, degdgf,
  smgf, sngf, frost, rt, iage, nogro)

Arguments

max.ind

maximum number of individuals

nspec

number of species

ntrees

number of trees of each species

frt

foliage retention time

slta

parameter to calculate crown area from diameter

sltb

parameter to calculate crown area from diameter

dbh

diameter of each tree

fwt

leaf weight per unit crown area

b2

growth scaling parameter

b3

growth scaling parameter

itol

shade tolerance code for each species

g

scalar for species maximum diameter increment

degdgf

growing degree day growth factor from gmult.R

smgf

soil moisture growth factor from gmult.R

sngf

soil nitrogen growth factor from gmult.R

frost

minimum January temperature tolerated

rt

current monthly temperature

iage

age of each individual

nogro

flags slow growing individuals

Value

dbh diameter of each individual

ntrees number of trees of each species

awp aboveground woody production

Author(s)

Ann Raiho


Hello, World!

Description

Prints 'Hello, world!'.

Usage

hello()

Examples

hello()

LINKAGES kill function

Description

KILL KILLS TREES BY AGE DEPENDENT MORTALITY (ONLY 1 REACH MAXIMUM AGE) AND AGE INDEPENDENT MORTALITY (PROBABILITY OF SURVIVING 10 CONSECUTIVE YEARS OF SLOW GROWTH (SEE GROW) = 1 DECISIONS ON WHETHER OR NOT TO KILL A TREE ARE PARTLY BASED ON RANDOM NUMBERS SUPPLIED BY rand. KILL ALSO CALCULATES LITTER AMOUNTS, WHICH ARE DECAYED IN SUBROUTINE DECOMP.

Usage

kill(nspec, ntrees, slta, sltb, dbh, agemx, ksprt, sprtmn, sprtmx, iage, nogro,
  tl, rtst, fwt, max.ind, frt)

Arguments

nspec

number of species

ntrees

number of trees of each species

slta

parameter to calculate crown area from diameter

sltb

parameter to calculate crown area from diameter

dbh

diameter of each individual

agemx

max age

ksprt

flags if stump can sprout

sprtmn

minimum diameter for a stump to sprout

sprtmx

maximum diameter for a stump to sprout

iage

age of each individual

nogro

flags slow growing individuals

tl

leaf litter quality class

rtst

root-shoot ratio for each species

fwt

leaf weight per unit crown area

max.ind

maximum number of individuals

frt

foliage retention time

ncohrt

number of cohorts

Value

dbh diameter of each individual

ntrees number of trees of each species

iage age of each individual

nogro flags individuals growing slowly

ncohrt number of cohorts

tyl total yearly litter,

ksprt flags stumps that could sprout

Author(s)

Ann Raiho


LINKAGES main function

Description

Main function for running all LINKAGES subroutines

Usage

linkages(linkages.input, outdir, restart = NULL, linkages.restart = NULL)

Arguments

iplot

PEcAn settings object

nyear

number of years

nspec

number of species

fc

field capacity

dry

wilting point

bgs

beginning of growing season

egs

end of growing season

max.ind

maximum number of indiviuals allowed to grow in a plot

plat

latitude

temp.mat

monthly temperature matrix (nyear x 12)

precip.mat

monthly precipitation matrix (nyear x 12)

spp.params

species parameter matrix

switch.mat

species switches matrix

fdat

underground parameter matrix

clat

climate correction factor matrix

basesc

initial humus weight

basesn

initial N in soil

Value

year vector of years

ag.biomass above ground biomass in kgC/m2

total.soil.carbon soil organic matter + leaf litter in kgC/m2

leaf.litter leaf litter in kgC/m2

ag.npp above ground net primary production in kgC/m2/second

hetero.resp heterotrophic respiration in kgC/m2/second

nee net ecosystem exchange in kgC/m2/second

et annual evapotransipiration kgC/m2/s

agb.pft = agb.pft above ground biomass by plant functional type (species in LINKAGES)

f.comp = f.comp fractional composition (sums to 1 each year)

ntrees.birth=ntrees.birth number of trees born of each species each year

ntrees.kill = ntrees.kill number of trees killed of each species each year

tstem=tstem stem density

tab=tab total aboveground biomass without unit conversion

fl=fl total leaf litter without unit conversion

totl=totl leaf litter nitrogen

tnap=tnap total net above ground production without unit conversion

avln=avln available nitrogen

cn=cn carbon to nitrogen ratio

sco2c=sco2c soil repiration without unit conversion

som=som soil organic matter

bar=bar biomass by species without unit conversion

aet.save=aet.save annual evapotranspiration without unit conversion

nogro.save=nogro.save matrix of trees not growing each year

dbh.save=dbh.save matrix of dbh increment of trees each year

iage.save=iage.save matrix of age of each tree each year

Author(s)

Ann Raiho


LINKAGES moist function

Description

Calculates actual evapotranspiration (AET) for the current year

Usage

moist(kyr, temp.vec, precip.vec, fc, dry, bgs, egs, plat, clat)

Arguments

kyr

current year

temp.vec

average temperature by month for current year

precip.vec

average precipitation by month for current year

fc

field capacity

dry

wilting point

bgs

beginning growing season day of year

egs

end growing season day of year

plat

plot latititude

clat

climate adjustment matrix

Value

aet actual evapotranspiration (units:mm)

fj total number of dry days

Author(s)

Ann Raiho


LINKAGES output function

Description

OUTPUT coverts model variables into ecosystem variables of interest

Usage

output(availn, tyln, nspec, frt, iage, slta, sltb, dbh, fwt, tyl, max.ind,
  ntrees, awp)

Arguments

availn

available nitrogen

tyln

leaf litter N content from "decomp.r"

nspec

number of species

frt, slta, sltb, fwt

species specific parameters

iage

age of each individual

dbh

diameter of each individual

tyl

total yearly litter

max.ind

maximum number of individual

ntrees

number of trees of each species

awp

aboveground woody production

Value

atot total number of trees per ha

tbar total aboveground biomass

tyln leaf litter N content

tynap total aboveground production

availn available N

bar specieis biomass t/ha

Author(s)

Ann Raiho


LINKAGES plotin function

Description

Sets up initial conditions for LINAKGES

Usage

plotin(iplot, basesc, basesn, max.ind, nspec)

Arguments

iplot

number of plots

basesc

initial humus weight

basesn

initial humus nitrogen content

max.ind

maximum number of individuals

nspec

number of species in simulation

Value

ntrees matrix for number of trees for each species

dbh matrix for diameter at breast height for each tree

nogro used to flag slow growing trees

ksprt used to flag trees eligible to sprout

iage matrix for age of each tree

C.mat matrix for data on litter cohorts

ncohrt number of cohorts

tyl total yearly litter

Author(s)

Ann Raiho


LINKAGES tempe function

Description

Calculates total growing degree days for each year, i

Usage

tempe(temp.vec)

Arguments

temp.vec

mean temperature for each month

Value

degd total growing degree days for each year

Author(s)

Ann Raiho