diff --git a/data-raw/generate_biomee_driver_data_DBEN.R b/data-raw/generate_biomee_driver_data_DBEN.R index f2788982..677711a0 100644 --- a/data-raw/generate_biomee_driver_data_DBEN.R +++ b/data-raw/generate_biomee_driver_data_DBEN.R @@ -159,13 +159,13 @@ params_soil <- tibble( init_cohort <- tibble( init_n_cohorts = 1, # number of PFTs: 1,2,3,4,... init_cohort_species = seq(1, 10), # indicates sps # 1 - Fagus sylvatica - init_cohort_nindivs = 0.05, # initial individual density, individual/m2 ! 1 indiv/m2 = 10.000 indiv/ha - init_cohort_bl = 0.0, # initial biomass of leaves, kg C/individual - init_cohort_br = 0.0, # initial biomass of fine roots, kg C/individual - init_cohort_bsw = 0.05, # initial biomass of sapwood, kg C/individual - init_cohort_bHW = 0.0, # initial biomass of heartwood, kg C/tree - init_cohort_seedC = 0.0, # initial biomass of seeds, kg C/individual - init_cohort_nsc = 0.05 # initial non-structural biomass + init_cohort_nindivs = 0.05, + init_cohort_bl = 0.0, + init_cohort_br = 0.0, + init_cohort_bsw = 0.05, + init_cohort_bHW = 0.0, + init_cohort_seedC = 0.0, + init_cohort_nsc = 0.05 ) init_soil <- tibble( #list diff --git a/src/vegetation_biomee.mod.f90 b/src/vegetation_biomee.mod.f90 index feb67d04..226d2973 100755 --- a/src/vegetation_biomee.mod.f90 +++ b/src/vegetation_biomee.mod.f90 @@ -490,9 +490,10 @@ subroutine vegn_phenology( vegn ) integer :: i ! real :: grassdensity ! for grasses only ! real :: BL_u,BL_c + integer :: GrassMaxL = 3 real :: ccNSC, ccNSN - logical :: cc_firstday = .false. - logical :: TURN_ON_life = .false., TURN_OFF_life + logical :: cc_firstday != .false. + logical :: TURN_ON_life, TURN_OFF_life vegn%litter = 0 ! daily litter @@ -513,12 +514,19 @@ subroutine vegn_phenology( vegn ) if (sp%phenotype==1 .and. cc%status==LEAF_OFF) cc%status=LEAF_ON ! for deciduous and grasses - TURN_ON_life = (sp%phenotype == 0 .and. & - cc%status == LEAF_OFF .and. & - cc%gdd > sp%gdd_crit .and. & - vegn%tc_pheno > sp%tc_crit_on) .and. & - (sp%lifeform .ne. 0 .OR.(sp%lifeform .eq. 0 .and. cc%layer==1)) - + !TURN_ON_life = (sp%phenotype == 0 .and. & + ! cc%status == LEAF_OFF .and. & + ! cc%gdd > sp%gdd_crit .and. & + ! vegn%tc_pheno > sp%tc_crit_on) .and. & + ! (sp%lifeform .ne. 0 .OR.(sp%lifeform .eq. 0 .and. cc%layer==1)) + + TURN_ON_life = ((sp%phenotype==0 .and. cc%status/=LEAF_ON) & + .and.(cc%gdd>sp%gdd_crit .and. vegn%tc_pheno>sp%tc_crit_on) & ! Thermal conditions + !.and.(vegn%thetaS>sp%betaON .and. cc%Ndm>Days_thld) & ! Water + .and.(vegn%thetaS>sp%betaON) & ! Water + .and.(.NOT.(sp%lifeform==0 .and. cc%layer > GrassMaxL)) & ! If grasses, layer< 3 + ) + cc_firstday = .false. if (TURN_ON_life) then cc%status = LEAF_ON ! Turn on a growing season