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

Megan fates pr follow up #100

Draft
wants to merge 9 commits into
base: noresm
Choose a base branch
from
4 changes: 3 additions & 1 deletion src/biogeophys/CanopyFluxesMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,9 @@ subroutine CanopyFluxes(bounds, num_exposedvegp, filter_exposedvegp,
end do

if ( use_fates ) then

! zeroed out here for megan isoprene calculations, in case patches are not transfered properly.
photosyns_inst%cisha_z_patch(begp:endp,:) = -999._r8
photosyns_inst$cisun_z_patch(begp:endp,:) = -999._r8
call clm_fates%wrap_photosynthesis(nc, bounds, fn, filterp(1:fn), &
svpts(begp:endp), eah(begp:endp), o2(begp:endp), &
co2(begp:endp), rb(begp:endp), dayl_factor(begp:endp), &
Expand Down
4 changes: 2 additions & 2 deletions src/utils/clmfates_interfaceMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2648,8 +2648,8 @@ subroutine wrap_photosynthesis(this, nc, bounds, fn, filterp, &
rssun(p) = this%fates(nc)%bc_out(s)%rssun_pa(ifp)
rssha(p) = this%fates(nc)%bc_out(s)%rssha_pa(ifp)
! this is needed for MEGAN to work with FATES
cisun_z = this%fates(nc)%bc_out(s)%ci_pa(ifp)
cisha_z = this%fates(nc)%bc_out(s)%ci_pa(ifp)
cisun_z(p,:) = this%fates(nc)%bc_out(s)%ci_pa(ifp)
mvdebolskiy marked this conversation as resolved.
Show resolved Hide resolved
cisha_z(p,:) = this%fates(nc)%bc_out(s)%ci_pa(ifp)
! These fields are marked with a bad-value flag
photosyns_inst%psnsun_patch(p) = spval
photosyns_inst%psnsha_patch(p) = spval
Expand Down