fill_mld_density Subroutine

public subroutine fill_mld_density(state_handle, buf)

Mixed-layer depth via the de Boyer Montégut threshold.

Arguments

Type IntentOptional Attributes Name
class(*), intent(in) :: state_handle
real(kind=wp), intent(inout) :: buf(:,:,:)

Calls

proc~~fill_mld_density~~CallsGraph proc~fill_mld_density fill_mld_density proc~fill_mld_density_impl fill_mld_density_impl proc~fill_mld_density->proc~fill_mld_density_impl proc~zero3_impl zero3_impl proc~fill_mld_density->proc~zero3_impl local local proc~fill_mld_density_impl->local rdb_vl_is_live rdb_vl_is_live proc~fill_mld_density_impl->rdb_vl_is_live

Variables

Type Visibility Attributes Name Initial
integer, private :: nz_ml

Source Code

   subroutine fill_mld_density(state_handle, buf)
      !! Mixed-layer depth via the de Boyer Montégut threshold.
      class(*), intent(in) :: state_handle
      real(wp), intent(inout) :: buf(:, :, :)
      integer :: nz_ml
      select type (state => state_handle)
      class is (ocean_state_t)
         nz_ml = state%multilayer%nz_ml
         if (nz_ml < 1) then
            call zero3_impl(buf)
            return
         end if
         call fill_mld_density_impl(state%multilayer%h_layer, &
                                    state%multilayer%rho_layer, &
                                    state%multilayer%k_top, &
                                    nz_ml, buf)
      end select
      if (.false.) buf(1, 1, 1) = GRAVITY  ! keep GRAVITY import live
   end subroutine fill_mld_density