-
Notifications
You must be signed in to change notification settings - Fork 63
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 user-controlled underflow of tracers #131
+Add user-controlled underflow of tracers #131
Conversation
Codecov Report
@@ Coverage Diff @@
## dev/gfdl #131 +/- ##
============================================
- Coverage 33.45% 33.45% -0.01%
============================================
Files 262 262
Lines 71388 71413 +25
Branches 13323 13336 +13
============================================
+ Hits 23884 23891 +7
- Misses 43032 43048 +16
- Partials 4472 4474 +2
Continue to review full report at Codecov.
|
This could have computational performance implications that should be investigated before merging. If the underflows can be applied in a separate loop, with the underflow criterion outside of the loop, then that would be a much safer option. |
79a0fda
to
1dde1c1
Compare
Added the ability to do software-controlled underflow of user-specified tiny tracer values to 0. This includes the addition of two new runtime parameters, SALINITY_UNDERFLOW and TEMPERATURE_UNDERFLOW, and the addition of the new optional argument underflow_conc to register_tracer. There is new code that optionally underflows tiny values after tracer advection, all three flavors of tracer diffusion, and after tracer remapping via ALE. By default, underflow is handled via the machine as before, but with appropriately set tiny values of SALINITY_UNDERFLOW and TEMPERATURE_UNDERFLOW, of 1e-30 ppt and 1e-30 degC, all existing test cases pass the dimensional consistency rescaling tests for temperature and salinity, but doing so does change answers slightly for some test cases (detectible in the restart files, but not in the ocean.stats files). By default all answers are bitwise identical, but there are two new runtime parameters.
Moved the new user-controlled tracer underflow code into separate loops, in response to the reviews of this initial commit, in the hopes that this will provide better computational performance. All answers are bitwise identical.
1dde1c1
to
601036c
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.
I'm reasonably confident that potential performance issues have been addressed.
Gaea regression: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/15715 ✔️ 🟡 New parameters:
|
Added the ability to do software-controlled underflow of user-specified tiny
tracer values to 0. This includes the addition of two new runtime parameters,
SALINITY_UNDERFLOW and TEMPERATURE_UNDERFLOW, and the addition of the new
optional argument underflow_conc to register_tracer. There is new code that
optionally underflows tiny values after tracer advection, all three flavors of
tracer diffusion, and after tracer remapping via ALE. By default, underflow is
handled via the machine as before, but with appropriately set tiny values of
SALINITY_UNDERFLOW and TEMPERATURE_UNDERFLOW, of 1e-30 ppt and 1e-30 degC, all
existing test cases pass the dimensional consistency rescaling tests for
temperature and salinity, but doing so does change answers slightly for some
test cases (detectible in the restart files, but not in the ocean.stats files).
By default all answers are bitwise identical, but there are two new runtime
parameters.