Some updates: The absorbed PAR for sunlit and shaded leaves are calculated in SurfaceRadiationMod.F90 (though Photosynthesis.F90 and CanopyStateType.F90, and SolarAbsorbedType.F90 also seem to call them). I tried to add these two variables as history fields in that code. The only time I got it to work is when I directly added the parsun_z_patch (parsha_z_patch) variable as outputs, though CLM gave missing values for the entire world when I did that.
Ideally, I would want the total absorbed PAR for sunlit canopy for all the canopies, something like:
parsun(p) = 0._r8 parsha(p) = 0._r8 do iv = 1, nrad(p) parsun_z(p,iv) = forc_solad(g,ipar)*fabd_sun_z(p,iv) + forc_solai(g,ipar)*fabi_sun_z(p,iv) parsha_z(p,iv) = forc_solad(g,ipar)*fabd_sha_z(p,iv) + forc_solai(g,ipar)*fabi_sha_z(p,iv) parsun(p) = parsun(p) + parsun_z(p,iv) parsha(p) = parsha(p) + parsha_z(p,iv) end do However, I have not been able to get parsha and parsun as outputs. Every time I compiled the code, I got versions of these errors:This name has not been declared as an array or a function. [PARSUN]This name has not been declared as an array or a function. [PARSHA] I have declared parsun and parsha where the other variables are declared, so I am unsure of what I am doing wrong.
I am attaching my modified SurfaceRadiationMod.F90