Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize nocomp mode with large trees #995

Merged
merged 18 commits into from
Mar 23, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add errors if user tries to use dbh initialisation outside of nocomp …
…mode
  • Loading branch information
Jessica F Needham committed Mar 2, 2023
commit 188a4fca65264f636ce48c47881b9309a7c5982b
22 changes: 13 additions & 9 deletions main/EDInitMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -849,18 +849,22 @@ subroutine init_cohorts( site_in, patch_in, bc_in)
endif ! sp mode

else ! interpret as initial diameter and calculate density
if(hlm_use_nocomp .eq. itrue)then
temp_cohort%dbh = abs(EDPftvarcon_inst%initd(pft))

temp_cohort%dbh = abs(EDPftvarcon_inst%initd(pft))
! calculate crown area of a single plant
dummy_n = 1.0_r8 ! make n=1 to get area of one tree
spread = 1.0_r8 ! fix this to 0 to remove dynamics of canopy clousre, assuming a closed canopy.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are these two named constants that you can optionally use for spread, if you like. Seems like we initialize with a spread of 0 for an inventory init, 1 for a bare ground init.
https://github.com/NGEET/fates/blob/sci.1.64.2_api.25.2.0/main/EDTypesMod.F90#L108-L109

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like I should be using init_spread_inventory since this isn't a near bare ground case. I've changed it now.


! calculate crown area of a single plant
dummy_n = 1.0_r8 ! make n=1 to get area of one tree
spread = 1.0_r8 ! fix this to 0 to remove dynamics of canopy clousre, assuming a closed canopy.
call carea_allom(temp_cohort%dbh, dummy_n, spread, temp_cohort%pft, &
temp_cohort%crowndamage, temp_cohort%c_area)

call carea_allom(temp_cohort%dbh, dummy_n, spread, temp_cohort%pft, &
temp_cohort%crowndamage, temp_cohort%c_area)

! calculate initial density required to close canopy
temp_cohort%n = patch_in%area / temp_cohort%c_area
! calculate initial density required to close canopy
temp_cohort%n = patch_in%area / temp_cohort%c_area
else
write(fates_log()*) 'Negative fates_recruit_init_density can only be used in no comp mode'
call endrun(msg=errMsg(sourcefile, __LINE__))
endif
endif

! Calculate the leaf biomass from allometry
Expand Down
2 changes: 1 addition & 1 deletion parameter_files/fates_params_default.cdl
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ variables:
fates_recruit_height_min:long_name = "the minimum height (ie starting height) of a newly recruited plant" ;
double fates_recruit_init_density(fates_pft) ;
fates_recruit_init_density:units = "stems/m2" ;
fates_recruit_init_density:long_name = "initial seedling density for a cold-start near-bare-ground simulation" ;
fates_recruit_init_density:long_name = "initial seedling density for a cold-start near-bare-ground simulation. If negative sets initial tree dbh - only to be used in nocomp mode" ;
double fates_recruit_prescribed_rate(fates_pft) ;
fates_recruit_prescribed_rate:units = "n/yr" ;
fates_recruit_prescribed_rate:long_name = "recruitment rate for prescribed physiology mode" ;
Expand Down