Skip to content
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

Removed parameter KPP_BEFORE_KAPPA_SHEAR since always true. #219

Merged
merged 1 commit into from
Sep 4, 2015

Conversation

StephenGriffies
Copy link
Contributor

Removed parameter KPP_BEFORE_KAPPA_SHEAR since always true.
This cleans up some awkward code related to removing, then
adding back, the shear mixing diffusivity.

MOM6 implementation of KPP always matches the boundary
layer diffusivity to a zero value of the interior
diffusivity, even if there is a nonzero interior diffusivity.
The reason for this approach is that matching to a nonzero
interior diffusivity can produce some very spurious results.
Because MOM6 always matches to zero interior diffusivity,
we can remove the code related to earlier implementations where
we matched to a non-zero interior value. Removing this code
cleans up some logic nicely.

Removed parameter KPP_BEFORE_KAPPA_SHEAR since always true.
This cleans up some awkward code related to removing, then
adding back, the shear mixing diffusivity.

MOM6 implementation of KPP always matches the boundary
layer diffusivity to a zero value of the interior
diffusivity, even if there is a nonzero interior diffusivity.
The reason for this approach is that matching to a nonzero
interior diffusivity can produce some very spurious results.
Because MOM6 always matches to zero interior diffusivity,
we can remove the code related to earlier implementations where
we matched to a non-zero interior value.  Removing this code
cleans up some logic nicely.
@adcroft
Copy link
Collaborator

adcroft commented Sep 4, 2015

I see what you mean about changing the answers!

Before your patch, setting KPP_BEFORE_KAPPA_SHEAR = False changes the answers only at the end of the second day (which indicates a roundoff difference) which later rapidly grows during day 9 to an order one difference.

To avoid associating the answer changes with this commit (which isn't the real cause of the answer changes), I've first changed the default to KPP_BEFORE_KAPPA_SHEAR = False, recorded the answer changes, after which your patch does not change answers. This matching aspect of KPP really was a mess for us and still is a mess for KPP.

@adcroft adcroft merged commit bf1d55f into dev/master Sep 4, 2015
adcroft added a commit that referenced this pull request Sep 4, 2015
- In NOAA-GFDL/MOM6-examples#47 @StephenGriffies notes that answers significantly
  when removing the code that removed and then added back diffusivity due to
  the Jackson et al. scheme (kappa-shear). The answer changes have nothing to do
  with the removal of the code but is solely due to the round-off differences
  associated with adding and subtracting a number.

  To record this, I am changing the default to not make the Kappa-Shear adjustment
  so that the code change in #219 does not get associated with the answer changes.
adcroft referenced this pull request in NOAA-GFDL/MOM6-examples Sep 4, 2015
- NOAA-GFDL/MOM6@8e6283a *Changed default for KPP_BEFORE_KAPPA_SHEAR
- In #47 @StephenGriffies notes that answers significantly
  when removing the code that removed and then added back diffusivity due to
  the Jackson et al. scheme (kappa-shear). The answer changes have nothing to do
  with the removal of the code but is solely due to the round-off differences
  associated with adding and subtracting a number.

  To record this, I am changing the default to not make the Kappa-Shear adjustment
  so that the code change in NOAA-GFDL/MOM6#219 does not get associated with the answer changes.
@StephenGriffies
Copy link
Contributor Author

Good call. Thanks for doing this. And I agree...we are much the better
for moving away from this KPP matching business. The community of folks who
use KPP should do likewise.

Steve

On Fri, Sep 4, 2015 at 3:39 PM, Alistair Adcroft [email protected]
wrote:

I see what you mean about changing the answers!

Before your patch, setting KPP_BEFORE_KAPPA_SHEAR = False changes the
answers only at the end of the second day (which indicates a roundoff
difference) which later rapidly grows during day 9 to an order one
difference.

To avoid associating the answer changes with this commit (which isn't the
real cause of the answer changes), I've first changed the default to KPP_BEFORE_KAPPA_SHEAR
= False, recorded the answer changes, after which your patch does not
change answers. This matching aspect of KPP really was a mess for us and
still is a mess for KPP.


Reply to this email directly or view it on GitHub
NOAA-GFDL#219 (comment).

Dr. Stephen M. Griffies
NOAA Geophysical Fluid Dynamics Lab
201 Forrestal Road
Princeton, NJ 08542
USA

@adcroft adcroft deleted the user/smg/remove_KPP_BEFORE_KAPPA_SHEAR branch July 29, 2016 18:41
gustavo-marques pushed a commit to gustavo-marques/MOM6 that referenced this pull request Jun 3, 2022
…date_16may2022

(*)Merge MOM6/main from 16 May 2022
MJHarrison-GFDL pushed a commit to MJHarrison-GFDL/MOM6 that referenced this pull request Aug 16, 2022
updated makefile for use with current EMC build system
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants