!-------------------------------------- LICENCE BEGIN ------------------------------------
!Environment Canada - Atmospheric Science and Technology License/Disclaimer, 
!                     version 3; Last Modified: May 7, 2008.
!This is free but copyrighted software; you can use/redistribute/modify it under the terms 
!of the Environment Canada - Atmospheric Science and Technology License/Disclaimer 
!version 3 or (at your option) any later version that should be found at: 
!http://collaboration.cmc.ec.gc.ca/science/rpn.comm/license.html 
!
!This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
!without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
!See the above mentioned License/Disclaimer for more details.
!You should have received a copy of the License/Disclaimer along with this software; 
!if not, you can write to: EC-RPN COMM Group, 2121 TransCanada, suite 500, Dorval (Quebec), 
!CANADA, H9P 1J3; or send e-mail to service.rpn@ec.gc.ca
!-------------------------------------- LICENCE END --------------------------------------
***s/r gem_ctrl_ad - ADJ of gem_ctrl_tl 
*
#include "model_macros_f.h"
*

      subroutine gem_ctrl_ad 3,3
*
      implicit none
*
*author
*     M.Tanguay
*
*revision
* v2_10 - Tanguay M.        - initial MPI version
* v2_21 - Tanguay M.        - modification as in gem_ctrl
* v3_00 - Laroche S.        - include simplified physics
* v3_11 - Tanguay M.        - ADJ of digital filter 
*
*object
*     see id section
*	
*arguments
*     none
*
*implicits
#include "init.cdk"
#include "lctl.cdk"
#include "lun.cdk"
*
      logical rstrt_L
      data rstrt_L /.false./
*
*     ______________________________________________________
*
      if( rstrt_L ) call gem_stop('gem_ctrl_ad',-1)
*     ______________________________________________________
*
      if ( .not.rstrt_L ) call gem_run_ad (.false., rstrt_L)
*
      if ( Init_balgm_L ) Lctl_step = Init_dfnp-1
      if ( Init_balgm_L ) call initial_ad (rstrt_L) 
*
      if (Lun_out.gt.0) write(Lun_out,3000) Lctl_step
*
 3000 format(
     +//,'END OF CURRENT TIME SLICE (S/R GEM_CTRL_AD) AT TIMESTEP',I8,
     + /,'=======================================================')
*
*     ---------------------------------------------------------------
*
      return
      end