SUBROUTINE UPDCLIE_AER(PTSTEP)

!**** *UPDCLIE*

!     PURPOSE.
!     --------

!     Updates the aerosol emission climatological data including a diurnal cycle 
!     (ECMWF version, distributed or shared memory)

!     Attention!! the way this routine is written is to be applied for only
!     one climatological field written in AERCLIM file with gribs
!     in ascendent date/time order

!**   INTERFACE.
!     ----------

!     CALL UPDCLIE_AER(PTSTEP)

!        Explicit arguments :
!        --------------------
!        PTSTEP: TIME STEP

!     EXTERNALS.
!     ----------

!     UPDCALSEC

!     AUTHORS. of UPDCLIE (see updclie.F90)
!     --------            (see updclie_co2.F90 S. Serrar)

!     modified version for aerosols : JJMorcrette 20070223
!     ------------------------------------------------------------------

USE PARKIND1  ,ONLY : JPIM     ,JPRB
USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
USE YOMGRB    ,ONLY : NGRBAERDEP
USE YOMCST   , ONLY : RDAY
USE YOMCT0   , ONLY : NSTOP    ,CNMEXP   ,LTWOTL
USE YOMDIM   , ONLY : NDGSAG   ,NDGENG   ,NDGNH    ,&
 & NFLEVG   ,NPROMA
USE YOMGEM   , ONLY : NGPTOT   ,NGPTOTMX ,&
 & NLOENG   ,NGPTOTG  
USE YOMLUN   , ONLY : NULOUT   ,NULERR
USE YOMMCC   , ONLY : NPAER_1      ,NPAER_2      ,CLIMRAER   ,&
 & LMCCIEC 
USE YOMMP    , ONLY : MYPROC
USE YOMMSC   , ONLY : NINTLEN
USE YOMRIP   , ONLY : NINDAT   ,NSSSSS   ,NSTADD   ,NSTASS
USE SURFACE_FIELDS_MIX, ONLY : SD_VF, YSD_VF

IMPLICIT NONE

#include "abor1.intfb.h"
#include "ircvgpf.intfb.h"
#include "isndgpf.intfb.h"
#include "updcal.intfb.h"
#include "updcalsec.intfb.h"

INTEGER(KIND=JPIM), PARAMETER :: JPCLIMAER=15

REAL(KIND=JPRB)   ,INTENT(IN)    :: PTSTEP 
INTEGER(KIND=JPIM) :: ILMOIS(12)
INTEGER(KIND=JPIM) :: IGRIG(NGPTOTG)
INTEGER(KIND=JPIM) ::   ISEC0(2),ISEC1(60),ISEC2(22+(NDGENG-NDGSAG+1)),&
 & ISEC3(2),ISEC4(42)  
REAL(KIND=JPRB) ::      ZSEC2(10+2*(NFLEVG+1)),ZSEC3(2)
REAL(KIND=JPRB) :: ZBUF (NGPTOTG)
REAL(KIND=JPRB) :: ZFLD (NGPTOTMX)
CHARACTER :: CLNOMF*15

INTEGER(KIND=JPIM) :: IA0, IAE, IAN, ICCYY0, ICCYYE,&
 & IAT1,IAT2,IAE1,ICC,&
 & IHOUR,IH0,IHT1,IHT2,IHE,IHH0,IHE1,IHHE,&
 & IMIN,IMNT1,IMNT2,IMNE,IMN0,IMNE1,IMNE2,&
 & ISEC,IUMIN,IJE1,&
 & IYYM,IDHMN,IYYM0,IIDHMN0,&
 & IDIF, IDIFD, IEND, &
 & IERR, IFIRST, IIDHMNE , IYYME , &
 & IJ0, IJE, IJOUR, IDD0, IDDE, &
 & IJT1, IJT2, &
 & ILENBYT, ILENGG, ILEVTY, ILONG, &
 & IM0, IME, IMM0, IMME, IMOIS, IMT1, IMT2, IME1, &
 & IPAR, IPARAM, &
 & IBL, IPOI, IPOIN, &
 & IREPRT, IRET, IST, ISTADDE, ISTASSE,&
 & ITIME, IUNITCO2, IWORD, &
 & IZTE, J, JCL, JF, &
 & JROF, JSTGLO, JTIM, IYEARG,&
 & IYYYYMMDDHH2,IYYYYMMDDHHE,IADD,IDT,IDT1,IDT2

LOGICAL :: LLFIRST, LLFOUND, LLREAD, LLSCAN , LLOPEN
INTEGER(KIND=JPIM) :: IDATE1,IDATE2 , IHFOUND
INTEGER(KIND=JPIM),SAVE :: IDATEREF1,IDATEREF2,IHE2,IJE2,IME2,IAE2,ITIM
INTEGER(KIND=JPIM),SAVE :: IINFO(100,3,JPCLIMAER)

REAL(KIND=JPRB) :: ZPOID1, ZPOID2, ZCO2
REAL(KIND=JPRB) :: ZHOOK_HANDLE

#include "fcttim.h"

DATA LLFIRST /.TRUE./
DATA LLSCAN/.TRUE./

!*
!     1. SETTING CONSTANT VALUES.
!     ---------------------------

IF (LHOOK) CALL DR_HOOK('UPDCLIE_AER',0,ZHOOK_HANDLE)

LLOPEN=.FALSE.

!*    1.1 Calendar

IJ0=NDD(NINDAT)
IM0=NMM(NINDAT)
IA0=NCCAA(NINDAT)
IH0=NSSSSS/3600_JPIM
CALL UPDCALSEC(IH0,IJ0,IM0,IA0,NSTADD,NSTASS,IHOUR,IMIN,ISEC,IJOUR,IMOIS,IAN,ILMOIS,NULOUT)

! CO2 diurnal cycle given every 3 hours with first value at 01:30Z

IUMIN=IHOUR*60_JPIM+IMIN

IF(IUMIN >=90_JPIM .and. IUMIN < 1350_JPIM) THEN
  IHFOUND=(IUMIN-90_JPIM)/180_JPIM
  IHT1=1_JPIM + 3_JPIM * IHFOUND 
  IMNT1=30_JPIM
  IHT2=IHT1+3_JPIM
  IMNT2=30_JPIM
! CO2 climatologies are given only for 2002 and 2003
  IAT1=MAX(2002_JPIM,IAN)
  IAT1=MIN(IAT1,2003_JPIM)
  IAT2=IAT1
  IMT1=IMOIS
  IJT1=IJOUR
  IJT2=IJT1
  IMT2=IMT1
ELSEIF(IUMIN < 90_JPIM) THEN 
  IHT1=22_JPIM
  IMNT1=30_JPIM
  IHT2=1_JPIM
  IMNT2=30_JPIM
  CALL UPDCAL(IJOUR,IMOIS,IAN,-1,IJT1,IMT1,IAT1,ILMOIS,NULOUT)
  IAT1=MAX(2002_JPIM,IAN)
  IAT1=MIN(IAT1,2003_JPIM)
  IJT2=IJOUR
  IMT2=IMOIS
  IAT2=IAN
  IAT2=MAX(2002_JPIM,IAT2)
  IAT2=MIN(IAT2,2003_JPIM)
ELSEIF(IUMIN >= 1350_JPIM) THEN
  IHT1=22_JPIM
  IMNT1=30_JPIM
  IHT2=1_JPIM
  IMNT2=30_JPIM
  CALL UPDCAL(IJOUR,IMOIS,IAN,1,IJT2,IMT2,IAT2,ILMOIS,NULOUT)
  IAT2=MAX(2002_JPIM,IAT2)
  IAT2=MIN(IAT2,2003_JPIM)
  IJT1=IJOUR
  IMT1=IMOIS
  IAT1=IAN
  IAT1=MAX(2002_JPIM,IAN)
  IAT1=MIN(IAT1,2003_JPIM)
ENDIF


IDATE1=IMT2+IAT2*100
IDATE2=IMNT2+IHT2*100+IJT2*10000



IF(IDATE1 /= IDATEREF1 .OR. IDATE2 /= IDATEREF2) LLFIRST=.TRUE.

IRET=0
IF(.NOT.LLFIRST.AND. MYPROC == 1) THEN
  IYYYYMMDDHH2=IHT2+IJT2*100+IMT2*10000+IAT2*1000000
  IYYYYMMDDHHE=IHE2+IJE2*100+IME2*10000+IAE2*1000000
  IF(IYYYYMMDDHH2 < IYYYYMMDDHHE) LLSCAN=.FALSE.
ENDIF


!*
!     2. OPEN AND SCAN THE FILE, IF CLIMATE FIELDS REQUIRED
!     -----------------------------------------------------

!*    2.1 OPEN CLIMATE FILE

SCANIF:IF(JPCLIMAER >= 1.AND.LLFIRST) THEN

  MYPROCIF: IF (MYPROC == 1) THEN

! ONLY PROCESSOR 1 SHOULD OPEN 

    CLNOMF='CO2CLIM'//CNMEXP(1:4)//'INIT'
    WRITE(UNIT=NULOUT,FMT='(A)') ' READ CLIMATE FIELDS FROM GRIB '
    WRITE(UNIT=NULOUT,FMT='(A,A)')&
     & ' INITIAL DATA TO BE READ FROM FILE ',CLNOMF  
    CALL PBOPEN(IUNITCO2,CLNOMF,'r',IRET)
    LLOPEN=.TRUE.
    IF(IRET /= 0) THEN
      WRITE(NULERR,'(A,I2)')'UPDCLIE_CO2: PROBLEM IN PBOPEN, IRET=',IRET
      CALL ABOR1('UPDCLIE_CO2: PROBLEM IN PBOPEN')
    ENDIF

    IF(LLSCAN) THEN

!*    2.2 READ, DECODE HEADERS, CHECK THE FIELDS AND POSITIONS THE FILE

    ILENGG=NGPTOTG
    ILENBYT=NINTLEN*ILENGG
    IPOIN=0
    SCAN: DO JTIM=1,100
      DO JCL=1,JPCLIMAER
        IRET=0
        CALL PBGRIB(IUNITCO2,IGRIG,ILENBYT,ILONG,IRET)
        IF(IRET == 0) THEN
          ILONG=ILONG/NINTLEN
        ELSEIF(IRET == -1) THEN
          ITIM=JTIM-1
          EXIT SCAN
        ELSE
          WRITE(NULERR,'(A,I2)')'UPDCLIE_CO2: PROBLEM IN PBGRIB, IRET=',IRET
          CALL ABOR1('UPDCLIE_CO2: PROBLEM IN PBGRIB')
        ENDIF
        IPOI=IPOIN
        CALL PBTELL(IUNITCO2,IPOIN)
        IF (IPOIN == -2) THEN
          WRITE(NULERR,'(A,I2)')'UPDCLIE_CO2: PROBLEM IN PBTELL, IRET=',IPOIN
          CALL ABOR1('UPDCLIE_CO2: PROBLEM IN PBTELL')        
        ENDIF
        CALL GSTATS(1703,0)
        CALL GRIBEX(ISEC0,ISEC1,ISEC2,ZSEC2,ISEC3,ZSEC3,ISEC4,&
         & ZBUF,ILENGG,IGRIG,ILONG,IWORD,'I',IERR)  
        CALL GSTATS(1703,1)
        IPARAM=ISEC1(6)
        IF(ISEC1(1) == 210) IPARAM=IPARAM+210000
! SKIPPING OVER NON NEEDED FIELDS
!-----------------
        IF( NGRBAERDEP /= IPARAM ) CYCLE SCAN

        ICC=ISEC1(21)-1_JPIM
        IDHMN=ISEC1(14)+ISEC1(13)*100+ISEC1(12)*10000
        IYYM=ISEC1(11)+ISEC1(10)*100+ICC*10000
        ILEVTY=ISEC1(7)
        IREPRT=ISEC2(1)

!      check some parameters

        IF (IREPRT /= 4) THEN
          WRITE(NULERR,'(" UPDCLIE_CO2 :UNEXPECTED DATA ",&
           & "REPRESENTATION TYPE",I6)') IREPRT  
          CALL ABOR1(' UPDCLIE_CO2:INVALID DATA REPRESENTATION TYPE')
        ENDIF
        IF(ISEC2(10) /= NDGNH) THEN
          WRITE(NULERR,'(" UPDCLIE_CO2: RESOLUTION OF MODEL ",I6,&
           & " ,OF INITIAL DATA ",I6)') NDGNH,ISEC2(10)  
          CALL ABOR1(' UPDCLIE_CO2 : INVALID DATA RESOLUTION')
        ENDIF
        IF(ILEVTY /= 1.AND.ILEVTY /= 112) THEN
          WRITE(NULERR,'(" UDPCLIEDM :  UNEXPECTED LEVEL TYPE ",I6)') ILEVTY
          CALL ABOR1(' UPDCLIE_CO2 : INVALID LEVEL TYPE')
        ENDIF


!      record/communicate field index

        IINFO(JTIM,1,JCL)=IPOI
        IINFO(JTIM,2,JCL)=IYYM
        IINFO(JTIM,3,JCL)=IDHMN
      ENDDO
    ENDDO SCAN


! Check fields come in a consistent order and position file at the
!   right place

    ITIME=NINT(PTSTEP)
    IF (LTWOTL) THEN
      IZTE=NINT(PTSTEP*(REAL(NSTOP,JPRB)+0.5_JPRB))
    ELSE
      IZTE=ITIME*NSTOP
    ENDIF
    ISTADDE=IZTE/NINT(RDAY)
    ISTASSE=IZTE-ISTADDE*RDAY
    CALL UPDCALSEC(IH0,IJ0,IM0,IA0,ISTADDE,ISTASSE,IHE,IMNE,ISEC,IJE,IME,IAE,ILMOIS,NULOUT)
    IF (LMCCIEC) THEN
      ICCYY0=IAT1
      IMM0=IMT1
      IDD0=IJT1
      IHH0=IHT1
      IMN0=IMNT1

! position of the last file needed during the running of the model

      IUMIN=IHE*60_JPIM+IMNE

      IF(IUMIN >=90_JPIM .and. IUMIN < 1350_JPIM) THEN
        IHFOUND=(IUMIN-90_JPIM)/180_JPIM
        IHE1=1_JPIM + 3_JPIM * IHFOUND
        IMNE1=30_JPIM   
        IHE2=IHE1+3_JPIM 
        IMNE2=30_JPIM
! CO2 climatologies are given only for 2002 and 2003
        IAE1=MAX(2002_JPIM,IAE)
        IAE1=MIN(IAE1,2003_JPIM)
        IAE2=IAE1
        IME1=IME
        IJE1=IJE
        IJE2=IJE1
        IME2=IME1
      ELSEIF(IUMIN < 90_JPIM) THEN 
        IHE1=22_JPIM
        IMNE1=30_JPIM
        IHE2=1_JPIM
        IMNE2=30_JPIM
        CALL UPDCAL(IJE,IME,IAE,-1,IJE1,IME1,IAE1,ILMOIS,NULOUT)
        IAE1=MAX(2002_JPIM,IAE) 
        IAE1=MIN(IAE1,2003_JPIM)
        IJE2=IJE
        IME2=IME
        IAE2=IAE
        IAE2=MAX(2002_JPIM,IAE2)
        IAE2=MIN(IAE2,2003_JPIM)
      ELSEIF(IUMIN >= 1350_JPIM) THEN
        IHE1=22_JPIM 
        IMNE1=30_JPIM
        IHE2=1_JPIM
        IMNE2=30_JPIM
        CALL UPDCAL(IJE,IME,IAE,1,IJE2,IME2,IAE2,ILMOIS,NULOUT)
        IAE2=MAX(2002_JPIM,IAE2)
        IAE2=MIN(IAE2,2003_JPIM)
        IJE1=IJE
        IME1=IME
        IAE1=IAE
        IAE1=MAX(2002_JPIM,IAE)
        IAE1=MIN(IAE1,2003_JPIM)
      ENDIF

      
      IMME=IME2
      ICCYYE=IAE2
      IDDE=IJE2
      IHHE=IHE2
      IMNE=IMNE2

! Locates the first field needed

      IYYM0=IMM0+100*ICCYY0
      IIDHMN0=IMN0+IHH0*100+IDD0*10000
      LLFOUND=.FALSE.
      DO J=1,ITIM
        IF (IYYM0 == IINFO(J,2,1) .AND. IIDHMN0 == IINFO(J,3,1)) THEN
          IADD=IINFO(J,1,1)
          LLFOUND=.TRUE.
          EXIT
        ENDIF
      ENDDO
      IF (.NOT.LLFOUND) THEN
        CALL ABOR1(' UPDCLIE_CO2 : FIRST FILE NOT FOUND')
      ENDIF

! Locates the last field needed at the end of the model run

      IYYME=IMME+100*ICCYYE
      IIDHMNE=IMNE+IHHE*100+IDDE*10000
      IEND=0_JPIM
      DO J=1,ITIM
        IF (IYYME == IINFO(J,2,1) .AND. IIDHMNE == IINFO(J,3,1)) THEN
          IEND=J
          EXIT
        ENDIF
      ENDDO
      IF (IEND == 0_JPIM) THEN
        WRITE(NULERR,*) 'IEND not found ',IYYME,IIDHMNE
        CALL ABOR1(' UPDCLIE_CO2 : END FILE NOT FOUND')
      ENDIF

    ELSE
      WRITE(NULERR,*)'UPDCLIE_CO2: PROBLEM LOGICAL - CHECK PARAMETERS '
      CALL ABOR1(' UPDCLIE_CO2 : LMCCIEC est FALSE')
    ENDIF



    ENDIF

! end of test on LLSCAN - the scan is done only when it's needed

! Positions the file in the first field needed

! Locates the first field needed

    IF(.NOT.LLSCAN) THEN

      ICCYY0=IAT1
      IMM0=IMT1
      IDD0=IJT1
      IHH0=IHT1
      IMN0=IMNT1


      IYYM0=IMM0+100*ICCYY0
      IIDHMN0=IMN0+IHH0*100+IDD0*10000
      LLFOUND=.FALSE.
      DO J=1,ITIM
        IF (IYYM0 == IINFO(J,2,1) .AND. IIDHMN0 == IINFO(J,3,1)) THEN
          IADD=IINFO(J,1,1)
          LLFOUND=.TRUE.
          EXIT
        ENDIF
      ENDDO
      IF (.NOT.LLFOUND) THEN
        CALL ABOR1(' UPDCLIE_CO2 : FIRST FILE NOT FOUND')
      ENDIF
    ENDIF

    IRET=0
    CALL PBSEEK(IUNITCO2,IADD,0,IRET)
    IF(IRET < 0) THEN
      WRITE(NULERR,'(A,I2)')'UPDCLIE_CO2: PROBLEM IN PBSEEK, IRET=',IRET
      CALL ABOR1('UPDCLIE_CO2: PROBLEM IN PBSEEK')
    ENDIF


  ENDIF MYPROCIF

ENDIF SCANIF

!*    3. READ THE FILE, IF NEEDED.
!     -----------------------------


READIF: IF(JPCLIMAER >= 1) THEN

!* Decide if reading time

  IF (LMCCIEC) THEN
    IF (LLFIRST) THEN
      IDATEREF1=0_JPIM
      IDATEREF2=0_JPIM
      LLREAD=.TRUE.
      IFIRST=2
    ELSE
      LLREAD=.FALSE.
    ENDIF
  ELSE
    WRITE(NULERR,*) 'CHECK PARAMETERS : UPDCLIE_AER'
    CALL ABOR1('UPDCLIE_CO2: LMCCIEC =.FALSE.')
  ENDIF


!*    3.1 READ, DECODE AND SELECT THE FIELDS

  ILENGG=NGPTOTG
  ILENBYT=NINTLEN*ILENGG
  IF (LLREAD) THEN
    FIRST: DO JF=1,IFIRST
!-------
      NPAER_1=3-NPAER_1
      NPAER_2=3-NPAER_2

      READ: DO JCL=1,JPCLIMAER
        IPARAM=NGRBAERDEP
!-------
        IF (MYPROC == 1) THEN
          IRET=0
          CALL PBGRIB(IUNITCO2,IGRIG,ILENBYT,ILONG,IRET)
          IF(IRET == 0) THEN
             ILONG=ILONG/NINTLEN
          ELSE
            WRITE(NULERR,'(A,I2)')'UPDCLIE_CO2: PROBLEM IN PBGRIB, IRET=',IRET
            CALL ABOR1('UPDCLIE_CO2: PROBLEM IN PBGRIB')
          ENDIF

          ZSEC3(2)=-9999._JPRB
          CALL GSTATS(1703,0)
          CALL GRIBEX(ISEC0,ISEC1,ISEC2,ZSEC2,ISEC3,ZSEC3,ISEC4,&
           & ZBUF,ILENGG,IGRIG,ILONG,IWORD,'D',IERR)  
          CALL GSTATS(1703,1)
          IPAR=ISEC1(6)
          IF(ISEC1(1) == 210) IPAR=IPAR+210000

          IYEARG=(ISEC1(21)-1_JPIM)*100+ISEC1(10)


          IYYM=IYEARG*100+ISEC1(11)
          IDHMN=ISEC1(14)+ISEC1(13)*100+ISEC1(12)*10000

!        distribute field to nodes

          CALL ISNDGPF(ZBUF,ZFLD)

        ENDIF

        

        IDATEREF1=IAT2*100+IMT2
        IDATEREF2=IMNT2+IHT2*100+IJT2*10000

        
! ALL PROCESSORS SHOULD NOW RECEIVE

        CALL IRCVGPF(CLIMRAER(1,NPAER_1,JCL),ZFLD,1)

      ENDDO READ
    ENDDO FIRST
  ENDIF

ENDIF READIF


!*
!     3. TIME INTERPOLATION AND WRITING OF CLIMATE FIELDS
!     ---------------------------------------------------

IF (LMCCIEC) THEN


! climatologies given for 2002 and 2003 only (no leap years) day 28
! is then duplicated to create day 29 atificially in climatologies

  if(mod(IAN,4_JPIM) == 0_JPIM .AND. (IMOIS == 2_JPIM .OR. IMT1 == 2_JPIM)) then
    IAT1=IAN
    IAT2=IAN
  else
    IAN=MAX(2002,IAN)
    IAN=MIN(2003,IAN)
  endif

! 2002 climatology is used for all years before 2002
! we have to be careful for december month

  IDT=IHOUR+IJOUR*100+IMOIS*10000+IAN*1000000
  IDT1=IHT1+IJT1*100+IMT1*10000+IAT1*1000000
  IDT2=IHT2+IJT2*100+IMT2*10000+IAT2*1000000  

  IF((IDT > IDT2 .AND. IMOIS == 12) .OR. (IDT1 > IDT2 .AND. IMT1 == 12)) THEN
    IAT2=IAT2+1
  ENDIF


  call hourdiff(IAT2,IMT2,IJT2,IHT2,IAN,IMOIS,IJOUR,IHOUR,IDIF,iret)
  call hourdiff(IAT2,IMT2,IJT2,IHT2,IAT1,IMT1,IJT1,IHT1,IDIFD,iret)

  IDIF=IDIF*60_JPIM+(IMNT2-IMIN)

  IDIFD=IDIFD*60_JPIM+(IMNT2-IMNT1)

  ZPOID1=REAL(IDIF,JPRB)/REAL(IDIFD,JPRB)
  ZPOID2=1.0_JPRB-ZPOID1

ENDIF


DO JSTGLO=1,NGPTOT,NPROMA
  IEND=MIN(NPROMA,NGPTOT-JSTGLO+1)
  IST=1
  IBL=(JSTGLO-1)/NPROMA+1

! Natural biosphere CO2 flux 
! this program reads only one field 

  JCL=1

  DO JROF =1,IEND
    IF (LMCCIEC) THEN
      IF(CLIMRAER(JSTGLO+JROF-1,NPAER_1,JCL) < -9998_JPRB .OR. CLIMRAER(JSTGLO+JROF-1,NPAER_2,JCL) < -9998_JPRB) THEN
        ZCO2=-9999._JPRB
      ELSE
        ZCO2=CLIMRAER(JSTGLO+JROF-1,NPAER_1,JCL)*ZPOID1 &
       & +CLIMRAER(JSTGLO+JROF-1,NPAER_2,JCL)*ZPOID2  
      ENDIF
    ENDIF
    SD_VF(JROF,YSD_VF%YCO2B%MP,IBL)    =ZCO2
  ENDDO

ENDDO

!LLFIRST=.FALSE.
LLFIRST=.TRUE.

IRET=0
IF( MYPROC == 1 .AND. LLOPEN) THEN
  CALL PBCLOSE(IUNITCO2,IRET)
  IF( IRET /= 0 )THEN
      CALL ABOR1(' UPDCLIE_CO2: ERROR ON PBCLOSE')
  ENDIF
ENDIF


CALL FLUSH(NULOUT)

IF (LHOOK) CALL DR_HOOK('UPDCLIE_AER',1,ZHOOK_HANDLE)
END SUBROUTINE UPDCLIE_AER
