Skip to content

Remove site%area_bareground based area scaling calcuation in history interface module #1379

@glemieux

Description

@glemieux

Discussed in #1375

Originally posted by glemieux April 1, 2025
In the history interface module we have an area scaling calculation that I think should be changed:

if (hlm_use_nocomp .eq. itrue .and. hlm_use_fixed_biogeog .eq. itrue) then
site_area_veg_inv = area - sites(s)%area_bareground * area
else
site_area_veg_inv = 0._r8
cpatch => sites(s)%oldest_patch
do while(associated(cpatch))
site_area_veg_inv = site_area_veg_inv + cpatch%total_canopy_area
cpatch => cpatch%younger
end do !patch loop
end if

@ckoven the site_area_veg_inv here was initially used to scale only the instantaneous tveg (via #877). That said, I think the scaling that uses the patch%total_canopy_area site summation in the else block is more correct for fbg+nocomp mode as well. Is that correct to you?

Background

I noticed that there is one place in the history interface module in which we check if we are in FBG + Nocomp mode to determine how to calculate an area scaling variable site_area_veg_inv for use in the update_history_hifreq1 subroutine:

if (hlm_use_nocomp .eq. itrue .and. hlm_use_fixed_biogeog .eq. itrue) then
site_area_veg_inv = area - sites(s)%area_bareground * area
else

This jumped out at me as I didn't see a similar check in the companion update_history_hifreq2 subroutine in which we calculate the same scaling:

site_area_veg_inv = 0._r8
cpatch => sites(s)%oldest_patch
do while(associated(cpatch))
site_area_veg_inv = site_area_veg_inv + cpatch%total_canopy_area
cpatch => cpatch%younger
end do !patch loop
! If there is no vegetation, go to the next site
if(site_area_veg_inv < nearzero) cycle do_sites
site_area_veg_inv = 1._r8/site_area_veg_inv

This scaling value came in initially as site_area_veg to address #861 via #877. @rgknox had originally removed the FBG+nocomp check and restructured the scaling as the summation of the patch%total_canopy_area via #1119, but due to a later merge deconflict between this (now on main) and #1116 the check made its way back in.

Metadata

Metadata

Assignees

Labels

software: bugBug that is specific to softwaresoftware: history outputPertaining to FATES history output variables

Type

Projects

Status

❕Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions