Skip to content

Commit 87a6385

Browse files
authored
Merge pull request #287 from rgknox/rgknox-slascaler-fix
removed slascaler and various fates parameter changes
2 parents b6b3a86 + 87c0fd7 commit 87a6385

File tree

5 files changed

+49
-35
lines changed

5 files changed

+49
-35
lines changed

biogeochem/EDGrowthFunctionsMod.F90

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ real(r8) function Hite( cohort_in )
8383
! if the hite is larger than the maximum allowable height (set by dbhmax) then
8484
! set the height to the maximum value.
8585
! this could do with at least re-factoring and probably re-thinking. RF
86-
if(cohort_in%dbh <= EDPftvarcon_inst%max_dbh(cohort_in%pft)) then
86+
if(cohort_in%dbh <= EDPftvarcon_inst%allom_dbh_maxheight(cohort_in%pft)) then
8787
h = (10.0_r8**(log10(cohort_in%dbh) * m + c))
8888
else
89-
h = (10.0_r8**(log10(EDPftvarcon_inst%max_dbh(cohort_in%pft))*m + c))
89+
h = (10.0_r8**(log10(EDPftvarcon_inst%allom_dbh_maxheight(cohort_in%pft))*m + c))
9090
endif
9191
Hite = h
9292

@@ -107,26 +107,22 @@ real(r8) function Bleaf( cohort_in )
107107
real(r8) :: dbh2bl_a
108108
real(r8) :: dbh2bl_b
109109
real(r8) :: dbh2bl_c
110-
real(r8) :: slascaler ! changes the target biomass according to the SLA
111110

112111
dbh2bl_a = EDPftvarcon_inst%allom_d2bl1(cohort_in%pft)
113112
dbh2bl_b = EDPftvarcon_inst%allom_d2bl2(cohort_in%pft)
114113
dbh2bl_c = EDPftvarcon_inst%allom_d2bl3(cohort_in%pft)
115-
slascaler = EDPftvarcon_inst%allom_d2bl_slascaler(cohort_in%pft)/EDPftvarcon_inst%slatop(cohort_in%pft)
116114

117115
if(cohort_in%dbh < 0._r8.or.cohort_in%pft == 0.or.cohort_in%dbh > 1000.0_r8)then
118116
write(fates_log(),*) 'problems in bleaf',cohort_in%dbh,cohort_in%pft
119117
endif
120118

121-
if(cohort_in%dbh <= EDPftvarcon_inst%max_dbh(cohort_in%pft))then
119+
if(cohort_in%dbh <= EDPftvarcon_inst%allom_dbh_maxheight(cohort_in%pft))then
122120
bleaf = dbh2bl_a * (cohort_in%dbh**dbh2bl_b) * EDPftvarcon_inst%wood_density(cohort_in%pft)**dbh2bl_c
123121
else
124-
bleaf = dbh2bl_a * (EDPftvarcon_inst%max_dbh(cohort_in%pft)**dbh2bl_b) * &
122+
bleaf = dbh2bl_a * (EDPftvarcon_inst%allom_dbh_maxheight(cohort_in%pft)**dbh2bl_b) * &
125123
EDPftvarcon_inst%wood_density(cohort_in%pft)**dbh2bl_c
126124
endif
127125

128-
bleaf = bleaf * slascaler
129-
130126
!write(fates_log(),*) 'bleaf',bleaf, slascaler,cohort_in%pft
131127

132128
!Adjust for canopies that have become so deep that their bottom layer is not producing any carbon...
@@ -240,14 +236,14 @@ real(r8) function c_area( cohort_in )
240236

241237
if (DEBUG_growth) then
242238
write(fates_log(),*) 'z_area 1',cohort_in%dbh,cohort_in%pft
243-
write(fates_log(),*) 'z_area 2',EDPftvarcon_inst%max_dbh
239+
write(fates_log(),*) 'z_area 2',EDPftvarcon_inst%allom_dbh_maxheight
244240
write(fates_log(),*) 'z_area 3',EDPftvarcon_inst%woody
245241
write(fates_log(),*) 'z_area 4',cohort_in%n
246242
write(fates_log(),*) 'z_area 5',cohort_in%siteptr%spread
247243
write(fates_log(),*) 'z_area 6',cohort_in%canopy_layer
248244
end if
249245

250-
dbh = min(cohort_in%dbh,EDPftvarcon_inst%max_dbh(cohort_in%pft))
246+
dbh = min(cohort_in%dbh,EDPftvarcon_inst%allom_dbh_maxheight(cohort_in%pft))
251247

252248
! ----------------------------------------------------------------------------------
253249
! The function c_area is called during the process of canopy position demotion
@@ -360,7 +356,7 @@ real(r8) function dDbhdBd( cohort_in )
360356
dBD_dDBH = dbh2bd_c*dbh2bd_a*(cohort_in%hite**dbh2bd_b)*(cohort_in%dbh**(dbh2bd_c-1.0_r8))* &
361357
(EDPftvarcon_inst%wood_density(cohort_in%pft)**dbh2bd_d)
362358

363-
if(cohort_in%dbh < EDPftvarcon_inst%max_dbh(cohort_in%pft))then
359+
if(cohort_in%dbh < EDPftvarcon_inst%allom_dbh_maxheight(cohort_in%pft))then
364360
dH_dDBH = (10.0_r8**c)*m*(cohort_in%dbh**(m-1.0_r8))
365361

366362
dBD_dDBH = dBD_dDBH + dbh2bd_b*dbh2bd_a*(cohort_in%hite**(dbh2bd_b - 1.0_r8))* &
@@ -396,7 +392,7 @@ real(r8) function dDbhdBl( cohort_in )
396392
dblddbh = dbh2bl_b*dbh2bl_a*(cohort_in%dbh**dbh2bl_b)*(EDPftvarcon_inst%wood_density(cohort_in%pft)**dbh2bl_c)
397393
dblddbh = dblddbh*cohort_in%canopy_trim
398394

399-
if( cohort_in%dbh<EDPftvarcon_inst%max_dbh(cohort_in%pft) ) then
395+
if( cohort_in%dbh<EDPftvarcon_inst%allom_dbh_maxheight(cohort_in%pft) ) then
400396
dDbhdBl = 1.0_r8/dblddbh
401397
else
402398
dDbhdBl = 1.0d15 ! At maximum size, the leaf biomass is saturated, dbl=0

biogeochem/EDPhysiologyMod.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@ subroutine Growth_Derivatives( currentSite, currentCohort, bc_in)
970970
!only if carbon balance is +ve
971971
if ((currentCohort%balive >= target_balive).AND.(currentCohort%carbon_balance > 0._r8))then
972972
! fraction of carbon going into active vs structural carbon
973-
if (currentCohort%dbh <= EDPftvarcon_inst%max_dbh(currentCohort%pft))then ! cap on leaf biomass
973+
if (currentCohort%dbh <= EDPftvarcon_inst%allom_dbh_maxheight(currentCohort%pft))then ! cap on leaf biomass
974974
dbldbd = dDbhdBd(currentCohort)/dDbhdBl(currentCohort)
975975
dbrdbd = EDPftvarcon_inst%allom_l2fr(currentCohort%pft) * dbldbd
976976
dhdbd_fn = dhdbd(currentCohort)

main/EDParamsMod.F90

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ module EDParamsMod
8888

8989
real(r8),protected :: logging_collateral_frac ! Ratio of collateral mortality to direct logging mortality
9090
character(len=param_string_length),parameter :: logging_name_collateral_frac = "fates_logging_collateral_frac"
91+
92+
real(r8),protected :: logging_coll_under_frac ! Fraction of understory plants that die when logging disturbance
93+
! is generated
94+
character(len=param_string_length),parameter :: logging_name_coll_under_frac = "fates_logging_coll_under_frac"
9195

9296
real(r8),protected :: logging_direct_frac ! Fraction of stems logged per event
9397
character(len=param_string_length),parameter :: logging_name_direct_frac = "fates_logging_direct_frac"
@@ -251,6 +255,9 @@ subroutine FatesRegisterParams(fates_params)
251255
call fates_params%RegisterParameter(name=logging_name_collateral_frac, dimension_shape=dimension_shape_1d, &
252256
dimension_names=dim_names)
253257

258+
call fates_params%RegisterParameter(name=logging_name_coll_under_frac, dimension_shape=dimension_shape_1d, &
259+
dimension_names=dim_names)
260+
254261
call fates_params%RegisterParameter(name=logging_name_direct_frac, dimension_shape=dimension_shape_1d, &
255262
dimension_names=dim_names)
256263

@@ -356,6 +363,9 @@ subroutine FatesReceiveParams(fates_params)
356363

357364
call fates_params%RetreiveParameter(name=logging_name_collateral_frac, &
358365
data=logging_collateral_frac)
366+
367+
call fates_params%RetreiveParameter(name=logging_name_coll_under_frac, &
368+
data=logging_coll_under_frac)
359369

360370
call fates_params%RetreiveParameter(name=logging_name_direct_frac, &
361371
data=logging_direct_frac)

main/EDPftvarcon.F90

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ module EDPftvarcon
2626
!ED specific variables.
2727
type, public :: EDPftvarcon_type
2828
real(r8), allocatable :: pft_used (:) ! Switch to turn on and off PFTs
29-
real(r8), allocatable :: max_dbh (:) ! maximum dbh at which height growth ceases...
29+
3030
real(r8), allocatable :: freezetol (:) ! minimum temperature tolerance (NOT CURRENTY USED)
3131
real(r8), allocatable :: wood_density (:) ! wood density g cm^-3 ...
3232
real(r8), allocatable :: hgt_min (:) ! sapling height m
33+
real(r8), allocatable :: dbh_repro_threshold(:) ! diameter at which mature plants shift allocation
3334
real(r8), allocatable :: dleaf (:) ! leaf characteristic dimension length (m)
3435
real(r8), allocatable :: z0mr (:) ! ratio of roughness length of vegetation to height (-)
3536
real(r8), allocatable :: displar (:) ! ratio of displacement height to canopy top height (-)
@@ -45,6 +46,7 @@ module EDPftvarcon
4546
real(r8), allocatable :: root_long (:) ! root longevity (yrs)
4647
real(r8), allocatable :: clone_alloc (:) ! fraction of carbon balance allocated to clonal reproduction.
4748
real(r8), allocatable :: seed_alloc (:) ! fraction of carbon balance allocated to seeds.
49+
real(r8), allocatable :: c2b (:) ! Carbon to biomass multiplier [kg/kgC]
4850
real(r8), allocatable :: woody(:)
4951
real(r8), allocatable :: stress_decid(:)
5052
real(r8), allocatable :: season_decid(:)
@@ -98,7 +100,9 @@ module EDPftvarcon
98100
! Equation 16 Thonicke et al 2010
99101

100102
! Allometry Parameters
101-
! --------------------------------------------------------------------------------------------
103+
! --------------------------------------------------------------------------------------------
104+
real(r8), allocatable :: allom_dbh_maxheight(:) ! dbh at which height growth ceases
105+
102106
real(r8), allocatable :: allom_hmode(:) ! height allometry function type
103107
real(r8), allocatable :: allom_lmode(:) ! maximum leaf allometry function type
104108
real(r8), allocatable :: allom_fmode(:) ! maximum root allometry function type
@@ -117,7 +121,6 @@ module EDPftvarcon
117121
real(r8), allocatable :: allom_d2bl2(:) ! Parameter 2 for d2bl allometry (slope)
118122
real(r8), allocatable :: allom_d2bl3(:) ! Parameter 3 for d2bl allometry (optional)
119123
real(r8), allocatable :: allom_sai_scaler(:) !
120-
real(r8), allocatable :: allom_d2bl_slascaler(:) !
121124
real(r8), allocatable :: allom_blca_expnt_diff(:) ! Any difference in the exponent between the leaf
122125
! biomass and crown area scaling
123126
real(r8), allocatable :: allom_d2ca_coefficient_max(:) ! upper (savanna) value for crown area to dbh coefficient
@@ -252,7 +255,7 @@ subroutine Register_PFT(this, fates_params)
252255
call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, &
253256
dimension_names=dim_names, lower_bounds=dim_lower_bound)
254257

255-
name = 'fates_max_dbh'
258+
name = 'fates_dbh_repro_threshold'
256259
call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, &
257260
dimension_names=dim_names, lower_bounds=dim_lower_bound)
258261

@@ -312,6 +315,10 @@ subroutine Register_PFT(this, fates_params)
312315
call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, &
313316
dimension_names=dim_names, lower_bounds=dim_lower_bound)
314317

318+
name = 'fates_c2b'
319+
call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, &
320+
dimension_names=dim_names, lower_bounds=dim_lower_bound)
321+
315322
name = 'fates_woody'
316323
call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, &
317324
dimension_names=dim_names, lower_bounds=dim_lower_bound)
@@ -428,6 +435,10 @@ subroutine Register_PFT(this, fates_params)
428435
call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, &
429436
dimension_names=dim_names, lower_bounds=dim_lower_bound)
430437

438+
name = 'fates_allom_dbh_maxheight'
439+
call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, &
440+
dimension_names=dim_names, lower_bounds=dim_lower_bound)
441+
431442
name = 'fates_allom_hmode'
432443
call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, &
433444
dimension_names=dim_names, lower_bounds=dim_lower_bound)
@@ -500,10 +511,6 @@ subroutine Register_PFT(this, fates_params)
500511
call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, &
501512
dimension_names=dim_names, lower_bounds=dim_lower_bound)
502513

503-
name = 'fates_allom_d2bl_slascaler'
504-
call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, &
505-
dimension_names=dim_names, lower_bounds=dim_lower_bound)
506-
507514
name = 'fates_allom_sai_scaler'
508515
call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_1d, &
509516
dimension_names=dim_names, lower_bounds=dim_lower_bound)
@@ -648,9 +655,9 @@ subroutine Receive_PFT(this, fates_params)
648655
call fates_params%RetreiveParameterAllocate(name=name, &
649656
data=this%pft_used)
650657

651-
name = 'fates_max_dbh'
658+
name = 'fates_dbh_repro_threshold'
652659
call fates_params%RetreiveParameterAllocate(name=name, &
653-
data=this%max_dbh)
660+
data=this%dbh_repro_threshold)
654661

655662
name = 'fates_freezetol'
656663
call fates_params%RetreiveParameterAllocate(name=name, &
@@ -708,6 +715,10 @@ subroutine Receive_PFT(this, fates_params)
708715
call fates_params%RetreiveParameterAllocate(name=name, &
709716
data=this%seed_alloc)
710717

718+
name = 'fates_c2b'
719+
call fates_params%RetreiveParameterAllocate(name=name, &
720+
data=this%c2b)
721+
711722
name = 'fates_woody'
712723
call fates_params%RetreiveParameterAllocate(name=name, &
713724
data=this%woody)
@@ -820,6 +831,10 @@ subroutine Receive_PFT(this, fates_params)
820831
call fates_params%RetreiveParameterAllocate(name=name, &
821832
data=this%fire_alpha_SH)
822833

834+
name = 'fates_allom_dbh_maxheight'
835+
call fates_params%RetreiveParameterAllocate(name=name, &
836+
data=this%allom_dbh_maxheight)
837+
823838
name = 'fates_allom_hmode'
824839
call fates_params%RetreiveParameterAllocate(name=name, &
825840
data=this%allom_hmode)
@@ -896,10 +911,6 @@ subroutine Receive_PFT(this, fates_params)
896911
call fates_params%RetreiveParameterAllocate(name=name, &
897912
data=this%allom_d2ca_coefficient_min)
898913

899-
name = 'fates_allom_d2bl_slascaler'
900-
call fates_params%RetreiveParameterAllocate(name=name, &
901-
data=this%allom_d2bl_slascaler)
902-
903914
name = 'fates_allom_sai_scaler'
904915
call fates_params%RetreiveParameterAllocate(name=name, &
905916
data=this%allom_sai_scaler)
@@ -1378,7 +1389,8 @@ subroutine FatesReportPFTParams(is_master)
13781389

13791390
write(fates_log(),*) '----------- FATES PFT Parameters -----------------'
13801391
write(fates_log(),fmt0) 'pft_used = ',EDPftvarcon_inst%pft_used
1381-
write(fates_log(),fmt0) 'max_dbh = ',EDPftvarcon_inst%max_dbh
1392+
write(fates_log(),fmt0) 'dbh max height = ',EDPftvarcon_inst%allom_dbh_maxheight
1393+
write(fates_log(),fmt0) 'dbh mature = ',EDPftvarcon_inst%dbh_repro_threshold
13821394
write(fates_log(),fmt0) 'freezetol = ',EDPftvarcon_inst%freezetol
13831395
write(fates_log(),fmt0) 'wood_density = ',EDPftvarcon_inst%wood_density
13841396
write(fates_log(),fmt0) 'hgt_min = ',EDPftvarcon_inst%hgt_min
@@ -1396,6 +1408,7 @@ subroutine FatesReportPFTParams(is_master)
13961408
write(fates_log(),fmt0) 'root_long = ',EDPftvarcon_inst%root_long
13971409
write(fates_log(),fmt0) 'clone_alloc = ',EDPftvarcon_inst%clone_alloc
13981410
write(fates_log(),fmt0) 'seed_alloc = ',EDPftvarcon_inst%seed_alloc
1411+
write(fates_log(),fmt0) 'C2B = ',EDPftvarcon_inst%c2b
13991412
write(fates_log(),fmt0) 'woody = ',EDPftvarcon_inst%woody
14001413
write(fates_log(),fmt0) 'stress_decid = ',EDPftvarcon_inst%stress_decid
14011414
write(fates_log(),fmt0) 'season_decid = ',EDPftvarcon_inst%season_decid
@@ -1457,7 +1470,6 @@ subroutine FatesReportPFTParams(is_master)
14571470
write(fates_log(),fmt0) 'allom_d2bl2 = ',EDPftvarcon_inst%allom_d2bl2
14581471
write(fates_log(),fmt0) 'allom_d2bl3 = ',EDPftvarcon_inst%allom_d2bl3
14591472
write(fates_log(),fmt0) 'allom_sai_scaler = ',EDPftvarcon_inst%allom_sai_scaler
1460-
write(fates_log(),fmt0) 'allom_d2bl_slascaler = ',EDPftvarcon_inst%allom_d2bl_slascaler
14611473
write(fates_log(),fmt0) 'allom_blca_expnt_diff = ',EDPftvarcon_inst%allom_blca_expnt_diff
14621474
write(fates_log(),fmt0) 'allom_d2ca_coefficient_max = ',EDPftvarcon_inst%allom_d2ca_coefficient_max
14631475
write(fates_log(),fmt0) 'allom_d2ca_coefficient_min = ',EDPftvarcon_inst%allom_d2ca_coefficient_min

main/FatesHistoryInterfaceMod.F90

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3192,16 +3192,12 @@ subroutine define_history_vars(this, initialize_variables)
31923192

31933193

31943194
!Logging
3195-
call this%set_history_var(vname='M7_SCPF', units = 'N/ha/event', &
3196-
long='logging mortalities by pft/size',use_default='inactive', &
3195+
call this%set_history_var(vname='M7_SCPF', units = 'N/ha/event', &
3196+
long='logging mortalities by pft/size',use_default='inactive', &
31973197
avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, &
31983198
upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_m7_si_scpf )
31993199

32003200

3201-
3202-
3203-
3204-
32053201
call this%set_history_var(vname='MORTALITY_CANOPY_SCPF', units = 'N/ha/yr', &
32063202
long='total mortality of canopy plants by pft/size', use_default='inactive', &
32073203
avgflag='A', vtype=site_size_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, &

0 commit comments

Comments
 (0)