ocean_bc_state_destroy Subroutine

public subroutine ocean_bc_state_destroy(this)

Arguments

Type IntentOptional Attributes Name
type(ocean_bc_state_t), intent(inout) :: this

Called by

proc~~ocean_bc_state_destroy~~CalledByGraph proc~ocean_bc_state_destroy ocean_bc_state_destroy proc~ocean_state_destroy ocean_state_t%ocean_state_destroy proc~ocean_state_destroy->proc~ocean_bc_state_destroy

Source Code

   subroutine ocean_bc_state_destroy(this)
      type(ocean_bc_state_t), intent(inout) :: this
      this%is_init = .false.
      if (allocated(this%west%clamped_tracer)) deallocate (this%west%clamped_tracer)
      if (allocated(this%east%clamped_tracer)) deallocate (this%east%clamped_tracer)
      if (allocated(this%south%clamped_tracer)) deallocate (this%south%clamped_tracer)
      if (allocated(this%north%clamped_tracer)) deallocate (this%north%clamped_tracer)
      if (allocated(this%eta_old_west)) deallocate (this%eta_old_west)
      if (allocated(this%eta_old_east)) deallocate (this%eta_old_east)
      if (allocated(this%eta_old_south)) deallocate (this%eta_old_south)
      if (allocated(this%eta_old_north)) deallocate (this%eta_old_north)
      ! Reservoir arrays (§1, v2).
      if (allocated(this%tres_west)) deallocate (this%tres_west)
      if (allocated(this%tres_east)) deallocate (this%tres_east)
      if (allocated(this%tres_south)) deallocate (this%tres_south)
      if (allocated(this%tres_north)) deallocate (this%tres_north)
      ! Orlanski radiation arrays (§2, v2).
      if (allocated(this%rx_west)) deallocate (this%rx_west)
      if (allocated(this%rx_east)) deallocate (this%rx_east)
      if (allocated(this%rx_south)) deallocate (this%rx_south)
      if (allocated(this%rx_north)) deallocate (this%rx_north)
      if (allocated(this%u_prev_west)) deallocate (this%u_prev_west)
      if (allocated(this%u_prev_east)) deallocate (this%u_prev_east)
      if (allocated(this%u_prev_south)) deallocate (this%u_prev_south)
      if (allocated(this%u_prev_north)) deallocate (this%u_prev_north)
      if (allocated(this%data_u_west)) deallocate (this%data_u_west)
      if (allocated(this%data_u_east)) deallocate (this%data_u_east)
      if (allocated(this%data_v_south)) deallocate (this%data_v_south)
      if (allocated(this%data_v_north)) deallocate (this%data_v_north)
      if (allocated(this%data_eta_west)) deallocate (this%data_eta_west)
      if (allocated(this%data_eta_east)) deallocate (this%data_eta_east)
      if (allocated(this%data_eta_south)) deallocate (this%data_eta_south)
      if (allocated(this%data_eta_north)) deallocate (this%data_eta_north)
      if (allocated(this%data_tracer_west)) deallocate (this%data_tracer_west)
      if (allocated(this%data_tracer_east)) deallocate (this%data_tracer_east)
      if (allocated(this%data_tracer_south)) deallocate (this%data_tracer_south)
      if (allocated(this%data_tracer_north)) deallocate (this%data_tracer_north)
   end subroutine ocean_bc_state_destroy