-
Notifications
You must be signed in to change notification settings - Fork 382
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 zeroing of velocity to ocean init mode #5232
Add zeroing of velocity to ocean init mode #5232
Conversation
! Initialize normalVelocity to zero for cases that do not specify it. | ||
call mpas_pool_get_subpool(domain % blocklist % structs, 'state', statePool) | ||
call mpas_pool_get_array(statePool, 'normalVelocity', normalVelocity, 1) | ||
normalVelocity(:,:) = 0.0_RKIND |
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.
Note that I did not use a block loop here. Block loops are no longer supported in forward mode, and we never used multiple blocks for init mode anyway, so it seemed silly to add it. We could remove block loops from the rest of the code sometime, but for this PR, I just get the array from the first block. @philipwjones do you agree?
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.
I doubt @philipwjones cares if we break init mode ;-)
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.
I care deeply and passionately ;^). But yeah, this is fine - I've been removing them as I find them (block loops that is, not velocity)
This PR fixes the previous problem. Here with SOMA,
and the forward simulation completes successfully. I tested with both gnu debug and intel debug. |
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.
I did testing on Chrysalis with Intel and Intel-MPI.
I tested the 32 km default SOMA test case with this branch and with master. As expected, I found that the test case fails in forward mode without these changes but was successful with them.
I also verified that the results from the pr
test suite are BFB with master. The baroclinic channel decomp test case is failing in both because of #5219
@xylar - unfortunately, I found that the dam break still fails with this commit. Thanks for the suggestion though. |
…#5232) Add zeroing of velocity to ocean init mode Explicitly sets normal velocity to zero at the beginning of init mode. Each test case can then overwrite the zeros with initial velocities, but most do not. In the past the unassigned arrays wrote out zeros, but this is not true now, as described in #5230. This code is used to create MPAS-Ocean initial conditions. It is not compiled in the E3SM code base for simulations. Fixes #5230 [BFB]
passes:
merged to next |
merged to master |
Explicitly sets normal velocity to zero at the beginning of init mode. Each test case can then overwrite the zeros with initial velocities, but most do not. In the past the unassigned arrays wrote out zeros, but this is not true now, as described in #5230.
This code is used to create MPAS-Ocean initial conditions. It is not compiled in the E3SM code base for simulations.
Fixes #5230
[BFB]