The problem is that rho_dzt(:, :, 1) (density times layer thickness) is 0 over land.
This block probably needs to be wrapped in a check for the index of the bottom layer like line 9788:
if (grid_kmt(i,j) .gt. 0) then
I don't think this affects the solution since it happens over land, but debugging other issues (like I'm currently trying to do) is harder since the model aborts here when it is compiled in debug mode.
The 4P version of COBALT has the following lines here:
The problem is that
rho_dzt(:, :, 1)
(density times layer thickness) is 0 over land.This block probably needs to be wrapped in a check for the index of the bottom layer like line 9788:
I don't think this affects the solution since it happens over land, but debugging other issues (like I'm currently trying to do) is harder since the model aborts here when it is compiled in debug mode.