Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checked all code paths/options and fixed FPEs. #108

Merged
merged 1 commit into from
Feb 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/canopy_bioemi_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ SUBROUTINE CANOPY_BIO( ZK, FCLAI, FCH, LAI, FSUN, PPFD_SUN, &
do i=1, SIZE(ZK)
if (ZK(i) .gt. 0.0 .and. ZK(i) .le. FCH) then
VPGWT(i) = (FLAI(i))/sum(FLAI(1:LAYERS))
else
VPGWT(i) = 0.0_rk !above canopy
end if
end do
EMI_OUT(SIZE(ZK)) = LAI * EF * SUM(GammaTLEAF_AVE(1:LAYERS) * GammaPPFD_AVE(1:LAYERS) * &
Expand Down
14 changes: 9 additions & 5 deletions src/canopy_profile_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -340,14 +340,18 @@ SUBROUTINE CANOPY_ZPD( ZHC, FCLAI, UBZREF, Z0GHC, &
z0_set = Z0_MOD
else if (Z0_OPT .eq. 1) then !Use veg-type dependent z0 first estimate
if (LU_OPT .eq. 0 .or. LU_OPT .eq. 1) then !VIIRS/MODIS LU types
!approx/average vegtype mapping to Massman et al. forest types
!approximate Z0 based on vegetation types
if (VTYPE .ge. 1 .and. VTYPE .le. 2) then !VIIRS/MODIS Cat 1-2/Evergreen Needleleaf & Broadleaf
z0_set = 1.0_rk
end if
if (VTYPE .ge. 3 .and. VTYPE .le. 5) then !VIIRS/MODIS Cat 3-5/Deciduous Needleleaf, Broadleaf, Mixed Forests
else if (VTYPE .ge. 3 .and. VTYPE .le. 5) then !VIIRS/MODIS Cat 3-5/Deciduous Needleleaf, Broadleaf, Mixed Forests
z0_set = 1.0_rk
end if
if ((VTYPE .ge. 6 .and. VTYPE .le. 10) .or. VTYPE .eq. 12 ) then !VIIRS/MODIS Cat 6-10 or 12/Shrubs, Croplands, and Grasses
else if ((VTYPE .ge. 6 .and. VTYPE .le. 10) & !VIIRS/MODIS Cat 8-10 for savannas, woody savannas, and grasslands
.or. VTYPE .eq. 12 & !VIIRS/MODIS Cat 12 for croplands
.or. VTYPE .eq. 14 ) then !VIIRS/MODIS Cat 14 for cropland/natural mosaic
z0_set = 0.1_rk
else if (VTYPE .ge. 18 .and. VTYPE .le. 19) then !VIIRS/MODIS Cat 18 -19 for wooded and mixed tundra
z0_set = 0.3_rk
else
z0_set = 0.1_rk
end if
else
Expand Down
Loading