-
Notifications
You must be signed in to change notification settings - Fork 105
Description
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:
fates/main/FatesHistoryInterfaceMod.F90
Lines 4990 to 4999 in 0f321cd
| 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:
fates/main/FatesHistoryInterfaceMod.F90
Lines 4990 to 4992 in 0f321cd
| 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:
fates/main/FatesHistoryInterfaceMod.F90
Lines 5185 to 5195 in 0f321cd
| 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
Type
Projects
Status