-
Notifications
You must be signed in to change notification settings - Fork 371
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
Clean-up ocean wetting and drying routine #5418
Clean-up ocean wetting and drying routine #5418
Conversation
This PR is migrated from E3SM-Ocean-Discussion#14. This commit was added since that review 26f525c. With this commit, wetting and drying tests are BFB compared to the version without this commit. |
This PR was found to be BFB on chrysalis with intel, open-mpi compiler for the nightly test suite. It is non-BFB for the |
@sbrus89, would you be willing to do some tests to make sure things still behave as expected, following up on the testing we did in E3SM-Ocean-Discussion#14? I'll do some "do no harm" testing in compass to make sure we're good there. @jonbob, would you be up for running a couple of relevant E3SM tests to make sure we're BFB as expected. Or feel free to recommend some tests for me to run instead. |
Yes, I'll do that. |
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 looked over the code and it looks fine to me. My review is mostly from a do-no-harm perspective, as I am not super well versed on the details of the wetting-and-drying code.
The compass pr
test suite was BFB on Chrysalis with Intel and OpenMPI.
@sbrus89 please review. |
Through conversations with @sbrus89, we realized that the change from In my We also discussed dropping this line in the code,
@sbrus89 is planning on reporting back on the outcome of these tests before approving the PR. Please let me know if I represented our conversation accurately! |
@sbrus89 still needs your input. |
Thanks for the reminder, @rljacob. I'm working on testing now. |
@cbegeman, After rebasing locally on E3SM/master (0f8188) and testing inside compass (3a4bef) on compy, the drying slope cases run and give good results. However, I'm seeing failures with both dam break cases. |
@cbegeman - I did not check, but yes I would suspect that is the case. I can run compass bisect to track down the commit that introduced the errors. |
@sbrus89 It must have been relatively recently. I don't recall how long ago I tested dam break for this PR (E3SM-Ocean-Discussion#14 was around for a while), but the dam break case was definitely working when we were testing #5279. |
I agree, it couldn't have been from too long ago. |
@sbrus89 If you have time and interest in running git bisect that would be much appreciated. Let me know if you want to pass this off to me. |
sure, I'll get it set up today and let you know how it goes. |
@cbegeman - Here's what I found out after running the compass bisect utility:
|
Man, lesson learned! If you don't do proper CF masking from the beginning, you really will have trouble adding it later. Hopefully, we can build this into Omega from the ground up! |
@sbrus89 Thanks for the testing. Why am I not surprised it was that PR! I'm figuring out the minimum changes needed for dam break to pass. I should have an answer soon. |
@sbrus89 You can run the dam_break test case and verify that the solution still agrees just as well with the data after this PR. This is the commit that you need cbegeman@39192f6. I don't like this solution though, we might need some change in how tracers are treated in cases where their tendencies are disabled. I'd like to open a separate issue documenting this problem and address it separately from this PR, since the issue isn't directly associated with this PR. Does that sound good to you? |
Sure, no problem. I'll report back. |
@cbegeman, great! Reverting the fill value worked, but I'll test with your new PR instead. Seems like that's a better option. |
I verified this works with #5519 for the dam break. |
26f525c
to
230e16c
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.
@cbegeman, this is great. thanks!
@jonbob This should be ready for E3SM testing. I think that this doesn't fit the definition of a stealth PR: "BFB code change that includes a new feature, turned off by default" because this PR does not introduce the stealth feature (wetting and drying). However, I'm uncertain about the intention of "includes a new feature" here. |
@cbegeman -- at this point E3SM doesn't even have the wetting and drying namelist, so I think it's safe to bring is as something that only impacts the standalone model |
…next (PR #5418) Clean-up ocean wetting and drying routine Clean-up the wetting and drying routine in MPAS-Ocean and make a few bugfixes in that routine. This routine is not used in E3SM and only impacts the standalone model. [BFB]
passes:
merged to next |
@jonbob Thanks for the testing! |
merged to master |
This merge updates the E3SM-Project submodule from [c292bec000](https://github.com/E3SM-Project/E3SM/tree/c292bec000) to [4b3e611fee](https://github.com/E3SM-Project/E3SM/tree/4b3e611fee). This update includes the following MPAS-Ocean and MPAS-Frameworks PRs (check mark indicates bit-for-bit with previous PR in the list): - [ ] (ocn) E3SM-Project/E3SM#5418 - [ ] (ocn) E3SM-Project/E3SM#5447 - [ ] (ocn) E3SM-Project/E3SM#5568 - [ ] (ocn) E3SM-Project/E3SM#5583 - [ ] (ocn) E3SM-Project/E3SM#5575 - [ ] (ocn) E3SM-Project/E3SM#5600
Clean-up the wetting and drying routine in MPAS-Ocean and make a few bugfixes in that routine.
This PR utilizes a new variable
wettingVelocityFactor
, which replaceswettingVelocity
, to scale bothnormalVelocity
andnormalVelocityTend
in instances where thelayerThickness
is approaching a minimumlayerThickness
.We preserve the existing option where
config_zero_drying_velocity = True
, zeroing outnormalVelocity
andnormalVelocityTend
usingwettingVelocityFactor
in regions where the divergence out of a cell would bring thelayerThickness
within a tolerance of the minimum thickness.We remove an approach for setting
wettingVelocityFactor
between 0 and 1 whenconfig_zero_drying_velocity = False
because this code was never operational. Instead whenconfig_zero_drying_velocity = False
there is no velocity or tendency modification in drying cells.Bugfix 1 is changing the time step used in the wetting and drying routine to the RK4 substep. Bugfix 2 is changing range over which
wettingVelocityFactor
is computed to active connected edges.[BFB]