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 8064 additions and 0 deletions
!*****************************************************************!
!* *!
!* 4C (FORESEE) Simulation Model *!
!* *!
!* *!
!* data module for statistics with observed and simulated values *!
!* *!
!* 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_mess
character(150):: dirmess = 'mess/' ! directory of files with measurements
integer:: anz_mesf = 1 ! amount of measurement files
character(150),allocatable,dimension(:) :: mesfile ! name of files with measurements
logical:: flag_mess ! TRUE: measurements within the simulation period / FALSE: no measurements
integer:: unit_cons ! console unit
integer:: unit_stat ! output unit for statistical analysis
integer:: unit_mess = -99 ! unit of file with measurements
integer:: unit_mout = -99 ! output unit of file with measurements and residuals
integer unitday, unitsum, unitlit, unittemp, unitwater, unitsoil, unitsoilini, unitcbal, &
unitveg, unitveg_pi, unitveg_sp, unitveg_bi
integer,allocatable,save,dimension(:) :: unit_mon ! array of output unit numbers for monthly values
integer,allocatable,save,dimension(:) :: unit_mon_stat ! array of output unit numbers for statistics of monthly values
integer imkind, & ! amount of read maesurement value typs
tkind, & ! chronological resolution of measurement values( 1 - Tage
! 2 - Jahre)
imess, & ! amount of read measuerment values
anz_val, & ! amount of filled in measurement values
imk_nme, & ! amount of measurment numbers for mean value calculation NME
imk_nmae, & ! amount of measure numbers for mean value calculation NMAE
imk_nrmse, & ! amount of measure numbers for mean value calculation NRMSE
imk_rsq ! amount of measure numbers for mean value calculations RSQ
real,allocatable,dimension(:,:):: mess1, mess2, sim1, help2
integer,allocatable,dimension(:,:):: mtz ! arry for dates of measurements: day of the year, year
integer,allocatable,dimension(:,:):: help1, stz
integer,allocatable,dimension(:):: app
real:: &
nme_av, & ! Average normalised mean error
nmae_av, & ! Average normalised mean absolut error
nrmse_av, & ! Average normalised root mean square error
pme_av, & ! Average mean precental error
prmse_av, & ! Average mean squared percental error
tic_av, & ! Average Theil's inequality coefficient
meff_av, & ! Average modell efficiency
rsq_av ! Average coefficient of determination
type res_struct
character(15) :: mkind ! measurement value type
integer :: imes ! amount of measurement value
integer :: tkind ! chronological resolution of measurement values
integer,pointer,dimension(:):: day, year
real,pointer,dimension(:) :: resid
real,pointer,dimension(:) :: sim
real,pointer,dimension(:) :: mess
end type res_struct
type (res_struct),allocatable,dimension(:),target :: val
integer:: ikind = 50 ! amount of allowed measurement value types
integer:: fkind = 0 ! amount of not defined measurement value types
character(10), dimension(50):: sim_kind
integer, dimension(80):: mpos1, mpos2 ! position of measurement value in input file
integer, dimension(80):: spos1, spos2 ! position of variables in simulations output
integer, dimension(80):: opos1, opos2 ! position of variables in simulation output file
end module data_mess
!**************************************************************
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
! set of characters
character(len=*), parameter :: charset = &
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_"
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
!*****************************************************************!
!* *!
!* 4C (FORESEE) Simulation Model *!
!* *!
!* *!
!* module data_simul *!
!* *!
!* contains follow global subroutines: *!
!* GETUNIT() function for unit number handling *!
!* TESTFILE(infile,ex) subroutine for testing, if a file exists *!
!* ERRORFILE(infile,ios,unitnum) subroutine for messages *!
!* during file reading *!
!* *!
!* FUNCTION GETUNIT *!
!* *!
!* 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_simul
integer :: anz_sim = 0 ! actual number of simulations
character(4) :: anh ! output file extension
integer :: time_b = 1951 ! start simulation year
integer :: time_cur ! current simulation year
integer :: clim_dt = 1 ! kind of climate resolution (daily/monthly) for weathergen.
integer :: repeat_number = 1 ! max. number of repeats
integer :: site_nr = 1 ! number of sites
integer :: year = 40 ! number of simulation years
integer :: ns_pro = 7 ! time step (days) for production module
integer :: ns_day ! loop variable for time step
integer :: ns ! loop variable for species
integer :: iday =1 ! actual day of simulation
integer :: ip ! loop variable for site_nr
integer :: time ! yearly loop variable in simulation_4c(from 1 to year)
integer :: monat
integer :: woche
integer :: flag_adapm = 0 ! flag for adaptive managemen:0/1(carried out last time step)
integer :: flag_bc = 0 ! flag for application of biochar (0 - no application)
integer :: flag_bc_add = 0 ! flag for output to file ...soil.ini for changes of soil parameters
! after addition of biochar (0 - no output)
integer :: flag_clim = 0 ! climate data for each site?(yes/no)
integer :: flag_climnam= 0 ! kind of generation of climate scenario names (flag_multi=8)
integer :: flag_co2 = 0 ! choice of amospheric CO2 scenario
integer :: flag_cohout = 1 ! flag for cohort output
integer :: flag_cohoutd= 1 ! flag for cohort output daily
integer :: flag_cohouty= 1 ! flag for cohort output yearly
integer :: flag_cond = 0 ! choice of heat conductance function
integer :: flag_cum = 0 ! internal flag of cumulativ calculations for output
integer :: flag_dayout = 0 ! flag of daily output
integer :: flag_decomp = 0 ! decomposition model
integer :: flag_depo = 0 ! deposition (set after reading file) 1 - mg/m2, 2 - mg/l
integer :: flag_dis = 0 ! choice of disturbance modus (1=on)
integer :: flag_hum = 0 ! internal flag for recalculation of field capcity etc. depending on humus
integer :: flag_end = 0 ! stop in partitio
integer :: flag_eva = 0 ! choice of evapotranspiration function
integer :: flag_folhei = 1 ! choice of foliage-height relationship
integer :: flag_forska = 0 ! FORSKA environmental factors and regeneration on/off(0)
integer :: flag_int = 0 ! choice of interception function
integer :: flag_inth = 0 ! internal flag for choice of interception function
integer :: flag_light = 3 ! flag for light absorption algorithm
integer :: flag_limi = 3 ! choice of limitations taken into account
integer :: flag_lit = 0 ! input of litter initialisation (internal control) (0 - no)
integer :: flag_mg = 0 ! choice of management (yes/no)
integer :: flag_mistle = 0 ! internal flag (1 = disturbance by mistletoe)
integer :: flag_mort = 1 ! mortality on/off
integer :: flag_multi = 0 ! Multiple run choice
integer :: flag_reg = 0 ! regeneration on/off
integer :: flag_resp = 0 ! choice of respiration modelling
integer :: flag_seedgr = 0 ! flag for weekly seedling growth
integer :: flag_sign = 0 ! choice of mode of calculation for sigman
integer :: flag_sens = 0 ! flag for sensitivity analysis (no input, derived from flag_multi)
integer :: flag_soilin = 0 ! internal flag for soil input version
integer :: flag_stand = 1 ! choice of initialization
integer :: flag_standup= 0 ! stand structure changed (1 - removal of trees, 2 - neww trees)
integer :: flag_stat = 0 ! flag for comparison with measurements
integer :: flag_sum = 0 ! flag for summation output
integer :: flag_sveg = 0 ! flag for soilvegetation (0 = no, 1 = intialis.)
integer :: flag_volfunc= 1 ! choice of volume function for trunc
integer :: flag_wred = 1 ! choice of soil water uptake function
integer :: flag_wurz = 0 ! choice of root distribution function
integer :: flag_wpm = 0 ! wpm flag
integer :: time_out = 1 ! time step of yearly output; compressed output if < 0
integer :: flag_cumNPP = 0 ! time step of summation of yearly NPP for mean yearly NPP in compressed output
logical :: flag_tree = .TRUE. ! internal flag : .TRUE. - all cohorts are trees
logical :: flag_redn =.FALSE. ! internal flag : .TRUE. - Redn<0 for at least one species
logical :: flag_mult9 = .TRUE. ! internal flag : .TRUE. - first run with flag_multi=9
logical :: flag_mult910 = .TRUE. ! internal flag : .TRUE. - runs with flag_multi=9 or flag_multi=10
logical :: flag_mult8910 = .TRUE. ! internal flag : .TRUE. - runs with flag_multi=8 or flag_multi=9 or flag_multi=10
logical :: flag_trace = .TRUE. ! internal flag : .TRUE. - output of trace.log
logical :: lmulti = .FALSE. ! stand initialisation file with several stands
logical :: lcomp1 = .TRUE. ! compressed output with start values
logical :: leaves_on = .false. ! detection of periods with lai > 0
integer :: all_leaves_on = 0 ! detection of periods with maximal lai
real :: thr_height = 50. ! threshold of height for ingrowth
integer :: n_T_downsteps = 0 ! number of steps to decrease temperature in multi-run 2
integer :: n_T_upsteps = 0 ! number of steps to increase temperature in multi-run 2
integer :: n_P_downsteps = 0 ! number of steps to decrease precipitation in multi-run 2
integer :: n_P_upsteps = 0 ! number of steps to increase precipitation in multi-run 2
real :: step_sum_T = 0. ! additive step for temperature change in multi-run 2
real :: step_fac_P = 0. ! factorial step for precipitation change in multi-run 2
real :: deltaT = 0. ! additive change of temperature
real :: deltaPrec = 1. ! factorial change of precipitation
integer :: jpar ! number (array size) of changed parameter (multi run)
real, dimension(200) :: vpar = -99.0 ! store of parameter changes (multi run)
character(30), dimension(50) :: outy_file ! name of yearly output files
integer :: nyvar ! number of yearly output files
character(30), dimension(50) :: outd_file ! name of daily output files
integer :: ndvar ! number of daily output files
character(30), dimension(50) :: outc_file ! name of cohort output files
integer :: ncvar ! number of cohort output files
integer :: ncdvar ! number of daily cohort output files
character(100), dimension(200) :: simpar ! name of changed parameter (multi run)
character(30), dimension(50) :: outvar ! name of output variables (multi run 4, 8, 9, 10)
integer :: nvar ! number of output variables (multi run 4, 8, 9, 10)
integer :: output_unit_all ! output unit number of all selected yearly variables (multi run 9, 10)
integer :: output_unit_all_m ! output unit number of all selected monthly variables (multi run 9, 10)
integer :: output_unit_all_w ! output unit number of all selected weekly variables (multi run 9, 10)
real,allocatable,save,dimension(:,:,:) :: output_var ! value array of output variables (multi run 4, 8, 9, 10)
! (number of output variable, site ip, year)
real,allocatable,save,dimension(:,:,:,:):: output_varm ! value array of monthly output variables (multi run 4, 8, 9, 10)
! (number of output variable, site ip, year, month)
real,allocatable,save,dimension(:,:,:,:):: output_varw ! value array of weekly output variables (multi run 4, 8, 9, 10)
! (number of output variable, site ip, year, week)
integer,allocatable,save,dimension(:) :: output_unit ! array of output unit numbers (multi run 9, 10)
integer,allocatable,save,dimension(:) :: output_unit_mon ! array of output unit numbers for monthly values
character(10), dimension(10) :: typeclim ! array of type of climate scenarios (multi run 9)
real,allocatable,save,dimension(:,:,:,:) :: climszenres ! data file with results from climate scenarios (flag_multi=9, 10)
! (number of output variable, site ip, climate scenario type, realization)
real,allocatable,save,dimension(:,:,:,:,:):: climszenyear ! data file with yearly results from climate scenarios (flag_multi=9, 10)
! (number of output variable, site ip, climate scenario type, realization, year)
real,allocatable,save,dimension(:,:,:,:,:):: climszenmon ! data file with monthly results from climate scenarios (flag_multi=9, 10)
! (number of output variable, site ip, climate scenario type, realization, month)
real,allocatable,save,dimension(:,:,:,:,:):: climszenweek ! data file with weekly results from climate scenarios (flag_multi=9, 10)
! (number of output variable, site ip, climate scenario type, realization, week)
character(150),allocatable,save,dimension(:) :: site_name ! names of simulation sites
character(150) :: site_name1 ! name of first simulation site (multi run 9)
integer :: allunit = 10 ! variable for function getunit
character(150):: actdir ! actual directory
character(150):: dirout = 'output/' ! directory of output files
character(150):: dirin = 'input/' ! directory of input files
character(150) :: simfile = 'test0.sim' ! default simulation parameter file
character(300),allocatable,save,dimension(:) :: climfile ! climate data file
character(300),allocatable,save,dimension(:,:,:) :: climszenfile ! data file from climate scenarios (flag_multi=9)
character(150),allocatable,save,dimension(:) :: sitefile ! site specific parameter file
character(150),allocatable,save,dimension(:) :: valfile ! soil start value file
character(150),allocatable,save,dimension(:) :: treefile ! tree initialization file
character(150),allocatable,save,dimension(:) :: manfile ! management file
character(150),allocatable,save,dimension(:) :: wpmfile ! wpm spinup file
character(150),allocatable,save,dimension(:) :: specfile ! species parameter file
character(150),allocatable,save,dimension(:) :: depofile ! deposition file
character(150),allocatable,save,dimension(:) :: redfile ! file of redN for each species
character(150),allocatable,save,dimension(:) :: litfile ! file of litter initialisation for each fraction and species
integer,allocatable,save,dimension(:) :: fl_co2 ! flag_co2 for flag_multi = 7
character(50),allocatable,save,dimension(:) :: standid ! stand identifier
character(50), allocatable, dimension(:) :: standid_list ! List of stand identifier in input file
real, allocatable, dimension(:,:) :: redN_list ! List of of RedN per species in con-file with flag_multi=8,9
integer :: anz_standid
logical :: lstandid
integer :: nrreal ! number of realizations of climate scenarios (flag_multi=9)
integer :: nrclim ! number of types of climate scenarios (flag_multi=9)
integer :: iclim ! actual number of climate scenario type (flag_multi=9)
integer :: site_anz ! number of all simulation runs for flag_multi=9
integer,dimension(12) :: monrec ! Anzahl Tage im Monat
integer :: dclass_w = 5 ! class width for diameter classification
!----------------------------------------------------------------------
contains
integer function getunit()
logical logo
inquire(allunit, opened=logo)
if(logo) allunit = allunit+1
if(allunit==5.or.allunit==6) allunit=7
getunit = allunit
end function getunit
!----------------------------------------------------------------------
subroutine testfile (infile,ex)
! test whether the file exists
character a
character(len=*),intent(inout) ::infile
logical, intent(out):: ex
ex = .false.
do
inquire (File = infile, exist = ex)
if (ex .eqv. .false.) then
print *, ' >>>foresee message: File ',trim(infile),' not exists !'
write (*,'(A)') ' (0)STOP program'
write(*,'(A)') ' (1) Repeat filename input (def)'
write(*,'(A)',advance='no') ' (2) Return to input choice: '
read (*,'(A)') a
select case(a)
case('0')
stop
case(' ','1')
write(*,'(A)',ADVANCE='NO') ' New filename: ';read (*,'(A75)')infile
case('2')
ex = .false.; exit
end select
else
if (flag_multi .ne. 9) print *, ' >>>foresee message: Filetest - file ',trim(infile),' exists! '
exit
end if
end do
end subroutine testfile
!----------------------------------------------------------------------
subroutine errorfile (infile, ios, unitnum)
! error message during file reading
integer ios, unitnum
logical ex
character(150) infile
character a
if (ios .ne. 0) then
print *,' >>>foresee message: error during file ',trim(infile),' reading!'
ex = .false.
write(*,'(A)',advance='no')' STOP program (y/n)? '
read *, a
if (a .eq. 'y' .or. a .eq. 'Y') then
print *,' Program will stop!'
stop
end if
else
if (flag_multi .ne. 9) print *,' >>>foresee message: reading file ',trim(infile),' completed'
endif
close (unitnum)
if (flag_multi .ne. 9) print *,' '
end subroutine errorfile
end module data_simul
!*****************************************************************!
!* *!
!* 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.
!*****************************************************************!
!* *!
!* 4C Simulation Model: Module data_species *!
!* *!
!* *!
!* module for species parameters *!
!* *!
!* 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_species
! general parameters
INTEGER :: nspecies ! number of all species (incl. ground vegetation)
INTEGER :: nspec_tree ! number of tree species
INTEGER :: spec_help = 1 ! aux var for species number
REAL :: weibal = 1.5 ! mortality parameter (NOT species-specific)
REAL :: weibal_int = 0.1 ! mortality parameter of intrinsic mortality
REAL :: NPP_demand_mistletoe !helping var. to substract demand of mistletoe from pine cohort
! species-specific parameters
TYPE species_par
CHARACTER (len=30) :: species_name
CHARACTER (len=15) :: species_short_name
! mortality parameters
INTEGER :: max_age ! maximum tree age [yr]
INTEGER :: yrec ! stress recovery time [yr]
INTEGER :: stol ! shade tolerance class [1=intol, 5=tol]
REAL :: intr ! intrinsic mortality rate [?]
REAL :: weibla ! lambda parameter of Weibull distribution [?]
! photosynthesis parameters
REAL :: psla_min ! minimum specific one-sided leaf area [m2/kg DW]
REAL :: psla_a ! light dep. specific one-sided leaf area [m2/kg DW]
REAL :: phic ! efficiency parameter, different for everg/decid [-]
REAL :: pnc ! leaf N content [mg/g]
REAL :: kco2_25 ! Michaelis constant for CO2 (base 25 °C) [Pa]
REAL :: ko2_25 ! inhibition constant of O2 (base 25 °C) [kPa]
REAL :: pc_25 ! CO2/O2 specificity ratio (base 25 °C) [-]
REAL :: q10_kco2 ! Q10 coefficients (acclimated to 25 °C) [-]
REAL :: q10_ko2 ! [-]
REAL :: q10_pc ! [-]
REAL :: pb ! Rd to Vm ratio [-]
REAL :: Nresp ! slope of photosynthesis response to Nitrogen [yr/kg/ha]
! NPP parameters
REAL :: respcoeff ! respiration coefficient
REAL :: prg ! growth respiration [/day]
REAL :: prms ! maintenance resp. (base 15 °C): sapwood, [/day]
REAL :: prmr ! fine roots [/day]
REAL :: q10_prms ! Q10 coefficients (acclimated to 15 °C) [-]
REAL :: q10_prmr ! [-]
! allocation parameters
REAL :: pfext ! extinction coefficient
REAL :: sigman ! root activity rate (N uptake) [/yr]
REAL :: psf ! senescence rates: foliage, [/yr]
REAL :: pss ! sapwood, [/yr]
REAL :: psr ! fine roots [/yr]
REAL :: pcnr ! N/C ratio of biomass [kg N/kg C]
REAL :: cnr_fol ! C/N ratio of foliage [kg C/kg N]
REAL :: cnr_frt ! C/N ratio of fine roots [kg C/kg N]
REAL :: cnr_crt ! C/N ratio of coarse roots [kg C/kg N]
REAL :: cnr_tbc ! C/N ratio of twigs and branches [kg C/kg N]
REAL :: cnr_stem ! C/N ratio of stemwood [kg C/kg N]
REAL :: ncon_fol ! N concentration of foliage [mg/g]
REAL :: ncon_frt ! N concentration of fine roots [mg/g]
REAL :: ncon_crt ! N concentration of coarse roots [mg/g]
REAL :: ncon_tbc ! N concentration of twigs and branches [mg/g]
REAL :: ncon_stem ! N concentration of stemwood [mg/g]
REAL :: reallo_fol ! reallocation parameter of foliage
REAL :: reallo_frt ! reallocation parameter of fine root
REAL :: prhos ! sapwood density [kg/cm3]
REAL :: pnus ! foliage to sapwood area relationship [kg/cm2]
REAL :: alphac ! (twigs, branches & coarse roots) to sapwood ratio [-]
REAL :: cr_frac ! fraction of tbc (twigs, branches, roots) that is coarse roots [-]
REAL :: pha ! height growth rate [cm/kg]
REAL :: pha_coeff1 ! " coefficient 1
REAL :: pha_coeff2 ! " coefficient 2
REAL :: pha_v1 ! parameter for non-linear height-foliage relationship
REAL :: pha_v2 ! "
REAL :: pha_v3 ! "
REAL :: crown_a ! parameter to calculate crown radius from DHB [m/cm]
REAL :: crown_b ! parameter to calculate crown radius from DHB [m]
REAL :: crown_c ! parameter to calculate crown radius from DHB [m]
! decomposition parameters per fraction
REAL :: k_opm_fol ! mineralization constant of foliage litter / per day
REAL :: k_syn_fol ! synthesis coefficient of foliage litter / fraction
REAL :: k_opm_tb ! mineralization constant of twigs and branches litter / per day
REAL :: k_syn_tb ! synthesis coefficient of twigs and branches litter / fraction
REAL :: k_opm_stem ! mineralization constant of stemwood / per day
REAL :: k_syn_stem ! synthesis coefficient of stemwood / fraction
REAL :: k_opm_frt ! mineralization constant of fine root / per day
REAL :: k_syn_frt ! synthesis coefficient of fine root / fraction
REAL :: k_opm_crt ! mineralization constant of coarse root / per day
REAL :: k_syn_crt ! synthesis coefficient of coarse root / fraction
! phenology parameters
! PIM: Promotor-Inhibitor model
! CSM: Cannel and Smoth model
! TSM: linear temperature sum model
REAL :: PItmin ! PIM: Inhibitor min temp. [°C]
REAL :: PItopt ! PIM: Inhibitor opt temp. [°C]
REAL :: PItmax ! PIM: Inhibitor max temp. [°C]
REAL :: PIa ! PIM: Inhibitor scaling factor [-]
REAL :: PPtmin ! PIM: Promotor min temp. [°C]
REAL :: PPtopt ! PIM: Promotor opt temp. [°C]
REAL :: PPtmax ! PIM: Promotor max temp. [°C]
REAL :: PPa ! PIM: Promotor scaling factor [-]
REAL :: PPb ! PIM: Promotor scaling factor [-]
REAL :: CSTbC ! CSM: chilling base temp. [°C]
REAL :: CSTbT ! CSM: base temp. [°C]
REAL :: CSa ! CSM: scaling factor [-]
REAL :: CSb ! CSM: scaling factor [-]
REAL :: LTbT ! TSM: base temp. [°C]
REAL :: LTcrit ! TSM: critical temperature sum [°C]
integer :: Lstart ! TSM: start day after 1.11.
integer :: Phmodel ! used pheno model 0: no model, 1: PIM, 2: CSM, 3: TSM
REAL :: end_bb ! last day for vegetation period
integer :: flag_endbb = 0
! Canopy parameters
REAL :: ceppot_spec ! species parameter for pot. intercept. [mm/m2 leaf area]
REAL :: fpar_mod ! Parameter in canopy_geom (Petra) temp?
! regeneration parameter
REAL :: regflag ! flag for regenration control
REAL :: seedrate ! maximum seed rate per m2
REAL :: seedmass ! mass of single seed [g DW], mean value
REAL :: seedsd ! standard deviation of seed mass
REAL :: seeda ! parameter of shoot biomass - foliage mass emp. relation
REAL :: seedb ! ------------"-------------
REAL :: pheight1 ! parameter of shoot biomass - height emp. relation
REAL :: pheight2 ! ---------"--------------
REAL :: pheight3 ! ---------"--------------
REAL :: pdiam1 ! parameter of shoot biomass -diameter emp. relation
REAL :: pdiam2 ! -------------"-----------
REAL :: pdiam3 ! -------------"-----------
! parameter for root growth model
REAL :: spec_rl ! specific root length [m/g DW]
REAL :: tbase ! minimum temperature for root growth [°C]
REAL :: topt ! optimum temperature for root growth [°C]
REAL :: bdmax_coef ! for equation of maximum bulk density for root growth []
REAL :: porcrit_coef ! for equation critical pore space for aeration []
REAL :: ph_opt_max ! maximum pH-value for optimal root growth
REAL :: ph_opt_min ! minimum pH-value for optimal root growth
REAL :: ph_max ! maximum pH-value for root growth
REAL :: ph_min ! minimum pH-value for root growth
REAL :: v_growth ! maximum velocity of coarse root growth [cm/day]
END type species_par
TYPE (species_par),allocatable,save,dimension(:),target :: spar
END MODULE data_species
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.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.