stop_macro.F90 1.39 KB
Newer Older
kbk's avatar
kbk committed
1
!$Id: stop_macro.F90,v 1.6 2006-03-01 15:54:08 kbk Exp $
gotm's avatar
gotm committed
2 3 4 5
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
!
6
! !ROUTINE: stop_macro - terminates the macro loop \label{sec-stop-macro}
gotm's avatar
gotm committed
7 8 9 10 11 12
!
! !INTERFACE:
   subroutine stop_macro
!
! !DESCRIPTION:
!
13 14 15 16 17 18
! This routine should be called from {\tt m3d} at the end of each macro
! time step in order to copy the vertically interated and temporally
! averaged transports to old values {\tt Uinto} and {\tt Vinto}, and
! to reinitialise the transports {\tt Uint} and {\tt Vint}
! to zero.
!
gotm's avatar
gotm committed
19
! !USES:
20
   use variables_2d, only: Uint,Uinto,Vint,Vinto
gotm's avatar
gotm committed
21 22 23 24 25 26 27 28
   IMPLICIT NONE
!
! !INPUT PARAMETERS:
!
! !INPUT/OUTPUT PARAMETERS:
!
! !OUTPUT PARAMETERS:
!
kbk's avatar
kbk committed
29 30 31
! !REVISION HISTORY:
!  Original author(s): Hans Burchard & Karsten Bolding
!
gotm's avatar
gotm committed
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
! !LOCAL VARIABLES:
!EOP
!-----------------------------------------------------------------------
!BOC
#ifdef DEBUG
   integer, save :: Ncall = 0
   Ncall = Ncall+1
   write(debug,*) 'stop_macro() # ',Ncall
#endif

  Uinto=Uint
  Uint= _ZERO_
  Vinto=Vint
  Vint= _ZERO_

#ifdef DEBUG
   write(debug,*) 'Leaving stop_macro()'
   write(debug,*)
#endif
   return
   end subroutine stop_macro
!EOC

!-----------------------------------------------------------------------
! Copyright (C) 2001 - Hans Burchard and Karsten Bolding               !
!-----------------------------------------------------------------------