-
Notifications
You must be signed in to change notification settings - Fork 24
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
Pre-allocate grid-point pressure values and use consistent naming #91
Comments
On this note, for the shallow water model, I've decided to use the interface displacement η as prognostic variable, so the instantaneous layer thickness h = η + H, whereby H is the thickness at rest and H = H₀ - orography and H₀ a global constant, something like 8-12km probably. Having said that, I don't want to redefine the variable names in |
@milankl picking this up again. How about the following approach:
Let me know what you think! |
Is |
I agree that we should have one place where the exp is calculated as this is expensive (usually taking several times more cycles than +,-,*,/ etc) but maybe we don't have to allocate another array but can do it in-place like for i in eachindex(pres_grid)
pres_grid[i] = exp(pres_grid[i])
end |
As far as I can see it's only used for the physics, so yeah I think this works. I'll just comment it clearly so newcomers aren't confused :) |
This is a left over from this comment on #82
The text was updated successfully, but these errors were encountered: