Open rgknox opened 6 years ago
I'm not sure that present is redundant with respect to ncan, since it's holding information on an L,FT matrix, so we can not do calculations in empty cells? Here's the calculation of the present matrix....
! Is this pft/canopy layer combination present in this patch?
do L = 1,nclmax
do ft = 1,numpft
currentPatch%present(L,ft) = 0
do iv = 1, currentPatch%nrad(L,ft)
if (currentPatch%canopy_area_profile(L,ft,iv) > 0._r8)then
currentPatch%present(L,ft) = 1
!I think 'present' is only used here...
endif
end do !iv
end do !ft
end do !L
Totally agree with ncan and nrad though.
I'm seeing present and ncan as the same dimensions. canopy layer x pft
isn't present the same as "if ncan>0"?
oh sorry. Yes, you're right,,,
2018-03-20 12:55 GMT-06:00 Ryan Knox notifications@github.com:
I'm seeing present and ncan as the same dimensions. canopy layer x pft
isn't present the same as "if ncan>0"?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/NGEET/fates/issues/358#issuecomment-374716290, or mute the thread https://github.com/notifications/unsubscribe-auth/AMWsQxqropXWp2GpnH_SVWpoxxiZ7Q0Rks5tgVCQgaJpZM4Syb3d .
Dr Rosie A. Fisher
Staff Scientist Terrestrial Sciences Section Climate and Global Dynamics National Center for Atmospheric Research 1850 Table Mesa Drive Boulder, Colorado, 80305 USA. +1 303-497-1706
cpatch%nrad cpatch%ncan cpatch%present (re-named to canopy_mask in #357)
These variables are set in FatesPlantRespPhotosynthMod.F90, in EDSurfaceAslbedoMod.F90 and in EDCanopyStructureMod.F90.
The first two instances are during the radiation and photosynthesis schemes. ncan and present should only be updated in the canopy structure calculations. nrad, which may differ slightly due to the presence of snow, may have an argument to be updated at those short time-steps.
Currently, ncan=nrad, which is another issue.
Also, present is redundant and offers no more information than what can be determined from ncan.
Does this all seem right? If so, it would be good to go through and remove all these redundant calculations, they will lead to bugs eventually.