    SUBROUTINE VEGUPDT
!>--------------------------------------------------------------------------------------------------
!> SUBROUTINE VEGUPDT
!>
!> SUBPROGRAM: VEGUPDT - ?????
!> 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
!>              PARMSOIL
!>              PARM_TBL   
!>              SOIL
!>
!> DRIVER     : EBU
!>
!> CALLS      : GETDATE
!>--------------------------------------------------------------------------------------------------
    USE CTLBLK
    USE F77KINDS
    USE LOOPS
    USE MASKS
    USE PARMETA
    USE PARMSOIL
    USE PARM_TBL
    USE SOIL							   
!							   
    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)                                                                        ::&
    & DAY     , MON     , YR      , UTC     , MA      , MB
!
    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/					   
!			   
    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
!
    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 (MYPE == 0) PRINT*,"VEGFRM", NTSD, MA, MB, FA, FB
!
    IF ((NTSD == 1) .AND. (INT(YDAY) == 15)) THEN					   
        VEGFRC = VEGFRM(:,:,MA)	
    ELSE
        VEGFRC = FA * VEGFRM(:,:,MA) + FB * VEGFRM(:,:,MB)
    END IF
!										   
    RETURN					
!					   
    END SUBROUTINE VEGUPDT
	
