Update the kpp test to include running with StokesMOST#102
Merged
mnlevy1981 merged 7 commits intoCVMix:masterfrom Jan 24, 2025
Merged
Update the kpp test to include running with StokesMOST#102mnlevy1981 merged 7 commits intoCVMix:masterfrom
mnlevy1981 merged 7 commits intoCVMix:masterfrom
Conversation
Changed ifx -> ifort; also needed to change order of $(EXE) dependencies in src/Makefile (maybe a make 4.1 vs make 3.81 difference?)
Now use -O0 -g -fpe0 to capture floating point exceptions. Also updated the Makefile because the netCDF pkgconfig/netcdf-fortran.pc file changed format
Added external statements to cvmix_driver.F90 to avoid build issue with intel compiler; also added a seventh test to reg_tests/kpp and modified cvmix_kpp.F90 to fix a segmentation fault in this new test.
Found one more possible divide-by-zero, and fixed it as well
The argument kSL needs to be an integer between 1 and nlev7; it was using kt in previous commit, which is a bad choice because kt is computed in an earlier test... so if Test 7 is the only one being run, kt won't be defined and if the previous test has more columns than Test 7 than kt might be larger than nlev7 Using (nlev7+1)/2, which should always be between 1 and nlev7 using integer division
Split surf_fric**3 / (surf_buoy(k+1) * (cvmix_one-Xi(k+1))) into storing numerator and denominator separately, and intentionally compute surf_fric**3 outside the k loop but surf_buoy(k+1) * (cvmix_one-Xi(k+1)) needs to be inside it
1. index of zw_iface should be (k+1) instead of (k) cvmix_kpp_compute_OBL_depth_low() 2. there are some checks for OBL_depth (is it bigger than minOBLdepth? is it smaller than maxOBLdepth?) that should be called regardless of value of lStokesMOST, but they were only in the lStokesMOST = .false. branch of a conditional Also, I removed a "if BLdepth > 0" check in cvmix_kpp_compute_StokesXi() because BLdepth should always be positive given the fixes above.
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.
CESM is running into some divide-by-zeros in the StokesMOST code -- this PR will add a seventh test to
reg_tests/kppthat turns on StokesMOST and will also fix any float-point errors caught by that test.