ocean_sponge_destroy Subroutine

private subroutine ocean_sponge_destroy(this)

Type Bound

ocean_sponge_t

Arguments

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

Source Code

   subroutine ocean_sponge_destroy(this)
      class(ocean_sponge_t), intent(inout) :: this
      this%is_init = .false.
      if (allocated(this%idamp_h)) deallocate (this%idamp_h)
      if (allocated(this%idamp_u)) deallocate (this%idamp_u)
      if (allocated(this%idamp_v)) deallocate (this%idamp_v)
      if (allocated(this%ref_tracer)) deallocate (this%ref_tracer)
      if (allocated(this%u_ref)) deallocate (this%u_ref)
      if (allocated(this%v_ref)) deallocate (this%v_ref)
      if (allocated(this%z_top)) deallocate (this%z_top)
   end subroutine ocean_sponge_destroy