@@ -66,6 +66,9 @@ module filterMod
6666 integer , pointer :: hydrononsoic(:) ! non-soil hydrology filter (columns)
6767 integer :: num_hydrononsoic ! number of columns in non-soil hydrology filter
6868
69+ integer , pointer :: h3dc(:) ! h3d filter (columns)
70+ integer :: num_h3dc ! number of columns in h3d filter
71+
6972 integer , pointer :: urbanl(:) ! urban filter (landunits)
7073 integer :: num_urbanl ! number of landunits in urban filter
7174 integer , pointer :: nourbanl(:) ! non-urban filter (landunits)
@@ -203,6 +206,8 @@ subroutine allocFiltersOneGroup(this_filter)
203206 allocate (this_filter(nc)% hydrologyc(bounds% endc- bounds% begc+1 ))
204207 allocate (this_filter(nc)% hydrononsoic(bounds% endc- bounds% begc+1 ))
205208
209+ allocate (this_filter(nc)% h3dc(bounds% endc- bounds% begc+1 ))
210+
206211 allocate (this_filter(nc)% urbanp(bounds% endp- bounds% begp+1 ))
207212 allocate (this_filter(nc)% nourbanp(bounds% endp- bounds% begp+1 ))
208213
@@ -410,6 +415,21 @@ subroutine setFiltersOneGroup(bounds, this_filter, include_inactive, icemask_grc
410415 this_filter(nc)% num_hydrologyc = f
411416 this_filter(nc)% num_hydrononsoic = fn
412417
418+ ! Create column-level h3d filter (only soil cols)
419+
420+ f = 0
421+ do c = bounds% begc,bounds% endc
422+ if (col_pp% active(c) .or. include_inactive) then
423+ l = col_pp% landunit(c)
424+ if (lun_pp% itype(l) == istsoil) then
425+ f = f + 1
426+ this_filter(nc)% h3dc(f) = c
427+ col_pp% h3d_active(c) = .true.
428+ end if
429+ end if
430+ end do
431+ this_filter(nc)% num_h3dc = f
432+
413433 ! Create prognostic crop and soil w/o prog. crop filters at pft-level
414434 ! according to where the crop model should be used
415435
0 commit comments