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

Roundoff error in two stream scheme #645

Open
kmdeck opened this issue Jun 7, 2024 · 1 comment
Open

Roundoff error in two stream scheme #645

kmdeck opened this issue Jun 7, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@kmdeck
Copy link
Member

kmdeck commented Jun 7, 2024

Describe the bug

We get incorrect absorbed/reflected/transmitted radiation from plant_absorbed_pfd for both of our radiation schemes when the zenith angle is pi/2 or the sun is below the horizon, and when LAI is very small. This is because we have things like:
K = 1/cos(theta), where theta = zenith angle
and exp(-K*LAI)

We should be able to remove the LAI clipping done in the global run once we do this.

For now, I clip LAI in the TimeVaryingInput so that if LAI < 0.05, LAI = 0 exactly. Then exp(-K*LAI) =1.

To Reproduce

see failing test in kd/radiation_roundoff_bug

@juliasloan25
Copy link
Member

We should be able to remove the LAI clipping done in the global run once we do this.

What is the change that will allow us to remove the LAI clipping?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants