Brunt-Vaisala-triggered convective adjustment – a CONTRIBUTOR
into kv/kt (see the module docstring for the full physics and
the D1-D4 divergences from MOM6’s MOM_CVMix_conv). Early-
returns when conv_enable is off (bit-identical). bl_depth
(m, positive down) is the caller’s active surface-boundary-layer
depth: pass this%bl_depth under KPP / no BL scheme, epbl%mld
under EPBL – both are permanently-zero, device-resident fields
when their owning scheme is off, so either is a free “no BL
scheme -> mask nothing” default (z_int(k) >= 0 for every
interior interface).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(hgrid_t), | intent(in) | :: | grid | |||
| type(ocean_vmix_t), | intent(inout) | :: | this | |||
| type(multilayer_state_t), | intent(in) | :: | ms | |||
| real(kind=wp), | intent(in) | :: | bl_depth(:,:) |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private | :: | nx | ||||
| integer, | private | :: | ny | ||||
| integer, | private | :: | nz |
pure subroutine vmix_apply_convection(grid, this, ms, bl_depth) !! Brunt-Vaisala-triggered convective adjustment -- a CONTRIBUTOR !! into kv/kt (see the module docstring for the full physics and !! the D1-D4 divergences from MOM6's `MOM_CVMix_conv`). Early- !! returns when `conv_enable` is off (bit-identical). `bl_depth` !! (m, positive down) is the caller's active surface-boundary-layer !! depth: pass `this%bl_depth` under KPP / no BL scheme, `epbl%mld` !! under EPBL -- both are permanently-zero, device-resident fields !! when their owning scheme is off, so either is a free "no BL !! scheme -> mask nothing" default (`z_int(k) >= 0` for every !! interior interface). type(hgrid_t), intent(in) :: grid type(ocean_vmix_t), intent(inout) :: this type(multilayer_state_t), intent(in) :: ms real(wp), intent(in) :: bl_depth(:, :) integer :: nx, ny, nz if (.not. this%conv_enable) return nx = grid%nx_total ny = grid%ny_total nz = ms%nz_ml call vmix_convection_impl(nx, ny, nz + 1, this%kv, this%kt, & ms%rho_layer, ms%h_layer, bl_depth, & this%conv_kd, this%conv_prandtl, & this%conv_n2_thresh, this%rho0) end subroutine vmix_apply_convection