Fix out-of-bounds access on zk in cvmix_kpp_compute_StokesXi (2)#114
Merged
mnlevy1981 merged 2 commits intoCVMix:masterfrom May 4, 2026
Merged
Fix out-of-bounds access on zk in cvmix_kpp_compute_StokesXi (2)#114mnlevy1981 merged 2 commits intoCVMix:masterfrom
mnlevy1981 merged 2 commits intoCVMix:masterfrom
Conversation
Contributor
Author
|
Menitoning @mnlevy1981 |
mnlevy1981
requested changes
May 4, 2026
Contributor
mnlevy1981
left a comment
There was a problem hiding this comment.
@alperaltuntas the source mods look good, but there's some trailing white space that needs be cleaned up so the CI tests will pass:
* Check for trailing white space: 6 error(s) found
../src/shared/cvmix_kpp.F90:3454: real(cvmix_r8) :: BLDepth, TauMAG, TauCG, TauDG, taux0, tauy0, Stk0 , Pinc█
../src/shared/cvmix_kpp.F90:3457: integer :: ktmp ! vertical loop index███████████████████████████
../src/shared/cvmix_kpp.F90:3483: delz = zk(1) - zk(2)█
../src/shared/cvmix_kpp.F90:3492: delz = zk(ktmp) - zk(ktmp+1)██
../src/shared/cvmix_kpp.F90:3507: tauEbot = (tauxbot * delU + tauybot * delV) / delz█████████████████████████████
../src/shared/cvmix_kpp.F90:3540: tauEbot = (tauxbot * delU + tauybot * delV) / delz██
* Check length of lines: 0 error(s) found
* Check for case sensitive statements: 0 error(s) found
Fortran errors found: 6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR applies a fix a Fortran runtime error caused by accessing zk(kSL+1) when the KPP surface layer cell index kSL equals the number of vertical levels.
Fixes: #112