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

DAYKM kma calculation #7

Closed
tjc181 opened this issue Oct 5, 2018 · 1 comment
Closed

DAYKM kma calculation #7

tjc181 opened this issue Oct 5, 2018 · 1 comment
Labels
bug Something isn't working

Comments

@tjc181
Copy link
Owner

tjc181 commented Oct 5, 2018

The calculation of kma in DAYKM appears to have a problem with order of operations.

37   KMA = KARMAN * USTAR * ZA * ( 1 - ( 15 * ZA / MOL ) )**0.25

ZA is a constant, = 50.0
MOL is a constant, = 0.4

1-(15*ZA/MOL) = -1874

Raising this to the 0.25 power produces a complex result which we try to store in a real. Context suggests a complex result is not what is intended.

@tjc181 tjc181 added the bug Something isn't working label Oct 5, 2018
@tjc181
Copy link
Owner Author

tjc181 commented Oct 6, 2018

This ended up being a problem with the integers in the calculation. Changing 1 and 15 to 1.0 and 15.0 corrects the NaN calculation and produces a result.

@tjc181 tjc181 closed this as completed Oct 6, 2018
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

No branches or pull requests

1 participant