Skip to content

Commit addc742

Browse files
authored
Merge pull request #448 from rgknox/rgknox-speedup
Increase maxlayer to 3, reduce max cohorts to 40
2 parents 58e1c7f + 699b181 commit addc742

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

biogeochem/EDCohortDynamicsMod.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ subroutine terminate_cohorts( currentSite, currentPatch, level )
603603
endif
604604
endif
605605

606-
! In the third canopy layer
606+
! Outside the maximum canopy layer
607607
if (currentCohort%canopy_layer > nclmax ) then
608608
terminate = 1
609609
if ( debug ) then

main/EDTypesMod.F90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ module EDTypesMod
1616
save
1717

1818
integer, parameter :: maxPatchesPerSite = 10 ! maximum number of patches to live on a site
19-
integer, parameter :: maxCohortsPerPatch = 160 ! maximum number of cohorts per patch
19+
integer, parameter :: maxCohortsPerPatch = 100 ! maximum number of cohorts per patch
2020

21-
integer, parameter :: nclmax = 2 ! Maximum number of canopy layers
21+
integer, parameter :: nclmax = 3 ! Maximum number of canopy layers
2222
integer, parameter :: ican_upper = 1 ! Nominal index for the upper canopy
2323
integer, parameter :: ican_ustory = 2 ! Nominal index for diagnostics that refer
2424
! to understory layers (all layers that
2525
! are not the top canopy layer)
2626

27-
integer, parameter :: nlevleaf = 40 ! number of leaf layers in canopy layer
27+
integer, parameter :: nlevleaf = 20 ! number of leaf layers in canopy layer
2828
integer, parameter :: maxpft = 15 ! maximum number of PFTs allowed
2929
! the parameter file may determine that fewer
3030
! are used, but this helps allocate scratch

main/FatesRestartInterfaceMod.F90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -677,8 +677,8 @@ subroutine define_restart_vars(this, initialize_variables)
677677
! 1D cohort Variables
678678
! -----------------------------------------------------------------------------------
679679

680-
call this%set_restart_var(vname='fates_canopy_layer', vtype=cohort_r8, &
681-
long_name='ed cohort - canopy_layer', units='unitless', flushval = flushzero, &
680+
call this%set_restart_var(vname='fates_canopy_layer', vtype=cohort_int, &
681+
long_name='ed cohort - canopy_layer', units='unitless', flushval = flushinvalid, &
682682
hlms='CLM:ALM', initialize=initialize_variables, ivar=ivar, index = ir_canopy_layer_co )
683683

684684
call this%set_restart_var(vname='fates_canopy_layer_yesterday', vtype=cohort_r8, &
@@ -1448,7 +1448,7 @@ subroutine set_restart_vectors(this,nc,nsites,sites)
14481448
rio_ncohort_pa => this%rvars(ir_ncohort_pa)%int1d, &
14491449
rio_solar_zenith_flag_pa => this%rvars(ir_solar_zenith_flag_pa)%int1d, &
14501450
rio_solar_zenith_angle_pa => this%rvars(ir_solar_zenith_angle_pa)%r81d, &
1451-
rio_canopy_layer_co => this%rvars(ir_canopy_layer_co)%r81d, &
1451+
rio_canopy_layer_co => this%rvars(ir_canopy_layer_co)%int1d, &
14521452
rio_canopy_layer_yesterday_co => this%rvars(ir_canopy_layer_yesterday_co)%r81d, &
14531453
rio_canopy_trim_co => this%rvars(ir_canopy_trim_co)%r81d, &
14541454
rio_size_class_lasttimestep => this%rvars(ir_size_class_lasttimestep_co)%int1d, &
@@ -2144,7 +2144,7 @@ subroutine get_restart_vectors(this, nc, nsites, sites)
21442144
rio_ncohort_pa => this%rvars(ir_ncohort_pa)%int1d, &
21452145
rio_solar_zenith_flag_pa => this%rvars(ir_solar_zenith_flag_pa)%int1d, &
21462146
rio_solar_zenith_angle_pa => this%rvars(ir_solar_zenith_angle_pa)%r81d, &
2147-
rio_canopy_layer_co => this%rvars(ir_canopy_layer_co)%r81d, &
2147+
rio_canopy_layer_co => this%rvars(ir_canopy_layer_co)%int1d, &
21482148
rio_canopy_layer_yesterday_co => this%rvars(ir_canopy_layer_yesterday_co)%r81d, &
21492149
rio_canopy_trim_co => this%rvars(ir_canopy_trim_co)%r81d, &
21502150
rio_size_class_lasttimestep => this%rvars(ir_size_class_lasttimestep_co)%int1d, &

parameter_files/fates_params_14pfts.cdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ data:
619619

620620
fates_canopy_closure_thresh = 0.8 ;
621621

622-
fates_cohort_fusion_tol = 0.05 ;
622+
fates_cohort_fusion_tol = 0.08 ;
623623

624624
fates_comp_excln = 3 ;
625625

parameter_files/fates_params_coastal_veg.cdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ data:
878878

879879
fates_canopy_closure_thresh = 0.8 ;
880880

881-
fates_cohort_fusion_tol = 0.05 ;
881+
fates_cohort_fusion_tol = 0.08 ;
882882

883883
fates_comp_excln = 3 ;
884884

parameter_files/fates_params_default.cdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,7 @@ data:
10021002

10031003
fates_canopy_closure_thresh = 0.8 ;
10041004

1005-
fates_cohort_fusion_tol = 0.05 ;
1005+
fates_cohort_fusion_tol = 0.08 ;
10061006

10071007
fates_comp_excln = 3 ;
10081008

0 commit comments

Comments
 (0)