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

Small changes to tilted bottom boundary layer example #2934

Merged
merged 6 commits into from
Feb 24, 2023
Merged

Conversation

tomchor
Copy link
Collaborator

@tomchor tomchor commented Feb 21, 2023

This PR changes two things about the BBL example:

  • The variable κ was used for both the von Karman constant and for the eddy diffusivity. Now it's just used for the von Karman constant
  • When calling NonhydrostaticModel we were using ordered arguments, which could make a new user interpret that they should know the order of the arguments when calling NonhydrostaticModel. Now this call is made in a more usual way with keyword arguments, where the order doesn't matter.

@navidcy
Copy link
Collaborator

navidcy commented Feb 21, 2023

I don't understand what you mean in the second point with "we were using ordered arguments".

The way the example was written was such that "the order of the kwargs was not important".

Syntax

f(; x, y, z)

is the same as

f(x=x, y=y, z=z)

and the order does not matter, e.g.

julia> x=1; y=2; z=3;

julia> function f(; x=0, y=0, z=0)
           @show x
           @show y
           @show z
           return x+y+z
       end
f (generic function with 1 method)

julia> f(; x, y, z)
x = 1
y = 2
z = 3
6

julia> f(; y, z, x)
x = 1
y = 2
z = 3
6

@navidcy navidcy added the documentation 📜 The sacred scrolls label Feb 21, 2023
tomchor and others added 4 commits February 21, 2023 19:42
Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com>
Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com>
Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com>
Copy link
Collaborator

@navidcy navidcy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's wait for #2922

@navidcy navidcy merged commit 96681f8 into main Feb 24, 2023
@navidcy navidcy deleted the tc/tilted-bbl branch February 24, 2023 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation 📜 The sacred scrolls
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants