barotropic_workstate_destroy Subroutine

private subroutine barotropic_workstate_destroy(this)

Type Bound

barotropic_workstate_t

Arguments

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

Called by

proc~~barotropic_workstate_destroy~~CalledByGraph proc~barotropic_workstate_destroy barotropic_workstate_t%barotropic_workstate_destroy proc~ocean_dyn_destroy ocean_dyn_t%ocean_dyn_destroy proc~ocean_dyn_destroy->proc~barotropic_workstate_destroy

Source Code

   subroutine barotropic_workstate_destroy(this)
      class(barotropic_workstate_t), intent(inout) :: this
      this%is_init = .false.
      if (allocated(this%bt_eta)) deallocate (this%bt_eta)
      if (allocated(this%bt_H_ref)) deallocate (this%bt_H_ref)
      if (allocated(this%bt_ubt)) deallocate (this%bt_ubt)
      if (allocated(this%bt_vbt)) deallocate (this%bt_vbt)
      if (allocated(this%ubt_sum)) deallocate (this%ubt_sum)
      if (allocated(this%vbt_sum)) deallocate (this%vbt_sum)
      if (allocated(this%eta_sum)) deallocate (this%eta_sum)
      if (allocated(this%uhbt_sum)) deallocate (this%uhbt_sum)
      if (allocated(this%vhbt_sum)) deallocate (this%vhbt_sum)
      if (allocated(this%bt_uhbt)) deallocate (this%bt_uhbt)
      if (allocated(this%bt_vhbt)) deallocate (this%bt_vhbt)
      if (allocated(this%bt_ubt_end)) deallocate (this%bt_ubt_end)
      if (allocated(this%bt_vbt_end)) deallocate (this%bt_vbt_end)
      if (allocated(this%bt_eta_end)) deallocate (this%bt_eta_end)
      if (allocated(this%bt_zeta_corner)) deallocate (this%bt_zeta_corner)
      if (allocated(this%bt_ke_centre)) deallocate (this%bt_ke_centre)
      if (allocated(this%bt_eta_new)) deallocate (this%bt_eta_new)
      if (allocated(this%cor_ref_u)) deallocate (this%cor_ref_u)
      if (allocated(this%cor_ref_v)) deallocate (this%cor_ref_v)
      if (allocated(this%bt_ubt_prev)) deallocate (this%bt_ubt_prev)
      if (allocated(this%bt_vbt_prev)) deallocate (this%bt_vbt_prev)
      if (allocated(this%F_slow_u)) deallocate (this%F_slow_u)
      if (allocated(this%F_slow_v)) deallocate (this%F_slow_v)
      if (allocated(this%F_bt_u)) deallocate (this%F_bt_u)
      if (allocated(this%F_bt_v)) deallocate (this%F_bt_v)
      if (allocated(this%F_bt_u_fast)) deallocate (this%F_bt_u_fast)
      if (allocated(this%F_bt_v_fast)) deallocate (this%F_bt_v_fast)
      if (allocated(this%ubt_at_n)) deallocate (this%ubt_at_n)
      if (allocated(this%vbt_at_n)) deallocate (this%vbt_at_n)
      if (allocated(this%pbce)) deallocate (this%pbce)
      if (allocated(this%gtot_E)) deallocate (this%gtot_E)
      if (allocated(this%gtot_W)) deallocate (this%gtot_W)
      if (allocated(this%gtot_N)) deallocate (this%gtot_N)
      if (allocated(this%gtot_S)) deallocate (this%gtot_S)
      if (allocated(this%e_anom)) deallocate (this%e_anom)
      if (allocated(this%eta_PF)) deallocate (this%eta_PF)
      if (allocated(this%visc_rem_u)) deallocate (this%visc_rem_u)
      if (allocated(this%visc_rem_v)) deallocate (this%visc_rem_v)
      if (allocated(this%bt_rem_u)) deallocate (this%bt_rem_u)
      if (allocated(this%bt_rem_v)) deallocate (this%bt_rem_v)
      if (allocated(this%av_rem_u)) deallocate (this%av_rem_u)
      if (allocated(this%av_rem_v)) deallocate (this%av_rem_v)
      if (allocated(this%lwd_drag_u)) deallocate (this%lwd_drag_u)
      if (allocated(this%lwd_drag_v)) deallocate (this%lwd_drag_v)
      if (allocated(this%BTCL_u)) deallocate (this%BTCL_u)
      if (allocated(this%BTCL_v)) deallocate (this%BTCL_v)
      if (allocated(this%h_face_up_x)) deallocate (this%h_face_up_x)
      if (allocated(this%h_face_up_y)) deallocate (this%h_face_up_y)
      if (allocated(this%wd_wet_dyn)) deallocate (this%wd_wet_dyn)
      if (allocated(this%wd_theta)) deallocate (this%wd_theta)
      if (allocated(this%wd_flux_x)) deallocate (this%wd_flux_x)
      if (allocated(this%wd_flux_y)) deallocate (this%wd_flux_y)
      if (allocated(this%wd_open_u)) deallocate (this%wd_open_u)
      if (allocated(this%wd_open_v)) deallocate (this%wd_open_v)
   end subroutine barotropic_workstate_destroy