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

Fix Problem type in MultilayerQG #28

Merged
merged 7 commits into from
Sep 3, 2019
Merged

Conversation

navidcy
Copy link
Member

@navidcy navidcy commented Sep 1, 2019

This PR fixes some type instability in the MultilayerQG Problem constructor.

@glwagner: if you are happy with this merge and then create a new branch to implement nlayers as a type-parameter of Params and Vars.

@coveralls
Copy link

coveralls commented Sep 1, 2019

Pull Request Test Coverage Report for Build 247

  • 60 of 65 (92.31%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.008%) to 97.856%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/multilayerqg.jl 60 65 92.31%
Files with Coverage Reduction New Missed Lines %
src/multilayerqg.jl 1 95.43%
Totals Coverage Status
Change from base Build 230: 0.008%
Covered Lines: 502
Relevant Lines: 513

💛 - Coveralls

@codecov
Copy link

codecov bot commented Sep 1, 2019

Codecov Report

Merging #28 into master will increase coverage by <.01%.
The diff coverage is 92.3%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #28      +/-   ##
==========================================
+ Coverage   97.84%   97.85%   +<.01%     
==========================================
  Files           6        6              
  Lines         511      513       +2     
==========================================
+ Hits          500      502       +2     
  Misses         11       11
Impacted Files Coverage Δ
src/multilayerqg.jl 95.42% <92.3%> (+0.02%) ⬆️
src/barotropicqg.jl 100% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bf6dc6b...3fffda7. Read the comment docs.

Copy link
Member

@glwagner glwagner left a comment

Choose a reason for hiding this comment

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

Looks good to me.

mu = 5e-2 # bottom drag
beta = 5 # the y-gradient of planetary PV
Lx = 2π # domain size
μ = 5e-2 # bottom drag
Copy link
Member

Choose a reason for hiding this comment

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

nice

calcS!(S, Fp, Fm, grid)

invS = Array{Float64}(undef, (nkr, nl, nlayers, nlayers))
invS = Array{T}(undef, (nkr, nl, nlayers, nlayers))
Copy link
Member

Choose a reason for hiding this comment

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

that'll do it

Vars(q, psi, u, v, qh, psih, uh, vh)
end

"""
ForcedVars(g)

Returns the vars for forced multi-layer QG problem with grid g.
Returns the vars for forced multi-layer QG problem with grid gr.
Copy link
Member

Choose a reason for hiding this comment

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

Use "gr" (with backticks) if you want it to render as code in the docs.

@glwagner glwagner merged commit 2dcf03c into master Sep 3, 2019
@glwagner glwagner deleted the FixTypedProbMultilayerQG branch September 3, 2019 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants