Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • foresee/4C
  • gutsch/4C
2 results
Show changes
Showing
with 8531 additions and 0 deletions
This diff is collapsed.
This diff is collapsed.
!*****************************************************************!
!* *!
!* 4C (FORESEE) Simulation Model *!
!* *!
!* *!
!*data module for a variety of parameters (non-species dependent)*!
!* *!
!* Copyright (C) 1996-2018 *!
!* Potsdam Institute for Climate Impact Reserach (PIK) *!
!* Authors and contributors see AUTHOR file *!
!* This file is part of 4C and is licensed under BSD-2-Clause *!
!* See LICENSE file or under: *!
!* http://www.https://opensource.org/licenses/BSD-2-Clause *!
!* Contact: *!
!* https://gitlab.pik-potsdam.de/foresee/4C *!
!* *!
!*****************************************************************!
module data_par
! from npp.f:
real :: pi = 3.1415926536 ! PI
real :: zero = 1.E-6 ! numerical zero
REAL :: lambda = 0.7 , & ! optimum ratio of ci to ca [-]
Cmass = 12.0 , & ! molar mass of carbon [g/mol]
gmin = 0.0 , & ! minimum conductance [mol/(m2*d)]
ps = 0.7 , & ! shape of PS response curve
pn = 0.025 , & ! slope of N function (eqn 27) at 20 �C [g(N) (mymol s-1)-1]
nc0 = 0.00715 , & ! minimum N content [g/g] (eqn 27)
qco2 = 0.08 , & ! C3 quantum efficiency (eqn 16)
qco2a = 1.0 , & ! scaling parameter (eqn A7)
o2 = 20.9 , & ! partial pressure of oxygen (kPa)
co2_st= 0.00035, & ! atmospheric CO2 content (mol/mol)
pfref = 0.2 , & ! albedo of the canopy
cpart = 0.5 , & ! part of C in biomass [-]
rmolw = 0.622 , & ! ratio of molecular weights of water and air
R_gas = 8.314 , & ! universal gas constant [J/mol/K] = [Pa/m3/K]
c_karman = 0.41 , & ! von Karman's constant [-]
c_air = 1.005 , & ! specific heat of air at const. pressure [J/g/K]
psycro =0.000662 , & ! psychrometer constant [hPa/K]
h_breast =137 , & ! breast height for inventory measurements [cm]
h_sapini = 200 , & ! height below which tree is initialised with sapling allometry
h_bo_br_diff = 50, & ! minimal difference between height of crown base and breast height
Q10_T = 2. ! used for calculation of dayfract from air temperature
DOUBLE PRECISION :: p0_co2 , & ! parameter variable for calculation of CO2 scenarios
p1_co2 , & ! parameter variable for calculation of CO2 scenarios
p2_co2 , & ! parameter variable for calculation of CO2 scenarios
p3_co2 , & ! parameter variable for calculation of CO2 scenarios
p4_co2 , & ! parameter variable for calculation of CO2 scenarios
p1_co2h , & ! parameter variable for calculation of historical CO2 scenarios
p2_co2h , & ! parameter variable for calculation of historical CO2 scenarios
p3_co2h , & ! parameter variable for calculation of historical CO2 scenarios
p4_co2h , & ! parameter variable for calculation of historical CO2 scenarios
p5_co2 ! parameter variable for calculation of CO2 scenarios
! Transformation coefficients
REAL :: gm2_in_kgha = 10. ! transf. coeff. from g/m2 in kg/ha
REAL :: kgha_in_gm2 = 0.1 ! transf. coeff. from kg/ha in g/m2
REAL :: gm2_in_tha = 0.01 ! transf. coeff. from g/m2 in t/ha
REAL :: tha_in_gm2 = 100. ! transf. coeff. from t/ha in g/m2
REAL :: kg_in_g = 1000. ! transf. coeff. from kg in g
REAL :: GR_in_PAR = 0.5*4.6/100. ! from global rad. in J/cm2 to PAR in mol/m2
! explanation of conversion factor:
! 0.5: PAR is 50% of incident radiation
! 4.6: 1 J = 4.6e-6 mol (Larcher 1995);
! 100: conversion J/cm2 -> MJ/m2
! soil parameter
real :: dens_om = 1.4 ! specific density of organic matter g/cm3
! parameter for snow
real :: temp_snow = 0.2 ! threshold of air temperature for snow accumulation
! parameter for calculation of potential evapotranspiration rate
real :: alpha_PT = 1.26 ! Priestley-Taylor coefficient
! parameter for calculation of transpiration demand
real :: alfm = 1.4
real :: gpmax = 14000. ! mol/(m2*d)
! parameter for growing degree day calculation
real :: thr_gdd = 5.
! van Genuchten parameter for flag_wred=9
real :: l_gnu = 0.5
! fol biomass per mistletoe [kg DW/tree], 1 Viscum (10years) see Pfiz 2010
real :: mistletoe_x_fol = 0.0158
! parameter for allocation to NSC-Pool
real :: decid_sap_allo = 0.042 !fraction of sapwood DW allocated to NSC-Pool for decidous tree species
real :: decid_tb_allo = 0.125 !fraction of twigs and branch DW allocated to NSC-Pool for decidous tree species
real :: decid_crt_allo = 0.125 !fraction of coarse root DW allocated to NSC-Pool for decidous tree species
real :: conif_sap_allo = 0.018 !fraction of sapwood allocated to NSC-Pool for coniferous tree species
real :: conif_tb_allo = 0.065 !fraction of twigs and branch allocated to NSC-Pool for coniferous tree species
real :: conif_crt_allo = 0.065 !fraction of coarse root DW allocated to NSC-Pool for coniferous tree species
! set of characters
character(len=*), parameter :: charset = &
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_"
! test
real, allocatable, dimension(:,:) ::lambda_ts
end module data_par
!*****************************************************************!
!* *!
!* 4C (FORESEE) Simulation Model *!
!* *!
!* *!
!* data module for planting of seedlings/saplings *!
!* ! arrays have to be adapted to the species number ! *!
!* *!
!* Copyright (C) 1996-2018 *!
!* Potsdam Institute for Climate Impact Reserach (PIK) *!
!* Authors and contributors see AUTHOR file *!
!* This file is part of 4C and is licensed under BSD-2-Clause *!
!* See LICENSE file or under: *!
!* http://www.https://opensource.org/licenses/BSD-2-Clause *!
!* Contact: *!
!* https://gitlab.pik-potsdam.de/foresee/4C *!
!* *!
!*****************************************************************!
module data_plant
integer :: quspec= 2 ! number of planted species
integer, dimension(13) :: infspec=(/1,0,1,0,0,0,0,0,0,0,0,0,0/) ! sign of planted species = 0/1
integer, dimension(13) :: npl_mix =(/3000,0,6000,4500,0,0,0,0,0,0, 0, 0, 0/) ! number of plants in mixed stands
integer, dimension(13) :: numplant=(/178,6000,8000,9000,10000,0,8000,1666, 1140, 2000, 5000, 0, 0/) ! number of plants per ha
integer, dimension(13) :: specpl=(/1,2,3,4,5,6,7,8, 9, 10, 11, 12, 13/) ! number of species
real, dimension(13) :: plant_height=(/130.,37.5,17.5,40.,8.7,0.,17.5,40.,17.5, 30.0, 30.0, 0., 0./) ! mean height of plants
real, dimension(13) :: plant_hmin=(/70.,25.,10.,30.,3.,0.,10.,30., 10., 20., 10., 0.,0./) ! minimum height of plants
real, dimension(13) :: hsdev=(/3.33,4.1,7.5,3.33,5.9,0.0,7.5,3.33, 7.5,4.1, 7.5, 0.,0. /) ! standard deviation od height
real, dimension(13) :: pl_age=(/10.,4.,2.,2.,1.,0.,2.,1.,2.,2., 2., 0.,0./) ! age of plants
real :: kappa = 1.2 !1.2
real :: ksi = 2.99 !1.5
integer, dimension(11,10) :: m_numplant
integer, dimension(11,10) :: m_specpl
real, dimension(11,10) :: m_plant_height
real, dimension(11,10) :: m_plant_hmin
real, dimension(11,10) :: m_pl_age
real, dimension(11,10) :: m_hsdev
integer :: m_numclass
end module data_plant
This diff is collapsed.
!*****************************************************************!
!* *!
!* 4C (FORESEE) Simulation Model *!
!* *!
!* *!
!* data module for site data *!
!* *!
!* Copyright (C) 1996-2018 *!
!* Potsdam Institute for Climate Impact Reserach (PIK) *!
!* Authors and contributors see AUTHOR file *!
!* This file is part of 4C and is licensed under BSD-2-Clause *!
!* See LICENSE file or under: *!
!* http://www.https://opensource.org/licenses/BSD-2-Clause *!
!* Contact: *!
!* https://gitlab.pik-potsdam.de/foresee/4C *!
!* *!
!*****************************************************************! *!
MODULE data_site
INTEGER :: patch_id ! Patch identifier
character(50) :: stand_id ! Stand identifier
REAL :: xlat ! latitude in radians
REAL :: lat = 52.24 ! Default Potsdam coordinates
REAL :: long = 13.04
REAL, DIMENSION(:), ALLOCATABLE :: latitude ! array of latitudes for multi run 8
REAL, ALLOCATABLE, DIMENSION(:) :: NHdep ! yearly deposition
REAL, ALLOCATABLE, DIMENSION(:) :: NOdep ! yearly deposition
INTEGER, ALLOCATABLE, DIMENSION(:) :: gwtable ! groundwater level class
! 1: 0 - 0.5 m
! 2: 0.5 - 1.0 m
! 3: 1.0 - 1.5 m
! 4: 1.5 - 2.0 m
! 5: > 2.0 m
character(50),ALLOCATABLE, DIMENSION(:) :: sitenum
! KLara
character(50),ALLOCATABLE, DIMENSION(:) :: clim_id
! WK
CHARACTER(13),ALLOCATABLE, DIMENSION(:) :: soilid
END module data_site
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
!*****************************************************************!
!* *!
!* FORESEE Simulation Model *!
!* *!
!* *!
!* Subroutine for: *!
!* Calculation of rise of bole height *!
!* *!
!* Copyright (C) 1996-2018 *!
!* Potsdam Institute for Climate Impact Reserach (PIK) *!
!* Authors and contributors see AUTHOR file *!
!* This file is part of 4C and is licensed under BSD-2-Clause *!
!* See LICENSE file or under: *!
!* http://www.https://opensource.org/licenses/BSD-2-Clause *!
!* Contact: *!
!* https://gitlab.pik-potsdam.de/foresee/4C *!
!* *!
!*****************************************************************!
SUBROUTINE CROWN (p)
!*** Declaration part ***!
USE data_stand
USE data_species
USE data_simul
IMPLICIT NONE
REAL :: relnpp, & ! layer specific amount of npp per cohort
reldm ! layer specific dry matter to be replaced
INTEGER :: nl ! variable for crown layers
INTEGER :: i
TYPE(Coh_Obj) :: p ! pointer to cohort list
!*** Calculation part ***!
! evaluate assimilation balance vs. foliage turnover rate for the crown layers
ns = p%coh%species
DO i = p%coh%topLayer, p%coh%botLayer, -1
nl = i
relnpp = p%coh%antFPAR(i) * p%coh%netAss
reldm = 1.5*spar(ns)%psf * p%coh%sleafArea(i) / p%coh%med_sla
IF ( relnpp < reldm) THEN
nl = nl + 1
EXIT
ENDIF
END DO
p%coh%deltaB = (nl - p%coh%botLayer) * dz
IF(p%coh%deltaB.GT.0.05*(p%coh%height-p%coh%x_hbole)) p%coh%deltaB=0.05*(p%coh%height-p%coh%x_hbole)
END SUBROUTINE CROWN
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.