Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(*)Avoid diagnostic seg fault in a 10km deep ocean
It was noted in NOAA-GFDL/issues/491 that the call to initialize_regridding() for diagnostics gives a segmentation fault when the maximum depth of the ocean is greater than 9250 m unless DIAG_COORD_DEF_Z is explicitly set. This commit fixes this problem by (1) adding an extra layer to the bottom of the hard-coded WOA09 list of diagnostic depths when the ocean is deeper than the 9250 m maximum depth in that file, and (2) changing the default behavior for diagnostic grids to be be uniform when the maximum ocean depth is deeper than 9250 m, for which WOA09 is no longer likely to be a convenient choice. With this change, MOM6 no longer has segmentation faults for the configuration described in issues/491. All solutions are bitwise identical, but some z-space diagnostic grids will be modified in cases that previously had segmentation faults.
- Loading branch information