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
Commits on Source (104)
Showing
with 322 additions and 134 deletions
...@@ -18,8 +18,10 @@ collaborative work, see the AUTHOR file for details. ...@@ -18,8 +18,10 @@ collaborative work, see the AUTHOR file for details.
* manuals: about "how to start" and " generate exe" * manuals: about "how to start" and " generate exe"
* descriptions/additional: background information documents * descriptions/additional: background information documents
* descriptions/Fact_sheets: short summary of the model in English and German * descriptions/Fact_sheets: short summary of the model in English and German
* test_data_sets: test the propper working of the functions of the model with complete sets of data and control files * source_code/additional: overview on variables with their names in the 4C description and the names in the source code
* publications: all relevant publications regarding the model 4C flow chart of the model 4C
* test_data_sets: test the correct function mode of the model with complete sets of input data and control files
* publications: relevant publications regarding the model 4C
The source code is distributed via a git repository at: The source code is distributed via a git repository at:
https://gitlab.pik-potsdam.de/foresee/4C and is ready to use. https://gitlab.pik-potsdam.de/foresee/4C and is ready to use.
...@@ -27,7 +29,7 @@ The code language is Fortran90. Since the model development is ...@@ -27,7 +29,7 @@ The code language is Fortran90. Since the model development is
finished, there is no further development and no further support in model finished, there is no further development and no further support in model
download, setup, development or application. No merge or other development download, setup, development or application. No merge or other development
requests will be handeled. Therefore there are no code style recommendations or requests will be handeled. Therefore there are no code style recommendations or
instructions on how to create source code ammendments. instructions on how to create source code amendments.
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
File added
No preview for this file type
File added
File added
...@@ -121,7 +121,7 @@ module data_soil ...@@ -121,7 +121,7 @@ module data_soil
! arrays of given root distribution (defined input) ! arrays of given root distribution (defined input)
real, allocatable, save, dimension(:) :: root_fr ! root fraction per soil layer real, allocatable, save, dimension(:) :: root_fr ! root fraction per soil layer
! dp_rfr ! depth of root fraction / cm
! yearly fine root loss after Rasse et al. 2001 ! yearly fine root loss after Rasse et al. 2001
integer :: rdepth_kind ! kind of calculation of root depth integer :: rdepth_kind ! kind of calculation of root depth
real, allocatable, dimension(:) :: wat_left ! auxiliary variable for coh%watleft to determin annual sum of available water in soil layer boardering on root zone real, allocatable, dimension(:) :: wat_left ! auxiliary variable for coh%watleft to determin annual sum of available water in soil layer boardering on root zone
...@@ -298,15 +298,15 @@ module data_soil_t ...@@ -298,15 +298,15 @@ module data_soil_t
! Variables and parameters for soil temperature calculation ! Variables and parameters for soil temperature calculation
integer flag_surf ! calculation of soil surface temperature integer :: flag_surf = 0 ! calculation of soil surface temperature
! 0 - old version ! 0 - surface temperature equals temperature of first layer
! 1 - new ersion with explicit surface temperature ! 1 - with explicit surface temperature
real temps_surf ! soil surface temperature real temps_surf ! soil surface temperature
real hflux_surf ! soil heat flux at soil surface real hflux_surf ! soil heat flux at soil surface
! model parameters ! model parameters
real :: C0 = 0.76, & ! Faltungskoeff. real :: C0 = 0.76, & ! coefficients for calculation of surface temperature
C1 = 0.05, & C1 = 0.05, &
C2 = 0.3 C2 = 0.3
......
...@@ -50,11 +50,12 @@ if (hum .le. 0.) then ...@@ -50,11 +50,12 @@ if (hum .le. 0.) then
else if (hum .gt. 100.) then else if (hum .gt. 100.) then
hum = 100. hum = 100.
endif endif
if (press .gt. 0.) then if (prs(i,j) .gt. 0.) then
press = prs(i,j) press = prs(i,j)
else else
press = 1013. press = 1013.
endif endif
rad = rd(i,j) rad = rd(i,j)
wind = wd(i,j) wind = wd(i,j)
if (wind .lt. 0.) wind = 0.5 if (wind .lt. 0.) wind = 0.5
......
...@@ -118,7 +118,8 @@ SUBROUTINE INITIA ...@@ -118,7 +118,8 @@ SUBROUTINE INITIA
! end of declaration section ! end of declaration section
!****************************************************************************** !******************************************************************************
ncl1 = 60 !ncl1 = 60
ncl1=40
allocate (zheigh(ncl1), zbhd(ncl1), zhbc(ncl1), nz(ncl1)) allocate (zheigh(ncl1), zbhd(ncl1), zhbc(ncl1), nz(ncl1))
allocate (smaldc(ncl1), bigdc(ncl1)) allocate (smaldc(ncl1), bigdc(ncl1))
print *,' ' print *,' '
...@@ -133,7 +134,7 @@ WRITE(*,'(A)',advance='no') ' ***Make your choice: ' ...@@ -133,7 +134,7 @@ WRITE(*,'(A)',advance='no') ' ***Make your choice: '
READ *, data_flag READ *, data_flag
print *,' ' print *,' '
clwdth=2 !set diameter class-class width clwdth=15 !set diameter class-class width
corr_la=1. !standard value for leaf area correction in stands of high sum of crown projection areas corr_la=1. !standard value for leaf area correction in stands of high sum of crown projection areas
mixed_tot_ca=0. !sum of crown projection area for mixed stands mixed_tot_ca=0. !sum of crown projection area for mixed stands
pass = 1 !counter for number of passes through calculation loop for mixed stands pass = 1 !counter for number of passes through calculation loop for mixed stands
...@@ -256,7 +257,7 @@ CASE(1) ...@@ -256,7 +257,7 @@ CASE(1)
IF (datasets=='multi') THEN IF (datasets=='multi') THEN
select_lines=.false. select_lines=.false.
fl_num=0 fl_num=0
if(infile=='input/hyyti_ini_0616.txt') then
ALLOCATE(ngroups(10000)) ALLOCATE(ngroups(10000))
numstand= 0 numstand= 0
...@@ -291,7 +292,6 @@ if(infile=='input/hyyti_ini_0616.txt') then ...@@ -291,7 +292,6 @@ if(infile=='input/hyyti_ini_0616.txt') then
iF(baum(i).EQ.22) ngroups(nlines)%taxid=6 ! Larix iF(baum(i).EQ.22) ngroups(nlines)%taxid=6 ! Larix
iF(baum(i).EQ.23) ngroups(nlines)%taxid=7 ! Pinus strobus iF(baum(i).EQ.23) ngroups(nlines)%taxid=7 ! Pinus strobus
iF(baum(i).EQ.24) ngroups(nlines)%taxid=10 ! Douglasie iF(baum(i).EQ.24) ngroups(nlines)%taxid=10 ! Douglasie
IF (dm(i).eq.0) dm(i) = 0.5 IF (dm(i).eq.0) dm(i) = 0.5
IF (mhoe(i).eq.0) mhoe(i) = 1.0 IF (mhoe(i).eq.0) mhoe(i) = 1.0
IF (gf(i).eq.0) gf(i) = 0.25 IF (gf(i).eq.0) gf(i) = 0.25
...@@ -310,50 +310,6 @@ if(infile=='input/hyyti_ini_0616.txt') then ...@@ -310,50 +310,6 @@ if(infile=='input/hyyti_ini_0616.txt') then
3333 CONTINUE 3333 CONTINUE
nlines=nlines-1 nlines=nlines-1
WRITE(*,*) nlines,'sets of data', numstand, 'sets of stands' WRITE(*,*) nlines,'sets of data', numstand, 'sets of stands'
ELSE
IF(select_lines) THEN
READ(listunit,*)nlines_comp
ALLOCATE(locid_comp(nlines_comp))
DO i=1,nlines_comp ! reading list of sites to be initialised
READ(listunit,*) locid_comp(i)
ENDDO ! end reading list of sites to be initialised
ENDIF ! end of reading file with sites to be selected
IF(select_lines) CLOSE(listunit)
CALL assign_DSW
CALL init_plenter_param
READ (inunit,*)nlines
ALLOCATE(ngroups(nlines))
istart=1
READ(inunit,*) ngroups(1)%locid,ngroups(1)%schicht,ngroups(1)%BRAid,ngroups(1)%alter,ngroups(1)%patchsize,ngroups(1)%mhoe,ngroups(1)%dm,ngroups(1)%volume,ngroups(1)%gf
ngroups(1)%patchsize=ngroups(1)%patchsize*10000.
ngroups(1)%baumzahl=0
ngroups(istart)%standsize=ngroups(1)%patchsize
ngroups(1)%taxid=tax_of_BRA_id(ngroups(1)%BRAid)
DO i=2,nlines
READ(inunit,*) ngroups(i)%locid,ngroups(i)%schicht,ngroups(i)%BRAid,ngroups(i)%alter,ngroups(i)%patchsize,ngroups(i)%mhoe,ngroups(i)%dm,ngroups(i)%volume,ngroups(i)%gf
WRITE(*,*) 'set no', i, 'read'
ngroups(i)%baumzahl=0
! the following line maps BRAid 770 to 779, other 'Mehlbeeren', because two
! different numbering systems existed in Brandenburg in the course of time
IF(ngroups(i)%BRAid==770) ngroups(i)%BRAid=779
ngroups(i)%patchsize=ngroups(i)%patchsize*10000.
ngroups(i)%taxid=tax_of_BRA_id(ngroups(i)%BRAid)
IF(ngroups(i)%taxid==6) ngroups(i)%taxid=3
IF(ngroups(i)%taxid==0) THEN
ELSE
ENDIF
IF(ngroups(i)%locid==ngroups(istart)%locid) THEN
ngroups(istart)%standsize=ngroups(istart)%standsize+ngroups(i)%patchsize
ngroups(i)%standsize = ngroups(istart)%standsize
ELSE
istart=i
ngroups(istart)%standsize=ngroups(i)%patchsize
fl_num=fl_num+1
ENDIF
ENDDO ! readin loop for multi data-set
ENDIF ! block for direct DSW data or brb_inv-file structure
CLOSE(inunit) CLOSE(inunit)
! read in file headder for description, write into ini-file ! read in file headder for description, write into ini-file
cform=1;hlp_lai=0 cform=1;hlp_lai=0
...@@ -571,6 +527,7 @@ if(infile=='input/hyyti_ini_0616.txt') then ...@@ -571,6 +527,7 @@ if(infile=='input/hyyti_ini_0616.txt') then
! classification of single values in diameter cohorts ! classification of single values in diameter cohorts
clwdth=1+AINT((bhdmax-bhdmin)/ncl1) !calculation of class widths clwdth=1+AINT((bhdmax-bhdmin)/ncl1) !calculation of class widths
! write(4444,*) 'clwdth', clwdth, bhdmax, bhdmin, ncl1
DO i=1,ncl1 DO i=1,ncl1
nz(i)=0 nz(i)=0
zbhd(i)=0 zbhd(i)=0
...@@ -771,8 +728,9 @@ CASE(6) ...@@ -771,8 +728,9 @@ CASE(6)
g=ngroups(iz)%gf !basal area/ha g=ngroups(iz)%gf !basal area/ha
gpatch=g*4. !basal area/patch gpatch=g*4. !basal area/patch
bz=ngroups(iz)%baumzahl*4. !tree numbre/patch bz=ngroups(iz)%baumzahl*4. !tree numbre/patch
clwdth=dg/20. ! clwdth=dg/20.
clwdth=dg/5
! selection of uni-height curve: beech, spruce, oak calculation according to Weimann, ! selection of uni-height curve: beech, spruce, oak calculation according to Weimann,
! other species of trees after Kuleschis (vergl. Gerold 1990) ! other species of trees after Kuleschis (vergl. Gerold 1990)
IF (taxid==3.OR.taxid==5) THEN IF (taxid==3.OR.taxid==5) THEN
......
...@@ -165,6 +165,7 @@ do ...@@ -165,6 +165,7 @@ do
case (8, 9, 10) case (8, 9, 10)
call readsoil ! reading soil parameter call readsoil ! reading soil parameter
IF (flag_end .gt.0) return
call readredN ! Input redN or test resp. call readredN ! Input redN or test resp.
end select end select
endif endif
...@@ -198,7 +199,7 @@ call readlit ...@@ -198,7 +199,7 @@ call readlit
! Initialization of soil model with profile data ! Initialization of soil model with profile data
call soil_ini ! Aufruf ohne s_cn_ini call soil_ini ! Aufruf ohne s_cn_ini
! Initialization disturbances ! Initialization disturbances
IF (flag_dis .eq. 1) CALL dist_ini IF (flag_dis .eq. 1 .or. flag_dis .eq. 2) CALL dist_ini
! Initialization of stand ! Initialization of stand
call prepare_stand call prepare_stand
IF (flag_end .gt.0) return IF (flag_end .gt.0) return
...@@ -268,12 +269,13 @@ if (flag_eva .gt.10) call evapo_ini ...@@ -268,12 +269,13 @@ if (flag_eva .gt.10) call evapo_ini
subroutine readsoil ! Input of soil parameter subroutine readsoil ! Input of soil parameter
use data_par
use data_soil_t use data_soil_t
use data_site use data_site
implicit none implicit none
integer :: inunit, helpnl, helpnr integer :: inunit, helpnl, helpnr, ihelp
real helpgrw, hlong, hlat real helpgrw, hlong, hlat
character :: text character :: text
character(30) :: hor, boart, helpid character(30) :: hor, boart, helpid
...@@ -283,17 +285,15 @@ if (flag_trace) write (unit_trace, '(I4,I10,A)') iday, time_cur, ' readsoil' ...@@ -283,17 +285,15 @@ if (flag_trace) write (unit_trace, '(I4,I10,A)') iday, time_cur, ' readsoil'
! Setting of flag_surf from flag_cond ! Setting of flag_surf from flag_cond
select case (flag_cond) select case (flag_cond)
case (0,1,2,3) case (0,1,2,3)
flag_surf = 0 flag_surf = 0
case (10,11,12,13)
flag_surf = 1
case (20,21,22,23) case (10,11,12,13)
flag_surf = 2 flag_surf = 1
case (30,31,32,33) case (30,31,32,33)
flag_surf = 3 flag_surf = 3
end select end select
! Setting of flag_bc from flag_decomp ! Setting of flag_bc from flag_decomp
...@@ -479,7 +479,7 @@ IF (ex .eqv. .true.) then ...@@ -479,7 +479,7 @@ IF (ex .eqv. .true.) then
if (.not.flag_mult8910) print *,' >>>FORESEE message: soil_id ', soilid(ip), ' not found' if (.not.flag_mult8910) print *,' >>>FORESEE message: soil_id ', soilid(ip), ' not found'
if (.not.flag_mult8910) print *,' Check your input choice!!!' if (.not.flag_mult8910) print *,' Check your input choice!!!'
if (help==1) call dealloc_soil if (help==1) call dealloc_soil
CALL error_mess(time,"soil identificator not found"//adjustl(soilid(ip))//"ip No.",real(help_ip)) CALL error_mess(time,"soil identificator not found "//adjustl(soilid(ip))//"ip No.",real(help_ip))
flag_end = 5 flag_end = 5
return return
ENDIF ! ios ENDIF ! ios
...@@ -535,15 +535,11 @@ IF (ex .eqv. .true.) then ...@@ -535,15 +535,11 @@ IF (ex .eqv. .true.) then
endif endif
end do end do
IF (ios .ne.0) then IF (ios .ne.0) then
if (.not.flag_mult8910) print *,' >>>FORESEE message: Error during reading soil data!' print *,' >>>FORESEE message: Error during reading soil data!'
WRITE(*,'(A)',advance='no') ' Stop program (y/n)? ' print *, ' Program stopped!'
read *, a
IF ( a .eq. 'y' .or. a .eq. 'Y') then
print *, ' STOP program!'
stop
endif
IF (help==1) call dealloc_soil IF (help==1) call dealloc_soil
if (.not.flag_mult8910) print *,' Check your input choice!!!' flag_end = 7
return
endif ! ios endif ! ios
exit exit
endif endif
...@@ -556,7 +552,7 @@ IF (ex .eqv. .true.) then ...@@ -556,7 +552,7 @@ IF (ex .eqv. .true.) then
print *,' Check your input choice!!!' print *,' Check your input choice!!!'
endif endif
if (help==1) call dealloc_soil if (help==1) call dealloc_soil
CALL error_mess(time,"soil identificator not found"//adjustl(soilid(ip))//"ip No.",real(help_ip)) CALL error_mess(time,"soil identificator not found "//adjustl(soilid(ip))//"ip No.",real(help_ip))
flag_end = 5 flag_end = 5
return return
ENDIF ! ios ENDIF ! ios
...@@ -915,7 +911,7 @@ if (.not.flag_mult8910 .or. (flag_mult8910 .and. anh .eq. "1") .or. (flag_mult89 ...@@ -915,7 +911,7 @@ if (.not.flag_mult8910 .or. (flag_mult8910 .and. anh .eq. "1") .or. (flag_mult89
WRITE(unit_ctr,'(A66,I4)') 'Time step for photosynthesis calculations (days) - ns_pro: ',ns_pro WRITE(unit_ctr,'(A66,I4)') 'Time step for photosynthesis calculations (days) - ns_pro: ',ns_pro
WRITE(unit_ctr,'(A66,I4)') 'Mortality (0-OFF,1-ON stress, 2- ON stress+intr) - flag_mort: ',flag_mort WRITE(unit_ctr,'(A66,I4)') 'Mortality (0-OFF,1-ON stress, 2- ON stress+intr) - flag_mort: ',flag_mort
WRITE(unit_ctr,'(A66,I4)') 'Regeneration (0-OFF,1-ON, 2-weekly growth of seedl.) - flag_reg: ',flag_reg WRITE(unit_ctr,'(A66,I4)') 'Regeneration (0-OFF,1-ON, 2-weekly growth of seedl.) - flag_reg: ',flag_reg
WRITE(unit_ctr,'(A66,I4)') 'use FORSKA for regeneration (0-OFF,1-ON) - flag_forska: ',flag_forska WRITE(unit_ctr,'(A66,I4)') 'use FORSKA for regeneration (0-OFF,1-ON) - flag_forska: ',flag_lambda
WRITE(unit_ctr,'(A66,I4)') 'Stand initialization (0-no,1-from *.ini,2-generate) - flag_stand: ',flag_stand WRITE(unit_ctr,'(A66,I4)') 'Stand initialization (0-no,1-from *.ini,2-generate) - flag_stand: ',flag_stand
WRITE(unit_ctr,'(A66,I4)') 'Ground vegetation initialization (0-no,1-generate) - flag_sveg: ',flag_sveg WRITE(unit_ctr,'(A66,I4)') 'Ground vegetation initialization (0-no,1-generate) - flag_sveg: ',flag_sveg
WRITE(unit_ctr,'(A66,I4)') 'Stand management (0-no,1-yes, 2 - seed once) - flag_mg: ',flag_mg WRITE(unit_ctr,'(A66,I4)') 'Stand management (0-no,1-yes, 2 - seed once) - flag_mg: ',flag_mg
...@@ -1179,22 +1175,17 @@ real hNO, hNH ...@@ -1179,22 +1175,17 @@ real hNO, hNH
if (flag_trace) write (unit_trace, '(I4,I10,A)') iday, time_cur, ' readdepo' if (flag_trace) write (unit_trace, '(I4,I10,A)') iday, time_cur, ' readdepo'
if (.not.allocated(NOd)) allocate (NOd (1:366,1:year))
if (.not.allocated(NHd)) allocate (NHd (1:366, 1:year))
! for areal usage standard/constant deposition is set as concentration: ! for areal usage standard/constant deposition is set as concentration:
if (flag_multi .eq. 8 .or. flag_mult910) then if (flag_multi .eq. 8 .or. flag_mult910) then
flag_depo = 2 flag_depo = 2
if (.not.allocated(NOd)) then NOd = NOdep(ip) ! concentration mg/l
allocate (NOd (1:366,1:year)) NHd = NHdep(ip) ! concentration mg/l
NOd = NOdep(ip) ! concentration mg/l
endif
if (.not.allocated(NHd)) then
allocate (NHd (1:366,1:year))
NHd = NHdep(ip) ! concentration mg/l
endif
return return
endif endif
if (.not.allocated(NOd)) allocate (NOd (1:366,1:year))
if (.not.allocated(NHd)) allocate (NHd (1:366, 1:year))
NOd = 0. NOd = 0.
NHd = 0. NHd = 0.
...@@ -1427,6 +1418,7 @@ END subroutine readdepo ...@@ -1427,6 +1418,7 @@ END subroutine readdepo
SUBROUTINE readredN SUBROUTINE readredN
use data_out use data_out
use data_site
use data_species use data_species
use data_stand use data_stand
use data_simul use data_simul
......
...@@ -32,7 +32,6 @@ character a ...@@ -32,7 +32,6 @@ character a
character(8) actdate character(8) actdate
character(10) acttime, helpsim, text1, text2 character(10) acttime, helpsim, text1, text2
real time1, time2, time3 real time1, time2, time3
logical lhelp
unit_err=getunit() unit_err=getunit()
if(flag_multi.eq.5) dirout = './' if(flag_multi.eq.5) dirout = './'
...@@ -46,20 +45,6 @@ write (unit_trace, '(I4,I10,A)') iday, time_cur, ' sim_control' ...@@ -46,20 +45,6 @@ write (unit_trace, '(I4,I10,A)') iday, time_cur, ' sim_control'
! check daily output ! check daily output
if (year > 5 .and. flag_dayout .ge. 1) then if (year > 5 .and. flag_dayout .ge. 1) then
lhelp = .true.
do i = 1,outd_n
if (outd(i)%out_flag .eq. flag_dayout) then
select CASE (outd(i)%kind_name)
CASE ('day_short')
lhelp = .false.
end select
endif
enddo
if (lhelp) then
write(*,*) ' Warning: Your choice of daily output is ON with a simulation time of' write(*,*) ' Warning: Your choice of daily output is ON with a simulation time of'
write(*,'(I6,A,I8,A)') year,' years. This option will create ',365*year,' data records per file!' write(*,'(I6,A,I8,A)') year,' years. This option will create ',365*year,' data records per file!'
write(*,'(A)',advance='no') ' Do you really want do use daily output (y/n)? ' write(*,'(A)',advance='no') ' Do you really want do use daily output (y/n)? '
...@@ -67,7 +52,6 @@ if (year > 5 .and. flag_dayout .ge. 1) then ...@@ -67,7 +52,6 @@ if (year > 5 .and. flag_dayout .ge. 1) then
IF (a .eq. 'n' .or. a .eq. 'N') then IF (a .eq. 'n' .or. a .eq. 'N') then
flag_dayout = 0 flag_dayout = 0
ENDIF ENDIF
endif ! lhelp
ENDIF ENDIF
! open file ycomp (yearly compressed output (multi run)) ! open file ycomp (yearly compressed output (multi run))
...@@ -136,10 +120,14 @@ time3 = 0. ...@@ -136,10 +120,14 @@ time3 = 0.
case (5) case (5)
print*,ip, ' stop in readsoil, soil ID not found ', adjustl(soilid(ip)) print*,ip, ' stop in readsoil, soil ID not found ', adjustl(soilid(ip))
case (6) case (6)
write(*,'(A,I5)') ' >>>foresee message: stop in read_cli - no climate data for year ',time_b write(*,'(A,I5)') ' >>>foresee message: stop in read_cli, no climate data for year ',time_b
call finish_simul
stop
case (7)
print*,ip, ' stop in readsoil, error during reading soil data ', adjustl(soilid(ip))
call finish_simul call finish_simul
stop stop
case default case default
print*,ip, 'flag_end = ', flag_end print*,ip, 'flag_end = ', flag_end
end select end select
...@@ -228,7 +216,7 @@ if (flag_trace) write (unit_trace, '(I4,I10,A)') iday, time_cur, ' simulation_4C ...@@ -228,7 +216,7 @@ if (flag_trace) write (unit_trace, '(I4,I10,A)') iday, time_cur, ' simulation_4C
DO time = 1, year DO time = 1, year
iday = 1 iday = 1
! Update population variable for new year if population is changed through interventions ! Update population variable for new year if population is changed through interventions
if (flag_standup .gt. 0 .or. flag_dis==1) then if (flag_standup .gt. 0 .or. flag_dis==1 .or. flag_dis==1) then
call stand_balance call stand_balance
call standup call standup
flag_standup = 0 flag_standup = 0
...@@ -239,7 +227,10 @@ if (flag_trace) write (unit_trace, '(I4,I10,A)') iday, time_cur, ' simulation_4C ...@@ -239,7 +227,10 @@ if (flag_trace) write (unit_trace, '(I4,I10,A)') iday, time_cur, ' simulation_4C
! read or create Redn for areal application ! read or create Redn for areal application
IF (time.EQ.1 .and. flag_redn) CALL RedN_ini IF (time.EQ.1 .and. flag_redn) CALL RedN_ini
IF (flag_dis .eq. 1) CALL dis_manag
IF (flag_dis .eq. 1 .or. flag_dis .eq. 2) then
CALL dis_manag
endif
! simulation of processes with subannual resolution (fluxes and soil) ! simulation of processes with subannual resolution (fluxes and soil)
CALL stand_daily CALL stand_daily
......
...@@ -453,12 +453,6 @@ CASE (0, 10, 20, 30, 40) ! de Vries ...@@ -453,12 +453,6 @@ CASE (0, 10, 20, 30, 40) ! de Vries
tcond0 = numera/denom * 86400. ! s --> day tcond0 = numera/denom * 86400. ! s --> day
CASE(2, 12, 22, 32, 42) ! sum like resistor; wie Widerstaende addieren
tcond2 = water%vf / water%tc + quarz%vf / quarz%tc + clay%vf / clay%tc + &
silt%vf / silt%tc + humus%vf / humus%tc + air%vf / air%tc + stone%vf / stone%tc + ice%vf / ice%tc
tcond2 = 86400. / tcond2
CASE(3, 13, 23, 33, 43) ! Campbell CASE(3, 13, 23, 33, 43) ! Campbell
vfm = clay%vf + silt%vf + stone%vf vfm = clay%vf + silt%vf + stone%vf
vfs = vfm + quarz%vf + humus%vf vfs = vfm + quarz%vf + humus%vf
...@@ -504,13 +498,6 @@ CASE (1, 11, 21, 31, 41) ! Neusypina ...@@ -504,13 +498,6 @@ CASE (1, 11, 21, 31, 41) ! Neusypina
hcapi = hcap1 hcapi = hcap1
tcondi = tcond1 tcondi = tcond1
CASE (2, 12, 22, 32, 42) ! sum like resitors; Widerstnde addieren
if ((tcond2 .gt. 8000.) .or. (tcond2 .le. 0.)) then
continue
endif
hcapi = hcap0
tcondi = tcond2
CASE (3, 13, 23, 33, 43) ! Campbell CASE (3, 13, 23, 33, 43) ! Campbell
hcapi = hcap0 hcapi = hcap0
tcondi = tcond3 tcondi = tcond3
......
...@@ -104,7 +104,12 @@ do ...@@ -104,7 +104,12 @@ do
sumbio = sumbio + ntr * zeig%coh%totBio sumbio = sumbio + ntr * zeig%coh%totBio
sumNPP = sumNPP + ntr * zeig%coh%NPP sumNPP = sumNPP + ntr * zeig%coh%NPP
Ndem = Ndem + ntr * zeig%coh%Ndemc_c Ndem = Ndem + ntr * zeig%coh%Ndemc_c
autresp = autresp + ntr * zeig%coh%maintres select case (flag_dis)
case (0,1)
autresp = autresp + ntr * zeig%coh%maintres
case (2)
autresp = autresp + ntr * (zeig%coh%maintres+zeig%coh%biocost_all)
end select
totfol = totfol + ntr * zeig%coh%x_fol totfol = totfol + ntr * zeig%coh%x_fol
totsap = totsap + ntr * zeig%coh%x_sap totsap = totsap + ntr * zeig%coh%x_sap
totfrt = totfrt + ntr * zeig%coh%x_frt totfrt = totfrt + ntr * zeig%coh%x_frt
...@@ -498,10 +503,6 @@ svar%frt = 0. ...@@ -498,10 +503,6 @@ svar%frt = 0.
END SELECT END SELECT
Enddo Enddo
IF(spar(spec_new)%phmodel==4) THEN IF(spar(spec_new)%phmodel==4) THEN
svar(spec_new)%daybb = svar(spec_new)%ext_daybb svar(spec_new)%daybb = svar(spec_new)%ext_daybb
ELSE ELSE
...@@ -543,7 +544,7 @@ do i=1,nspecies ...@@ -543,7 +544,7 @@ do i=1,nspecies
svar(i)%mean_diam = svar(i)%mean_diam / ntr svar(i)%mean_diam = svar(i)%mean_diam / ntr
svar(i)%mean_jrb = svar(i)%mean_jrb / ntr svar(i)%mean_jrb = svar(i)%mean_jrb / ntr
svar(i)%basal_area = pi*ntr*(svar(i)%med_diam*svar(i)%med_diam/40000)*10000/kpatchsize svar(i)%basal_area = pi*(ntr-helpdiam(i))*(svar(i)%med_diam*svar(i)%med_diam/40000)*10000/kpatchsize
else else
svar(i)%sum_ntreea = 0. svar(i)%sum_ntreea = 0.
endif endif
...@@ -1083,8 +1084,14 @@ IMPLICIT NONE ...@@ -1083,8 +1084,14 @@ IMPLICIT NONE
DO DO
IF(.not.associated(zeig)) exit IF(.not.associated(zeig)) exit
if (zeig%coh%species.ne.nspec_tree+2) then ! exclude mistletoe from senescence if (zeig%coh%species.ne.nspec_tree+2) then ! exclude mistletoe from senescence
zeig%coh%sfol = spar(zeig%coh%species)%psf * zeig%coh%x_fol select case (flag_dis)
zeig%coh%sfrt = spar(zeig%coh%species)%psr * zeig%coh%x_frt ! case (1,2)
! zeig%coh%sfol = spar(zeig%coh%species)%psf * zeig%coh%x_fol + zeig%coh%x_fol_loss
! zeig%coh%sfrt = spar(zeig%coh%species)%psr * zeig%coh%x_frt + zeig%coh%x_frt_loss
case (0,1,2)
zeig%coh%sfol = spar(zeig%coh%species)%psf * zeig%coh%x_fol
zeig%coh%sfrt = spar(zeig%coh%species)%psr * zeig%coh%x_frt
end select
IF (zeig%coh%height.ge.thr_height .and.zeig%coh%species.LE. nspec_tree) THEN IF (zeig%coh%height.ge.thr_height .and.zeig%coh%species.LE. nspec_tree) THEN
zeig%coh%ssap = spar(zeig%coh%species)%pss * zeig%coh%x_sap zeig%coh%ssap = spar(zeig%coh%species)%pss * zeig%coh%x_sap
ELSE ELSE
......
!MS$FREEFORM
! Microsoft Developer Studio generated include file.
! Used by script1.rc
!
integer, parameter :: IDD_4C = 101
integer, parameter :: IDD_4C_ctr = 102
integer, parameter :: IDD_4C_flags = 109
integer, parameter :: IDD_4C_files = 111
integer, parameter :: IDB_BITMAP3 = 115
integer, parameter :: IDD_4C_out = 116
integer, parameter :: IDD_4C_yearly = 118
integer, parameter :: IDD_4C_daily = 119
integer, parameter :: IDD_4C_coh_yearly = 120
integer, parameter :: IDD_4C_coh_daily = 121
integer, parameter :: IDD_default_dir = 122
integer, parameter :: IDD_4C_default_dir = 122
integer, parameter :: IDD_4C_main = 123
integer, parameter :: IDD_4C_ids = 126
integer, parameter :: IDB_BITMAP1 = 131
integer, parameter :: IDC_STATIC_Control = 1005
integer, parameter :: IDC_STATIC_4C = 1017
integer, parameter :: IDC_COMBO_runv = 1019
integer, parameter :: IDC_RADIO_ctrfile = 1020
integer, parameter :: IDC_COMBO_runv3 = 1020
integer, parameter :: IDC_RADIO_ctredit = 1024
integer, parameter :: IDC_STATIC_simul = 1034
integer, parameter :: IDC_STATIC_runv = 1036
integer, parameter :: IDC_STATIC_runnr = 1037
integer, parameter :: IDC_STATIC_runv3 = 1038
integer, parameter :: IDC_EDIT_runnr = 1044
integer, parameter :: IDC_STATIC_runo = 1046
integer, parameter :: IDC_STATIC_runo3 = 1047
integer, parameter :: IDC_EDIT_yearn = 1048
integer, parameter :: IDC_EDIT_start = 1049
integer, parameter :: IDC_STATIC_yearn = 1050
integer, parameter :: IDC_STATIC_start = 1051
integer, parameter :: IDC_EDIT_patch = 1052
integer, parameter :: IDC_STATIC_patch = 1053
integer, parameter :: IDC_STATIC_model = 1055
integer, parameter :: IDC_EDIT_thickf = 1056
integer, parameter :: IDC_EDIT_timeph = 1057
integer, parameter :: IDC_STATIC_thickf = 1058
integer, parameter :: IDC_STATIC_timeph = 1059
integer, parameter :: IDC_STATIC_mort = 1060
integer, parameter :: IDC_STATIC_reg = 1061
integer, parameter :: IDC_STATIC_forska = 1062
integer, parameter :: IDC_COMBO_mort = 1063
integer, parameter :: IDC_COMBO_reg = 1064
integer, parameter :: IDC_COMBO_forska = 1065
integer, parameter :: IDC_STATIC_stand = 1066
integer, parameter :: IDC_STATIC_sveg = 1067
integer, parameter :: IDC_STATIC_mg = 1068
integer, parameter :: IDC_STATIC_dis = 1069
integer, parameter :: IDC_STATIC_light = 1070
integer, parameter :: IDC_STATIC_folhei = 1071
integer, parameter :: IDC_COMBO_stand = 1072
integer, parameter :: IDC_COMBO_sveg = 1073
integer, parameter :: IDC_COMBO_mg = 1074
integer, parameter :: IDC_COMBO_dis = 1075
integer, parameter :: IDC_COMBO_light = 1076
integer, parameter :: IDC_COMBO_folhei = 1077
integer, parameter :: IDC_COMBO_volfunc = 1078
integer, parameter :: IDC_STATIC_volfunc = 1079
integer, parameter :: IDC_STATIC_resp = 1080
integer, parameter :: IDC_STATIC_limi = 1081
integer, parameter :: IDC_STATIC_decomp = 1082
integer, parameter :: IDC_STATIC_sign = 1083
integer, parameter :: IDC_STATIC_wred = 1084
integer, parameter :: IDC_STATIC_wurz = 1085
integer, parameter :: IDC_STATIC_cond = 1086
integer, parameter :: IDC_COMBO_resp = 1088
integer, parameter :: IDC_COMBO_limi = 1089
integer, parameter :: IDC_COMBO_decomp = 1090
integer, parameter :: IDC_COMBO_sign = 1091
integer, parameter :: IDC_COMBO_wred = 1092
integer, parameter :: IDC_COMBO_wurz = 1093
integer, parameter :: IDC_COMBO_cond = 1094
integer, parameter :: IDC_COMBO_int = 1095
integer, parameter :: IDC_COMBO_eva = 1096
integer, parameter :: IDC_STATIC_int = 1097
integer, parameter :: IDC_STATIC_eva = 1098
integer, parameter :: IDC_STATIC_sort = 1099
integer, parameter :: IDC_STATIC_wpm = 1100
integer, parameter :: IDC_COMBO_CO2 = 1101
integer, parameter :: IDC_STATIC_stat = 1102
integer, parameter :: IDC_COMBO_sort = 1103
integer, parameter :: IDC_COMBO_wpm = 1104
integer, parameter :: IDC_COMBO_stat = 1105
integer, parameter :: IDC_STATIC_files = 1108
integer, parameter :: IDC_STATIC_specpar = 1109
integer, parameter :: IDC_EDIT_specpar = 1110
integer, parameter :: IDC_BUTTON_specpar = 1111
integer, parameter :: IDC_BUTTON_ini = 1112
integer, parameter :: IDC_BUTTON_sop = 1113
integer, parameter :: IDC_STATIC_dir1 = 1114
integer, parameter :: IDC_STATIC_dirin = 1114
integer, parameter :: IDC_BUTTON_soi = 1115
integer, parameter :: IDC_STATIC_dirout = 1115
integer, parameter :: IDC_STATIC_soi = 1116
integer, parameter :: IDC_EDIT_sop = 1117
integer, parameter :: IDC_EDIT_soi = 1118
integer, parameter :: IDC_STATIC_ini = 1119
integer, parameter :: IDC_EDIT_ini = 1120
integer, parameter :: IDC_STATIC_ini1 = 1121
integer, parameter :: IDC_BUTTON_man = 1122
integer, parameter :: IDC_STATIC_cli = 1123
integer, parameter :: IDC_BUTTON_dep = 1124
integer, parameter :: IDC_BUTTON_red = 1125
integer, parameter :: IDC_BUTTON_lit = 1126
integer, parameter :: IDC_RADIO_single_ini = 1127
integer, parameter :: IDC_RADIO_multi_ini = 1128
integer, parameter :: IDC_STATIC_standid = 1129
integer, parameter :: IDC_EDIT_standid = 1130
integer, parameter :: IDC_STATIC_man = 1131
integer, parameter :: IDC_EDIT_man = 1132
integer, parameter :: IDC_STATIC_dep = 1133
integer, parameter :: IDC_EDIT_dep = 1134
integer, parameter :: IDC_EDIT_red = 1135
integer, parameter :: IDC_EDIT_lit = 1136
integer, parameter :: IDC_STATIC_lit = 1137
integer, parameter :: IDC_STATIC_red = 1138
integer, parameter :: IDC_STATIC_dir2 = 1139
integer, parameter :: IDC_STATIC_sop = 1140
integer, parameter :: IDC_EDIT_cli = 1141
integer, parameter :: IDC_BUTTON_cli = 1142
integer, parameter :: IDC_BUTTON_DIR = 1143
integer, parameter :: IDC_EDIT_cli2 = 1144
integer, parameter :: IDC_EDIT_DIR = 1144
integer, parameter :: IDC_EDIT_DIR_IN = 1144
integer, parameter :: IDC_STATIC_name = 1145
integer, parameter :: IDC_EDIT_DIR_OUT = 1145
integer, parameter :: IDC_EDIT_sitename = 1147
integer, parameter :: IDC_STATIC_nameall = 1148
integer, parameter :: IDC_RADIO_idy = 1149
integer, parameter :: IDC_RADIO_idn = 1150
integer, parameter :: IDC_STATIC_id = 1151
integer, parameter :: IDC_STATIC_year = 1152
integer, parameter :: IDC_STATIC_yearly = 1153
integer, parameter :: IDC_CHECK_y1 = 1161
integer, parameter :: IDC_CHECK_y2 = 1162
integer, parameter :: IDC_CHECK_y3 = 1163
integer, parameter :: IDC_CHECK_y4 = 1164
integer, parameter :: IDC_CHECK_y5 = 1165
integer, parameter :: IDC_CHECK_y6 = 1166
integer, parameter :: IDC_CHECK_y7 = 1167
integer, parameter :: IDC_CHECK_y8 = 1168
integer, parameter :: IDC_CHECK_y9 = 1169
integer, parameter :: IDC_CHECK_y10 = 1170
integer, parameter :: IDC_CHECK_y11 = 1171
integer, parameter :: IDC_CHECK_y12 = 1172
integer, parameter :: IDC_CHECK_y13 = 1173
integer, parameter :: IDC_CHECK_y14 = 1174
integer, parameter :: IDC_CHECK_y15 = 1175
integer, parameter :: IDC_CHECK_y16 = 1176
integer, parameter :: IDC_CHECK_y17 = 1177
integer, parameter :: IDC_CHECK_y18 = 1178
integer, parameter :: IDC_CHECK_y19 = 1179
integer, parameter :: IDC_CHECK_y20 = 1180
integer, parameter :: IDC_CHECK_y21 = 1181
integer, parameter :: IDC_CHECK_y22 = 1182
integer, parameter :: IDC_CHECK_y23 = 1183
integer, parameter :: IDC_CHECK_y24 = 1184
integer, parameter :: IDC_CHECK_y25 = 1185
integer, parameter :: IDC_CHECK_y26 = 1186
integer, parameter :: IDC_CHECK_y27 = 1187
integer, parameter :: IDC_CHECK_y28 = 1188
integer, parameter :: IDC_STATIC_yfile = 1189
integer, parameter :: IDC_BUTTON_yearly = 1190
integer, parameter :: IDC_CHECK_y29 = 1190
integer, parameter :: IDC_BUTTON_daily = 1191
integer, parameter :: IDC_CHECK_y30 = 1191
integer, parameter :: IDC_BUTTON_coh_yearly = 1192
integer, parameter :: IDC_CHECK_y31 = 1192
integer, parameter :: IDC_BUTTON_coh_daily = 1193
integer, parameter :: IDC_CHECK_y32 = 1193
integer, parameter :: IDC_STATIC_choice_out = 1194
integer, parameter :: IDC_CHECK_y33 = 1194
integer, parameter :: IDC_STATIC_daily = 1195
integer, parameter :: IDC_CHECK_y34 = 1195
integer, parameter :: IDC_COMBO_daily = 1196
integer, parameter :: IDC_CHECK_y35 = 1196
integer, parameter :: IDC_STATIC_coh_daily = 1197
integer, parameter :: IDC_CHECK_y36 = 1197
integer, parameter :: IDC_COMBO_coh_daily = 1198
integer, parameter :: IDC_CHECK_y37 = 1198
integer, parameter :: IDC_CHECK_y38 = 1199
integer, parameter :: IDC_CHECK_y39 = 1200
integer, parameter :: IDC_CHECK_y40 = 1201
integer, parameter :: IDC_CHECK_y41 = 1202
integer, parameter :: IDC_CHECK_y42 = 1203
integer, parameter :: IDC_COMBO_coh_yearly = 1204
integer, parameter :: IDC_STATIC_coh_yearly = 1205
integer, parameter :: IDC_STATIC_SUM = 1206
integer, parameter :: IDC_CHECK_y43 = 1206
integer, parameter :: ID4C_BUTTON_OK = 1208
integer, parameter :: ID_CTR_BUTTON_FLAGS = 1209
integer, parameter :: ID_CTR_BUTTON_OK = 1210
integer, parameter :: ID_FILES_BUTTON_OK = 1211
integer, parameter :: ID_CTR_BUTTON_FILES = 1212
integer, parameter :: ID_OUT_BUTTON_BACK = 1213
integer, parameter :: ID_START = 1214
integer, parameter :: ID_SAVE = 1215
integer, parameter :: ID_YEARLY_BUTTON_OK = 1216
integer, parameter :: ID_DAILY_BUTTON_OK = 1217
integer, parameter :: ID_YEARLYCOH_BUTTON_OK = 1218
integer, parameter :: ID_FLAGS_BUTTON_OK = 1219
integer, parameter :: ID_DAILYCOH_BUTTON_OK = 1220
integer, parameter :: ID_CTR_BUTTON_RUNNR = 1221
integer, parameter :: ID_DEFAULT_DIR_BUTTON_OK = 1222
integer, parameter :: ID_START_4C = 1226
integer, parameter :: IDSTOP = 1227
integer, parameter :: IDC_RADIO_start = 1229
integer, parameter :: IDC_RADIO_start_dir = 1230
integer, parameter :: IDC_RADIO_edit = 1231
integer, parameter :: ID_CANCEL_FLAGS = 1232
integer, parameter :: IDC_EDIT_ID = 1233
integer, parameter :: ID_CANCEL_FILES = 1233
integer, parameter :: IDC_COMBO_standid = 1234
integer, parameter :: ID_CANCEL_IDS = 1234
integer, parameter :: IDC_STATIC_spinup = 1235
integer, parameter :: IDC_EDIT_spinup = 1236
integer, parameter :: IDC_EDIT_wpm = 1236
integer, parameter :: ID_CANCEL_OUTF = 1236
integer, parameter :: IDC_BUTTON_spinup = 1237
integer, parameter :: IDC_STATIC_mes = 1237
integer, parameter :: ID_CTR_BUTTON_IDS = 1238
integer, parameter :: IDC_EDIT_mes = 1238
integer, parameter :: IDC_COMBO_yearly = 1239
integer, parameter :: IDC_COMBO_sum = 1240
integer, parameter :: ID_IDS_BUTTON_OK = 1242
integer, parameter :: ID_YEARLY_BUTTON_SELECT = 1248
integer, parameter :: ID_YEARLY_BUTTON_DESELECT = 1249
integer, parameter :: IDC_BUTTON_wpm = 1250
integer, parameter :: ID_DAILY_BUTTON_SELECT = 1250
integer, parameter :: IDC_BUTTON_mes = 1251
integer, parameter :: ID_DAILY_BUTTON_DESELECT = 1251
integer, parameter :: ID_DAILYCOH_BUTTON_SELECT = 1252
integer, parameter :: ID_DAILYCOH_BUTTON_DESELECT = 1253
integer, parameter :: ID_YEARLYCOH_BUTTON_SELECT = 1254
integer, parameter :: ID_YEARLYCOH_BUTTON_DESELECT = 1255
integer, parameter :: IDC_CHECK_y44 = 1256
integer, parameter :: IDC_STATIC_CO2 = 1256
integer, parameter :: IDC_CHECK_y45 = 1257
integer, parameter :: IDC_CHECK_y46 = 1258
integer, parameter :: IDC_CHECK_y47 = 1259
integer, parameter :: IDC_CHECK_y48 = 1260
integer, parameter :: IDC_CHECK_y49 = 1261
integer, parameter :: IDC_REBAR1 = 1262
integer, parameter :: IDC_CHECK_y50 = 1001
integer, parameter :: IDC_CHECK_y51 = 1002