fill_ke Subroutine

public subroutine fill_ke(state_handle, buf)

KE per cell on the C-grid: KE = 0.25·(u_W² + u_E² + v_S² + v_N²), the discrete C-grid KE-density (consistent with the Coriolis KE_ARAKAWA stencil). Public only for the unit-test suite.

Arguments

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

Calls

proc~~fill_ke~~CallsGraph proc~fill_ke fill_ke proc~fill_ke_impl fill_ke_impl proc~fill_ke->proc~fill_ke_impl

Source Code

   subroutine fill_ke(state_handle, buf)
      !! KE per cell on the C-grid: KE = 0.25·(u_W² + u_E² + v_S² + v_N²),
      !! the discrete C-grid KE-density (consistent with the Coriolis
      !! KE_ARAKAWA stencil).  Public only for the unit-test suite.
      class(*), intent(in) :: state_handle
      real(wp), intent(inout) :: buf(:, :, :)
      select type (state => state_handle)
      class is (ocean_state_t)
         call fill_ke_impl(state%multilayer%u_face_x_layer, &
                           state%multilayer%v_face_y_layer, buf)
      end select
   end subroutine fill_ke