Skip to content

Commit 4a81700

Browse files
committed
add code to set ew bareground patch registry data
1 parent 2571345 commit 4a81700

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

components/elm/src/main/elmfates_interfaceMod.F90

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3994,16 +3994,24 @@ subroutine RegisterInterfaceVariablesInit(this, nc)
39943994
integer :: r ! register index
39953995
integer :: p ! hlm patch index
39963996
integer :: c ! column index
3997+
logical :: is_bareground
39973998

39983999
! Iterate over the number of vegetated patches
39994000
do r = 1, this%fates(nc)%npatches
40004001
p = this%fates(nc)%registry(r)%GetHLMPatchIndex()
40014002

4003+
! Determine if the HLM patch is the initial (i.e. bareground patch) on the column
4004+
is_bareground = .false.
4005+
if (col_pp%pfti(veg_pp%column(p)) == p) then
4006+
is_bareground = .true.
4007+
end if
4008+
40024009
! Get the subgrid indices and assign them to the register metadata
40034010
call this%fates(nc)%registry(r)%SetSubgridIndices(gridcell = veg_pp%gridcell(p), &
40044011
topounit = veg_pp%topounit(p), &
40054012
landunit = veg_pp%landunit(p), &
4006-
column = veg_pp%column(p))
4013+
column = veg_pp%column(p), &
4014+
bareground = is_bareground)
40074015

40084016

40094017
! Register and initialize the boundary condition variables

0 commit comments

Comments
 (0)