Skip to content

Commit

Permalink
cleaning all for PR
Browse files Browse the repository at this point in the history
  • Loading branch information
Marius Lambert committed Feb 14, 2022
1 parent 09e6aab commit c6007b1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
7 changes: 3 additions & 4 deletions biogeochem/EDCohortDynamicsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,8 @@ subroutine zero_cohort(cc_p)
! !LOCAL VARIABLES:
type (ed_cohort_type) , pointer :: currentCohort
!----------------------------------------------------------------------

currentCohort => cc_p

currentCohort%NV = 0
currentCohort%status_coh = 0
currentCohort%rdark = 0._r8
Expand All @@ -653,8 +653,7 @@ subroutine zero_cohort(cc_p)
currentcohort%gpp_tstep = 0._r8
currentcohort%resp_tstep = 0._r8
currentcohort%resp_acc_hold = 0._r8
currentCohort%hard_level = 0._r8

currentCohort%hard_level = 0._r8
currentcohort%year_net_uptake(:) = 999._r8 ! this needs to be 999, or trimming of new cohorts will break.
currentcohort%ts_net_uptake(:) = 0._r8
currentcohort%fraction_crown_burned = 0._r8
Expand Down Expand Up @@ -1885,7 +1884,7 @@ subroutine copy_cohort( currentCohort,copyc )
n%cambial_mort = o%cambial_mort

! Plant Hydraulics

if( hlm_use_planthydro.eq.itrue ) then
call CopyCohortHydraulics(n,o)
endif
Expand Down
13 changes: 4 additions & 9 deletions biogeochem/EDMortalityFunctionsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ module EDMortalityFunctionsMod
use FatesInterfaceTypesMod , only : hlm_current_day
implicit none
private



public :: mortality_rates
public :: Mortality_Derivative
public :: Hardening_scheme
Expand Down Expand Up @@ -85,7 +84,7 @@ subroutine mortality_rates( currentSite,cohort_in,bc_in,cmort,hmort,bmort,frmort
real(r8) :: flc ! fractional loss of conductivity
real(r8) :: max_h !maximum hardiness level
real(r8), parameter :: min_h = -2.0_r8 !minimum hardiness level
real(r8) :: Tmin !marius
real(r8) :: Tmin
real(r8), parameter :: frost_mort_buffer = 5.0_r8 ! 5deg buffer for freezing mortality
logical, parameter :: test_zero_mortality = .false. ! Developer test which
! may help to debug carbon imbalances
Expand Down Expand Up @@ -142,7 +141,8 @@ subroutine mortality_rates( currentSite,cohort_in,bc_in,cmort,hmort,bmort,frmort
min_fmc = min(min_fmc, min_fmc_ar)
flc = 1.0_r8-min_fmc
if(flc >= hf_flc_threshold .and. hf_flc_threshold < 1.0_r8 )then
hmort = (flc-hf_flc_threshold)/(1.0_r8-hf_flc_threshold) * EDPftvarcon_inst%mort_scalar_hydrfailure(cohort_in%pft)
hmort = (flc-hf_flc_threshold)/(1.0_r8-hf_flc_threshold) * &
EDPftvarcon_inst%mort_scalar_hydrfailure(cohort_in%pft)
else
hmort = 0.0_r8
endif
Expand Down Expand Up @@ -403,8 +403,3 @@ subroutine Hardening_scheme(currentSite,currentPatch,cohort_in,bc_in ) !marius
end subroutine Hardening_scheme

end module EDMortalityFunctionsMod





0 comments on commit c6007b1

Please sign in to comment.