    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   
!>              PHYS2
!>              UPDT
!>
!> DRIVER     : EBU
!>
!> CALLS      : GETDATE
!>--------------------------------------------------------------------------------------------------							   
    USE CTLBLK
    USE F77KINDS
    USE LOOPS
    USE MASKS
    USE PARMETA
    USE PARM_TBL   
    USE PHYS2
    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   , NMESSST 
!
    REAL   (KIND=R4KIND)                                                                        ::&
    & YDAY    , ADD     , FA      , FB
!					   
    INTEGER(KIND=I4KIND), DIMENSION(12)                                                         ::&
    & MONL
!   
    IYR     = IDAT(3)
    IMO     = IDAT(1)
    IDY     = IDAT(2)
!---------------------------------------------------------------------------------------
! UTILIZANDO UM PASSO DE TEMPO PARA A RODADA DEFINIDO PELO DEF_ETA.SCR, CHOU DT EH 90SEG
!---------------------------------------------------------------------------------------
    IUTC    = NTSD * DT / 3600     
!------------------------------------------------------
! CALCULO DO NUMERO DE PASSO DE TEMPO EM 1 MES (30DIAS)
!------------------------------------------------------
    NMESSST = 30 * (86400 / DT)      
!      
    CALL GETDATE(IYR, IMO, IDY, IUTC, YR, MON, DAY, UTC)
!       
    DATA MONL /30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30/
!   
!    IF (MOD(YR,4) .EQ. 0) MONL(2) = 29 						   
!			   
    YDAY = DAY   
    MA   = MON - 1
!							   
    IF ((YDAY >= (1.0 + FLOAT(MONL(MON)) / 2.0)) .OR. ((NTSD == 1) .AND. (YDAY > 15))) 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
!--------------------------------------------------------------------
! MUDANDO O MES DA LEITURA DA SST NO DIA 16 DE CADA MES PARA UM DT=90      
!--------------------------------------------------------------------	
        NTSD1 = (NTSD + (NMESSST / 2))
        IMES  = INT(NTSD1 / NMESSST) + INITSST
        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
!
    IF ((NTSD == 1) .AND. (INT(YDAY) == 15)) THEN   
        SST = SSTM(:,:,IMES)
    ELSE
        SST = FA * SSTM(:,:,IMES) + FB * SSTM(:,:,IMES2)
    END IF
!										   
    RETURN
!   
    END SUBROUTINE SSTSTP
