-
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
Fixes Redi Surface Taper double counting #5171
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -351,6 +351,11 @@ subroutine ocn_GM_compute_Bolus_velocity(statePool, & | |
slopeTaperDown = 1.0_RKIND + slopeTaperFactor*(slopeTaperDown - 1.0_RKIND) | ||
|
||
sfcTaper = min(RediKappaSfcTaper(k, cell1), RediKappaSfcTaper(k, cell2)) | ||
if (k < min( indMLD(cell1), indMLD(cell2))) then | ||
sfcTaper = 0.0_RKIND | ||
else | ||
sfcTaper = 1.0_RKIND | ||
end if | ||
Comment on lines
353
to
+358
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand why the first line here isn't replaced by the last 5. It seems like the work done in the first line now does nothing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, could something be added to explain this change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In particular, I'm wanting to make sure these still relate to the topic of this PR, the double counting of the Redi surface taper. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Your last point is a very good one. This is definitely beyond the title of the PR. This is now more along the lines of 'generic redi fixes'. I'll add a bit of explanation here about this change -- it is physically motivated and I believe fixes the stability issues @jonbob was seeing. Within the upper ocean the mesoscale eddies act horizontally and transition to along isopycnal in the interior (e.g. Ferrari et al 2005), this is a very rudimentary way to achieve that. The reason I think this will fix the issue with stability is that when I removed the surface taper double counting the redi cross terms became stronger, leading to numerical instability. This change is effectively a much stronger taper on those terms. I included this in my long 800 year spin up and didn't see stability issues, but Jon sees them quickly. I can add more explanation to this PR and/or in the code. Finally, you are absolutely right that the first line of five is not necessary. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! If you update the PR description, I am happy with this being included. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. more than happy to add this to the description, but I may hold off until @jonbob can test the impact to see if this stabilizes the run. |
||
|
||
sfcTaperUp = 1.0_RKIND + sfcTaperFactor*(sfcTaper - 1.0_RKIND) | ||
sfcTaperDown = 1.0_RKIND + sfcTaperFactor*(sfcTaper - 1.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.