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

Critical Richardson number omitted from surface parameter construction #1014

Closed
ilopezgp opened this issue May 18, 2022 · 0 comments · Fixed by #1012
Closed

Critical Richardson number omitted from surface parameter construction #1014

ilopezgp opened this issue May 18, 2022 · 0 comments · Fixed by #1012
Labels
bug Something isn't working

Comments

@ilopezgp
Copy link
Contributor

ilopezgp commented May 18, 2022

Our extensive use of the dummy variable name kwargs hides bugs within the code. An instance can be found in driver/Cases.jl:

function surface_params(case::GABLS, surf_ref_state, param_set; kwargs...)
    FT = eltype(surf_ref_state)
    Tsurface = t -> 265.0 - (0.25 / 3600.0) * t
    qsurface = 0.0
    shf = 0.0001 # only prevent zero division in SF.jl lmo
    lhf = 0.0001 # only prevent zero division in SF.jl lmo
    # ustar = 0.1 # TODO: remove, this isn't actually used
    zrough = 0.1

    kwargs = (; Tsurface, qsurface, shf, lhf, zrough)
    return TC.MoninObukhovSurface(FT; kwargs...)
end

Note that the kwargs passed to the returned structure do not contained the kwargs of surface_params. See PR #1013 for a print showing that we are taking the Richardson number as the default (why is there a default of 0?)

@ilopezgp ilopezgp added the bug Something isn't working label May 18, 2022
@bors bors bot closed this as completed in #1012 May 18, 2022
@bors bors bot closed this as completed in 474c65c May 18, 2022
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.

1 participant