ocean_cavity_flux_destroy Subroutine

private subroutine ocean_cavity_flux_destroy(this)

Release the slot. is_init is cleared FIRST.

Type Bound

ocean_cavity_flux_t

Arguments

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

Source Code

   subroutine ocean_cavity_flux_destroy(this)
      !! Release the slot.  `is_init` is cleared FIRST.
      class(ocean_cavity_flux_t), intent(inout) :: this
      this%is_init = .false.
      if (allocated(this%f_cor)) deallocate (this%f_cor)
      if (allocated(this%active)) deallocate (this%active)
      if (allocated(this%t_far)) deallocate (this%t_far)
      if (allocated(this%s_far)) deallocate (this%s_far)
      if (allocated(this%u_far)) deallocate (this%u_far)
      if (allocated(this%v_far)) deallocate (this%v_far)
      if (allocated(this%ustar)) deallocate (this%ustar)
      if (allocated(this%t_b)) deallocate (this%t_b)
      if (allocated(this%s_b)) deallocate (this%s_b)
      if (allocated(this%melt)) deallocate (this%melt)
      if (allocated(this%q_ocean)) deallocate (this%q_ocean)
      if (allocated(this%gamma_t)) deallocate (this%gamma_t)
      if (allocated(this%gamma_s)) deallocate (this%gamma_s)
      if (allocated(this%status)) deallocate (this%status)
      if (allocated(this%comp_scale)) deallocate (this%comp_scale)
   end subroutine ocean_cavity_flux_destroy