gavin971 / cvmix

Automatically exported from code.google.com/p/cvmix
0 stars 0 forks source link

Out of bounds indexing in cvmix_coeffs_kpp_low #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In r226, line 433 of cvmix_kpp.F90, there are references to kwup+2 which can be 
out of bounds if kwup = nLevs.

Amazingly, we're hitting this!

Original issue reported on code.google.com by adcr...@gmail.com on 19 Aug 2013 at 2:59

GoogleCodeExporter commented 9 years ago
Fixed in r230, though as that commit log mentions the fix can be extended. 
Basically, cvmix_math assumes all interpolation will use backward differences 
to compute derivatives but POP uses a forward difference when interpolating the 
viscosity to compute at the OBL depth. (The confusion stems from POP using a 
backward difference in the other interpolation it does - determining where bulk 
Richardson = critical value).

Original comment by mike.lev...@gmail.com on 26 Aug 2013 at 3:20