-
Notifications
You must be signed in to change notification settings - Fork 9
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
add hyperbolic tangent stretching #1930
Conversation
316f6f7
to
a0d4694
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should keep the terrain-following and stretching transformations cleanly separated.
68aebf8
to
6d8237c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes look good overall, I agree. I left some comments, it would be good to generalize the coordinate warping, since that will change the interface.
79a0a50
to
c542ba5
Compare
To clarify, we are not hard coding linear terrain-following coordinates here. The code can be cleaned up though, I agree. We will refactor it in separate PRs. |
6608872
to
0abee99
Compare
@@ -305,7 +310,7 @@ function IntervalMesh( | |||
h = | |||
h_bottom .+ | |||
(ζ_n .- ζ_n[1]) * (h_top - h_bottom) / (ζ_n[end - 1] - ζ_n[1]) | |||
faces = (z_bottom + (z_top - z_bottom)) * exp_stretch.(ζ_n, h) | |||
faces = z_bottom .+ (z_top - z_bottom) * exp_stretch.(ζ_n, h) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@charleskawczynski Here is a bug fix. Would this be a breaking change? This technically changes the behavior of the vertical mesh, but since we always use z_bottom = 0 in ClimaAtmos, it wouldn't change the results. Just want to make sure if the next climacore release should be a minor or patch release.
Closes #1927. Also fixes a bug in stretching for non-zero z_bottom.