-
Notifications
You must be signed in to change notification settings - Fork 4
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
Refactoring with utility functions #14
Conversation
@@ -190,62 +97,28 @@ def main(): | |||
cv[:, 0] = cv[:, N] | |||
h[:, N] = h[:, 0] | |||
cu[1:, N] = cu[1:, 0] | |||
z[1:, N] = z[1:, 0] | |||
z[1:, 0] = z[1:, N] |
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.
this is the only functional changes
h: gtscript.Field[dtype] | ||
): | ||
with computation(PARALLEL), interval(...): | ||
h = p + 0.25 * (u[1,0,0] * u[1,0,0] + u * u + v[0,1,0] * v[0,1,0] + v * v) |
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.
parens where missing
@@ -362,19 +249,22 @@ def copy_var( | |||
cv[:, 0,0] = cv[:, N,0] | |||
h[:, N,0] = h[:, 0,0] | |||
cu[1:, N,0] = cu[1:, 0,0] | |||
z[1:, N,0] = z[1:, 0,0] | |||
z[1:, 0,0] = z[1:, N,0] |
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.
copy paste error from swm_numpy
No description provided.