@@ -197,10 +197,10 @@ subroutine ED_Norman_Radiation (nsites, sites, bc_in, bc_out )
197197 ! Is this pft/canopy layer combination present in this patch?
198198 do L = 1 ,nclmax
199199 do ft = 1 ,numpft
200- currentPatch% present (L,ft) = 0
200+ currentPatch% canopy_mask (L,ft) = 0
201201 do iv = 1 , currentPatch% nrad(L,ft)
202202 if (currentPatch% canopy_area_profile(L,ft,iv) > 0._r8 )then
203- currentPatch% present (L,ft) = 1
203+ currentPatch% canopy_mask (L,ft) = 1
204204 ! I think 'present' is only used here...
205205 endif
206206 end do ! iv
@@ -260,7 +260,7 @@ subroutine ED_Norman_Radiation (nsites, sites, bc_in, bc_out )
260260 weighted_dif_ratio(L,1 :hlm_numSWb) = 0._r8
261261 ! Each canopy layer (canopy, understorey) has multiple 'parallel' pft's
262262 do ft = 1 ,numpft
263- if (currentPatch% present (L,ft) == 1 )then ! only do calculation if there are the appropriate leaves.
263+ if (currentPatch% canopy_mask (L,ft) == 1 )then ! only do calculation if there are the appropriate leaves.
264264 ! ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++!
265265 ! Diffuse transmittance, tr_dif, do each layer with thickness elai_z.
266266 ! Estimated do nine sky angles in increments of 10 degrees
@@ -392,7 +392,7 @@ subroutine ED_Norman_Radiation (nsites, sites, bc_in, bc_out )
392392
393393 do L = currentPatch% NCL_p,1 , - 1 ! start at the bottom and work up.
394394 do ft = 1 ,numpft
395- if (currentPatch% present (L,ft) == 1 )then
395+ if (currentPatch% canopy_mask (L,ft) == 1 )then
396396 ! ==============================================================================!
397397 ! Iterative solution do scattering
398398 ! ==============================================================================!
@@ -440,7 +440,7 @@ subroutine ED_Norman_Radiation (nsites, sites, bc_in, bc_out )
440440 dif_ratio(L,ft,1 ,ib) * ftweight(L,ft,1 )
441441 ! instance where the first layer ftweight is used a proxy for the whole column. FTWA
442442 end do ! hlm_numSWb
443- endif ! currentPatch%present
443+ endif ! currentPatch%canopy_mask
444444 end do ! ft
445445 end do ! L
446446
@@ -450,7 +450,7 @@ subroutine ED_Norman_Radiation (nsites, sites, bc_in, bc_out )
450450 do L = 1 , currentPatch% NCL_p ! work down from the top of the canopy.
451451 weighted_dif_down(L) = 0._r8
452452 do ft = 1 , numpft
453- if (currentPatch% present (L,ft) == 1 )then
453+ if (currentPatch% canopy_mask (L,ft) == 1 )then
454454 ! ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++!
455455 ! First estimates do downward and upward diffuse flux
456456 !
@@ -506,7 +506,7 @@ subroutine ED_Norman_Radiation (nsites, sites, bc_in, bc_out )
506506 do L = currentPatch% NCL_p,1 ,- 1 ! work up from the bottom.
507507 weighted_dif_up(L) = 0._r8
508508 do ft = 1 , numpft
509- if (currentPatch% present (L,ft) == 1 )then
509+ if (currentPatch% canopy_mask (L,ft) == 1 )then
510510 ! Bounce diffuse radiation off soil surface.
511511 iv = currentPatch% nrad(L,ft) + 1
512512 if (L== currentPatch% NCL_p)then ! is this the bottom layer ?
@@ -562,7 +562,7 @@ subroutine ED_Norman_Radiation (nsites, sites, bc_in, bc_out )
562562 do L = 1 ,currentPatch% NCL_p ! working from the top down
563563 weighted_dif_down(L) = 0._r8
564564 do ft = 1 ,numpft
565- if (currentPatch% present (L,ft) == 1 )then
565+ if (currentPatch% canopy_mask (L,ft) == 1 )then
566566 ! forward diffuse flux within the canopy and at soil, working forward through canopy
567567 ! with Dif_up -from previous iteration-. Dif_dn(1) is the forward diffuse flux onto the canopy.
568568 ! Note: down = forward flux onto next layer
@@ -618,7 +618,7 @@ subroutine ED_Norman_Radiation (nsites, sites, bc_in, bc_out )
618618 do L = 1 , currentPatch% NCL_p ! working from the top down.
619619 weighted_dif_up(L) = 0._r8
620620 do ft = 1 ,numpft
621- if (currentPatch% present (L,ft) == 1 )then
621+ if (currentPatch% canopy_mask (L,ft) == 1 )then
622622 ! Upward diffuse flux at soil or from lower canopy (forward diffuse and unscattered direct beam)
623623 iv = currentPatch% nrad(L,ft) + 1
624624 if (L== currentPatch% NCL_p)then ! In the bottom canopy layer, reflect off the soil
@@ -670,7 +670,7 @@ subroutine ED_Norman_Radiation (nsites, sites, bc_in, bc_out )
670670 abs_dir_z(:,:) = 0._r8
671671 abs_dif_z(:,:) = 0._r8
672672 do ft = 1 ,numpft
673- if (currentPatch% present (L,ft) == 1 )then
673+ if (currentPatch% canopy_mask (L,ft) == 1 )then
674674 ! ==============================================================================!
675675 ! Compute absorbed flux densities
676676 ! ==============================================================================!
@@ -799,7 +799,7 @@ subroutine ED_Norman_Radiation (nsites, sites, bc_in, bc_out )
799799 currentPatch% tr_soil_dir(ib)* &
800800 (1.0_r8 - bc_in(s)% albgr_dir_rb(ib)),currentPatch% NCL_p,ib,sum (ftweight(1 ,1 :numpft,1 ))
801801 write (fates_log(),* ) ' albedos' ,currentPatch% sabs_dir(ib) ,currentPatch% tr_soil_dir(ib), &
802- (1.0_r8 - bc_in(s)% albgr_dir_rb(ib)),currentPatch % lai
802+ (1.0_r8 - bc_in(s)% albgr_dir_rb(ib))
803803
804804 do ft = 1 ,3
805805 iv = currentPatch% nrad(1 ,ft) + 1
@@ -826,7 +826,7 @@ subroutine ED_Norman_Radiation (nsites, sites, bc_in, bc_out )
826826 lai_reduction(:) = 0.0_r8
827827 do L = 1 , currentPatch% NCL_p
828828 do ft = 1 ,numpft
829- if (currentPatch% present (L,ft) == 1 )then
829+ if (currentPatch% canopy_mask (L,ft) == 1 )then
830830 do iv = 1 , currentPatch% nrad(L,ft)
831831 if (lai_change(L,ft,iv) > 0.0_r8 )then
832832 lai_reduction(L) = max (lai_reduction(L),lai_change(L,ft,iv))
@@ -879,7 +879,7 @@ subroutine ED_Norman_Radiation (nsites, sites, bc_in, bc_out )
879879 write (fates_log(),* ) ' bc_in(s)%albgr_dif_rb(ib)' ,bc_in(s)% albgr_dif_rb(ib)
880880 write (fates_log(),* ) ' rhol' ,rhol(1 :numpft,:)
881881 write (fates_log(),* ) ' ftw' ,sum (ftweight(1 ,1 :numpft,1 )),ftweight(1 ,1 :numpft,1 )
882- write (fates_log(),* ) ' present' ,currentPatch% present (1 ,1 :numpft)
882+ write (fates_log(),* ) ' present' ,currentPatch% canopy_mask (1 ,1 :numpft)
883883 write (fates_log(),* ) ' CAP' ,currentPatch% canopy_area_profile(1 ,1 :numpft,1 )
884884
885885 bc_out(s)% albi_parb(ifp,ib) = bc_out(s)% albi_parb(ifp,ib) + error
@@ -1003,7 +1003,7 @@ subroutine ED_SunShadeFracs(nsites, sites,bc_in,bc_out)
10031003
10041004 if (bc_out(s)% fsun_pa(ifp) > 1._r8 )then
10051005 write (fates_log(),* ) ' too much leaf area in profile' , bc_out(s)% fsun_pa(ifp), &
1006- cpatch % lai, sunlai,shalai
1006+ sunlai,shalai
10071007 endif
10081008
10091009 elai = calc_areaindex(cpatch,' elai' )
0 commit comments