ocean_top_drag_destroy Subroutine

private subroutine ocean_top_drag_destroy(this)

Release the slot. is_init is cleared FIRST.

Type Bound

ocean_top_drag_t

Arguments

Type IntentOptional Attributes Name
class(ocean_top_drag_t), intent(inout) :: this

Calls

proc~~ocean_top_drag_destroy~~CallsGraph proc~ocean_top_drag_destroy ocean_top_drag_t%ocean_top_drag_destroy proc~scratch_3d_buffer_destroy scratch_3d_buffer_t%scratch_3d_buffer_destroy proc~ocean_top_drag_destroy->proc~scratch_3d_buffer_destroy

Source Code

   subroutine ocean_top_drag_destroy(this)
      !! Release the slot.  `is_init` is cleared FIRST.
      class(ocean_top_drag_t), intent(inout) :: this
      this%is_init = .false.
      call this%du_drag%destroy()
      call this%dv_drag%destroy()
      if (allocated(this%cover_u)) deallocate (this%cover_u)
      if (allocated(this%cover_v)) deallocate (this%cover_v)
      if (allocated(this%cover_t)) deallocate (this%cover_t)
      if (allocated(this%lambda_top_u)) deallocate (this%lambda_top_u)
      if (allocated(this%lambda_top_v)) deallocate (this%lambda_top_v)
      if (allocated(this%stress_top)) deallocate (this%stress_top)
   end subroutine ocean_top_drag_destroy