clean.f90 806 Bytes
Newer Older
Matthias Zink's avatar
Matthias Zink committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
!****************************************************************************
!
!  SUBROUTINE: clean
!
!  PURPOSE:  free allocated space of all arrays
!  UPDATES
!            Created        L. Samaniego            10.08.2010
!            Last Update
!****************************************************************************
subroutine clean
  use mainVar
  use mo_kind, only: i4
  use kriging
  use runControl
  integer(i4)     :: i
  !
  ! DEM will be reused...
  !
19

Matthias Zink's avatar
Matthias Zink committed
20
21
22
23
24
25
26
27
28
29
  ! Stations
  do i = 1, nSta
    if ( allocated( MetSta(i)%z ) ) deallocate( MetSta(i)%z )
  end do
  if ( allocated(MetSta)  ) deallocate (MetSta)

  do i=1,nCell
    if ( allocated( cell(i)%listNS ) )  deallocate ( cell(i)%listNS )
  end do
  if ( allocated(cell)) deallocate (cell)
30
31

  call edk_dist%clean
Matthias Zink's avatar
Matthias Zink committed
32
33
34
35
36

end subroutine clean