-
Notifications
You must be signed in to change notification settings - Fork 94
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
Simplified leaf sun-shade fraction for two-stream #1377
base: main
Are you sure you want to change the base?
Conversation
The following shows results from a sensitivity test conducted at BCI. This test ran the two-stream solver for a generic broad-leaf evergreen canopy using the default parameters, with a a total LAI of 5, and SAI of 0.5. Meteorologic data from the site drove these calculations from 2003-2016. These results show the mean difference between the new-old methods, partitioned by depth in the canopy and zenith angle (denoted by different shaded lines). The right plot normalizes that difference by the mean values of the old method. Note*: "Sun/shade fraction" means sunlit fraction. |
Technical documentation on the two-stream code is here: https://www.overleaf.com/read/nwmhkyrvszqr#c15e6f Go to section 5 for derivation of the sunlit fraction calculation. |
Removing the "not ready" label. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this update @rgknox! I think this is good to go. I only have one question related to scelg%Kb
in my review, but that is not something you are changing in this pull request.
leaf_sun_frac = max(0.001_r8,min(0.999_r8,scelb%Rbeam0/(dlai*scelg%Kb_leaf/rad_params%clumping_index(ft)) & | ||
*(exp(-scelg%Kb_leaf*lai_top) - exp(-scelg%Kb_leaf*lai_bot)))) | ||
if(dvai>nearzero)then | ||
leaf_sun_frac = max(0.001_r8,min(0.999_r8, & | ||
scelb%Rbeam0*(exp(-scelg%Kb*vai_top) - exp(-scelg%Kb*vai_bot))/(dvai*scelg%Kb))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree it makes sense to use vai as opposed to lai in here. From what I see the clumping index is already accounted for in the calculation of scelg%Kb
, so I think your edits are all reasonable, thanks for updating it, Ryan!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question, is there any risk for scelg%Kb
to be zero or undefined? I am just looking at its definition, and it seems there could be a singularity if both lai
and sai
are zero. I don't know if this can ever happen, but I wondered about grasses if they are deciduous.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You make a good point, I'm looking at this line:
https://github.com/NGEET/fates/blob/sci.1.82.4_api.39.0.0/radiation/TwoStreamMLPEMod.F90#L1038
And you're right we do normalize by sai+lai... In the past we always had some stem, even in grasses, but I think we are now allowing to break from that constraint. Either way, it would be better to accommodate this. I'm not sure if a min(x,inf) would return x, but best to avoid the calculation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe something like this would work?
if ( (scelg%lai+scelg%sai) > nearzero) then
scelg%Kb = min(kb_max,(scelg%lai*scelg%Kb_leaf + scelg%sai*Kb_stem)/(scelg%lai+scelg%sai))
else
scelg%Kb = 0.5_r8 * ( scelg%Kb_leaf + Kb_stem)
end if
(Not sure if the dummy average in the else
case is the best way to go).
write(log_unit,*)"impossible leaf sun fraction" | ||
call endrun(msg=errMsg(sourcefile, __LINE__)) | ||
end if | ||
end if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, this is not needed.
Here are difference maps from a comparison of two SP runs, base uses the main branch, test uses this branch; simulations are two years, maps are averages of the second year. https://drive.google.com/file/d/1TPwpCLOzu3gYy9-yJKuVKf8pfUzrAVFE/view?usp=sharing Differences are subtle and within ranges I was expecting. Thoughts? I added a bunch of water diagnostics because I wanted to rationalize differences in reflected solar radiation (FSR). Changing the sunlit fraction (here) should not change albedo as a direct affect. It can change FSR due to changes in water balance and its subsequent impacts on soil and canopy albedo. |
Description:
This updates the two-stream calculation of leaf sunlit fraction. The previous implementation attempted to dis-entangle the leaf sunlit fraction from that of the scattering media (leaf+stem+snow). The new implementation simplifies the calculation by assuming the leaf sunlit fraction is comparable to that of the media. The old method may be implemented as an alternative at a later date, but this method is more comparable to how CLM and others (such as Sellers) have calculated sunlit fraction in the past.
The the old and new approach do not yield large differences at moderate to high zenith angles when plants perform the bulk of their photosynthesis. Plots below.
This allows for more straightforward checks on energy conservation.
Collaborators:
Expectation of Answer Changes:
Checklist
If this is your first time contributing, please read the CONTRIBUTING document.
All checklist items must be checked to enable merging this pull request:
Contributor
Integrator
Documentation
Test Results:
CTSM (or) E3SM (specify which) test hash-tag:
CTSM (or) E3SM (specify which) baseline hash-tag:
FATES baseline hash-tag:
Test Output: