    SUBROUTINE SSTSTP(SSTUPSTEP) 
!>--------------------------------------------------------------------------------------------------
!> SUBROUTINE SSTSTP
!>
!> SUBPROGRAM: SSTSTP - ?????
!> PROGRAMMER: ?????   
!> ORG:????? 
!> DATE: ??-??-??
!>
!> ABSTRACT:
!> ?????
!>
!> PROGRAM HISTORY LOG:
!> 93-10-28  ?????      - ORIGINATOR
!> 18-01-15  LUCCI      - MODERNIZATION OF THE CODE, INCLUDING:
!>                        * F77 TO F90/F95
!>                        * INDENTATION & UNIFORMIZATION CODE
!>                        * REPLACEMENT OF COMMONS BLOCK FOR MODULES
!>                        * DOCUMENTATION WITH DOXYGEN
!>                        * OPENMP FUNCTIONALITY
!>
!> INPUT ARGUMENT LIST:
!> SSTUPSTEP - 
!>
!> OUTPUT ARGUMENT LIST:
!> NONE
!>
!> INPUT/OUTPUT ARGUMENT LIST:
!> NONE
!>
!> USE MODULES: CTLBLK
!>              F77KINDS
!>              LOOPS
!>              MASKS
!>              PARMETA
!>              PARM_TBL   
!>              PHYS
!>              UPDT
!>
!> DRIVER     : EBU
!>
!> CALLS      : GETDATE
!>--------------------------------------------------------------------------------------------------
    USE CTLBLK
    USE F77KINDS
    USE LOOPS
    USE MASKS
    USE MPPCOM
    USE PARMETA
    USE PARM_TBL   
    USE PHYS
    USE UPDT
!							   
    INTEGER(KIND=I4KIND), PARAMETER :: LA = 13   
    INTEGER(KIND=I4KIND), PARAMETER :: IMJM = IM * JM - JM / 2
    INTEGER(KIND=I4KIND), PARAMETER :: LTOP = 1
    INTEGER(KIND=I4KIND), PARAMETER :: LBOT = LM
    INTEGER(KIND=I4KIND), PARAMETER :: LSCRCH = 4 * LM + 1 + LA +1
    INTEGER(KIND=I4KIND), PARAMETER :: L1 = LA +     LM + 1
    INTEGER(KIND=I4KIND), PARAMETER :: L2 = LA + 2 * LM + 1
    INTEGER(KIND=I4KIND), PARAMETER :: L3 = LA + 3 * LM + 1
    INTEGER(KIND=I4KIND), PARAMETER :: L4 = LA + 4 * LM + 1   
!
    INTEGER(KIND=I4KIND)                                                  , INTENT(IN)          ::&
    & SSTUPSTEP  
!
    INTEGER(KIND=I4KIND)                                                                        ::&
    & MA      , MB      , IMES    , IMES2   , QTMON   , DAYTWOMON         , NMESSST , NANOSST 
!
    REAL   (KIND=R4KIND)                                                                        ::&
    & YDAY    , ADD     , FA      , FB
!					   
    INTEGER(KIND=I4KIND), DIMENSION(12)                                                         ::&
    & MONL
!       					   
    IYR  = IDAT(3)
    IMO  = IDAT(1)
    IDY  = IDAT(2)
!-----------------
! CHOU DT EH 90SEG
!-----------------
    IUTC = NTSD * DT / 3600     
!    
    CALL GETDATE(IYR, IMO, IDY, IUTC, YR, MON, DAY, UTC)
!       
    DATA MONL /31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31/   
!       
    ANL = 365
!       
    IF (MOD(YR,4) == 0) THEN 
        MONL(2) = 29 
        ANL     = 366
    END IF
!------------------------------------       
! NUMERO DE PASSOS DE TEMPO DE UM MES
!------------------------------------
    NMESSST = MONL(MON) * (86400 / DT)  
!------------------------------------
! NUMERO DE PASSOS DE TEMPO EM UM ANO
!------------------------------------
    NANOSST = ANL * (86400 / DT)        							   
!	   
    YDAY = DAY   
    MA   = MON - 1
!
    IF (MA < 1) MA = 12
!
    IF ((YDAY >= (1.0 + FLOAT(MONL(MON)) / 2.0))) MA = MON  
!
    MB = MA + 1 
!       
    IF (MA <  1) MA = 12   
    IF (MB > 12) MB =  1
!       
    IF (NTSD == 1) THEN    
        IMES  = INITSST
        IMES2 = IMES + 1
    ELSE
        QTMON     = ((YR - IYR) * 12 + MON) - 1
        IMES      = QTMON + INITSST
        DAYTWOMON = (MONL(MB) / 2) + 1
!
       IF (MA == MON) IMES = IMES + 1
       IMES2 = IMES + 1  
!
    END IF  
!
    ADD = FLOAT(MONL(MA)) / 2.0 - 1.0
!
    IF (MA == MON) ADD = -ADD - 2.0   
!
    FB = 2.0 * (YDAY + ADD) / FLOAT(MONL(MA) + MONL(MB))   
    FA = 1.0 - FB
!
    print*,"IMES_IMES2", NTSD,MYPE,DAY,IMES,IMES2
    SST = FA * SSTM(:,:,IMES) + FB * SSTM(:,:,IMES2)
!									   
    RETURN  
! 
    END SUBROUTINE SSTSTP
