    SUBROUTINE READ_RESTRT
!>--------------------------------------------------------------------------------------------------
!> SUBROUTINE READ_RESTRT
!>
!> SUBPROGRAM: READ_RESTRT - 
!>
!> DRIVER     : INIT
!>              INITS
!>
!>--------------------------------------------------------------------------------------------------
      USE ACMCLD
      USE ACMCLH
      USE ACMPRE
      USE ACMRDL
      USE ACMRDS
      USE ACMSFC
      USE CLDWTR
      USE CNVCLD
      USE CO2DTA     !RESTART
      USE CONTIN
      USE CTLBLK
      USE C_FRACN    !RESTART 
      USE DGNSOUT
      USE DYNAM      !RESTART
      USE KFFDBK     !RESTART
      USE KFLUT      !RESTART
      USE LOOPS
      USE MASKS
      USE MPPSTAFF
      USE NHYDRO
      USE PARMETA
      USE PHYS
      USE PPTASM
      USE PVRBLS
      USE SEASO3     !RESTART
      USE SOIL
      USE TEND       !RESTART
      USE VRBLS
!
    IMPLICIT NONE
!
    CHARACTER(LEN=4)                                                                            ::&
    & C_NHRS
!   
    CHARACTER(LEN=150)                                                                          ::&
    & RESTRTFILE  , RESTRTFILE2, RESTRTFILE3, RESTRTFILE4, RESTRTFILE5, RESTRTFILE6,              &
    & RESTRTFILE7 , RESTRTFILE8
!   
    WRITE(C_NHRS,'(I4.4)') NHRS
!
    RESTRTFILE = "GEFfcst_"//C_MYPE//"."//C_NHRS
!
    OPEN (UNIT=LISTOUT, FILE= TRIM(RESTRTFILE), FORM = 'UNFORMATTED')
!
!    READ(LISTOUT) NTSD
    READ(LISTOUT) PD
    READ(LISTOUT) T
    READ(LISTOUT) U
    READ(LISTOUT) V
    READ(LISTOUT) Q
    READ(LISTOUT) CWM
    READ(LISTOUT) THS
    READ(LISTOUT) U00
    READ(LISTOUT) UL
!    READ(LISTOUT) W      
!    READ(LISTOUT) DWDT    !NON-HYDROSTATIC
!    READ(LISTOUT) Z
!
    CLOSE (LISTOUT)
!
    RESTRTFILE2 = "GEFfcstVEG_"//C_MYPE//"."//C_NHRS
!
    OPEN (UNIT=LISTOUT, FILE= TRIM(RESTRTFILE2), FORM = 'UNFORMATTED')
!       
    READ(LISTOUT) TSHLTR
    READ(LISTOUT) QSHLTR
    READ(LISTOUT) PLM
    READ(LISTOUT) SFCLHX
    READ(LISTOUT) SFCSHX
    READ(LISTOUT) QWBS
    READ(LISTOUT) TWBS 
    READ(LISTOUT) GRNFLX
    READ(LISTOUT) VEGFRC
    READ(LISTOUT) IVGTYP
    READ(LISTOUT) ISLTYP
    READ(LISTOUT) GLAT
    READ(LISTOUT) GLON
    READ(LISTOUT) SM   
    READ(LISTOUT) HTM 
    READ(LISTOUT) VTM 
    READ(LISTOUT) SICE
    READ(LISTOUT) Z0
    READ(LISTOUT) OMGALF
    READ(LISTOUT) ALBEDO
    READ(LISTOUT) ALBASE
    READ(LISTOUT) MXSNAL
    READ(LISTOUT) CZEN
    READ(LISTOUT) CZMEAN
    READ(LISTOUT) FIS
    READ(LISTOUT) Q10    
    READ(LISTOUT) TH10    
    READ(LISTOUT) QZ0    
    READ(LISTOUT) THZ0   
    READ(LISTOUT) U10
    READ(LISTOUT) V10
    READ(LISTOUT) UZ0
    READ(LISTOUT) VZ0
    READ(LISTOUT) USTAR
    READ(LISTOUT) THS
    READ(LISTOUT) Q2    
    READ(LISTOUT) TCUCN    
    READ(LISTOUT) TRAIN    
    READ(LISTOUT) DIV  
    READ(LISTOUT) RTOP
! 
    CLOSE (LISTOUT)
!
    RESTRTFILE3 = "GEF_sw_rdtn"//C_MYPE//"."//C_NHRS
!
    OPEN (UNIT=LISTOUT, FILE= TRIM(RESTRTFILE3), FORM = 'UNFORMATTED')
!
    READ(LISTOUT) RSWIN
    READ(LISTOUT) RSWOUT
    READ(LISTOUT) RSWTOA
    READ(LISTOUT) ASWIN
    READ(LISTOUT) ASWOUT
    READ(LISTOUT) ASWTOA
    READ(LISTOUT) RSWNET
    READ(LISTOUT) RSWTT
!
    CLOSE (LISTOUT)
!
    RESTRTFILE4 = "GEF_lw_rdtn"//C_MYPE//"."//C_NHRS
!
    OPEN (UNIT=LISTOUT, FILE= TRIM(RESTRTFILE4), FORM = 'UNFORMATTED')
!
    READ(LISTOUT) RLWIN
    READ(LISTOUT) RLWOUT
    READ(LISTOUT) RLWTOA
    READ(LISTOUT) ALWIN
    READ(LISTOUT) ALWOUT
    READ(LISTOUT) ALWTOA 
    READ(LISTOUT) RLWNET
    READ(LISTOUT) RLWTT
    READ(LISTOUT) EPSR
    READ(LISTOUT) RADOT   
    READ(LISTOUT) SIGT4 
!    
    CLOSE (LISTOUT)
!
    RESTRTFILE5 = "GEF_clouds"//C_MYPE//"."//C_NHRS
!
    OPEN (UNIT=LISTOUT, FILE= TRIM(RESTRTFILE5), FORM = 'UNFORMATTED')
!
    READ(LISTOUT) CUPPT
    READ(LISTOUT) CFRACL
    READ(LISTOUT) CFRACM
    READ(LISTOUT) CFRACH
    READ(LISTOUT) ACFRCV
    READ(LISTOUT) ACFRST
    READ(LISTOUT) F_ICE 
    READ(LISTOUT) F_RAIN 
    READ(LISTOUT) F_RIMEF 
    READ(LISTOUT) CNVTOP
    READ(LISTOUT) CNVBOT
    READ(LISTOUT) HTOP
    READ(LISTOUT) HBOT
!
    CLOSE (LISTOUT)	 
!
    RESTRTFILE6 = "GEF_precandsoil"//C_MYPE//"."//C_NHRS
!
    OPEN (UNIT=LISTOUT, FILE= TRIM(RESTRTFILE6), FORM = 'UNFORMATTED')
!
    READ(LISTOUT) ACPREC
    READ(LISTOUT) CUPREC
    READ(LISTOUT) APREC
    READ(LISTOUT) ACSNOW
    READ(LISTOUT) ACSNOM
    READ(LISTOUT) PREC
    READ(LISTOUT) STC
    READ(LISTOUT) SMC
    READ(LISTOUT) SMSTAV
    READ(LISTOUT) BGROFF
    READ(LISTOUT) SSROFF
    READ(LISTOUT) CMC
    READ(LISTOUT) POTEVP
    READ(LISTOUT) POTFLX
    READ(LISTOUT) SFCEVP
    READ(LISTOUT) SUBSHX
    READ(LISTOUT) SNOPCX
    READ(LISTOUT) SI
    READ(LISTOUT) SNO
    READ(LISTOUT) SMSTOT
    READ(LISTOUT) SOILTB  
    READ(LISTOUT) TG
    READ(LISTOUT) SR 
    READ(LISTOUT) AKHS
    READ(LISTOUT) AKMS
    
    CLOSE (LISTOUT)	 


!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

      RESTRTFILE7 = "GEF_from_modules"//C_MYPE//"."//C_NHRS
      OPEN(UNIT=LISTOUT, FILE= TRIM(RESTRTFILE7), FORM = 'UNFORMATTED')

!soil_comm
         READ(LISTOUT)SFCEXC
         READ(LISTOUT)PCTSNO
	 READ(LISTOUT)ISLOPE
	 READ(LISTOUT)SH2O
	 READ(LISTOUT)SLDPTH
	 READ(LISTOUT)RTDPTH
!acmpre_comm
	 READ(LISTOUT)TPREC
!seaso3_comm ?
	 READ(LISTOUT)XDUO3N
	 READ(LISTOUT)XDO3N2
	 READ(LISTOUT)XDO3N3
	 READ(LISTOUT)XDO3N4
	 READ(LISTOUT)PRGFDL
	 READ(LISTOUT)O3O3
	 READ(LISTOUT)XRAD1
	 READ(LISTOUT)XRAD2
	 READ(LISTOUT)XRAD3
	 READ(LISTOUT)XRAD4
!phys_comm
	 READ(LISTOUT)RADIN
	 READ(LISTOUT)SIGT4
	 READ(LISTOUT)SST    !!!!!!!!!!!
!kflut_comm
	 READ(LISTOUT)TTAB
	 READ(LISTOUT)QSTAB
	 READ(LISTOUT)THE0K
	 READ(LISTOUT)ALU
!kffdbk_comm	 
	 READ(LISTOUT)DTDT
	 READ(LISTOUT)DQDT
	 READ(LISTOUT)DQCDT
	 READ(LISTOUT)W0AVG
	 READ(LISTOUT)PPTKF
	 READ(LISTOUT)TNCA
	 READ(LISTOUT)SUMFB
	 READ(LISTOUT)SPSRC
	 READ(LISTOUT)CIN
!contin_comm	 
	 READ(LISTOUT)PDSL
	 READ(LISTOUT)PSDT
	 READ(LISTOUT)ETADT
!co2dta_comm	 
	 READ(LISTOUT)CO251
	 READ(LISTOUT)CO258
	 READ(LISTOUT)CDT51
	 READ(LISTOUT)CDT58
	 READ(LISTOUT)C2D51
	 READ(LISTOUT)C2D58
	 READ(LISTOUT)CO2M51
	 READ(LISTOUT)CO2M58
	 READ(LISTOUT)CDTM51
	 READ(LISTOUT)CDTM58
	 READ(LISTOUT)C2DM51
	 READ(LISTOUT)C2DM58                !!!!!!!   CO2 (IT WILL BE NECESSARY FOR CLIMATE INTEGRATIONS)
	 READ(LISTOUT)STEMP
	 READ(LISTOUT)GTEMP
	 READ(LISTOUT)CO231
	 READ(LISTOUT)CO238
	 READ(LISTOUT)CDT31
	 READ(LISTOUT)CDT38
	 READ(LISTOUT)C2D31
	 READ(LISTOUT)C2D38
	 READ(LISTOUT)CO271
	 READ(LISTOUT)CO278
	 READ(LISTOUT)CDT71
	 READ(LISTOUT)CDT78
	 READ(LISTOUT)C2D71
	 READ(LISTOUT)C2D78
	 READ(LISTOUT)CO211
	 READ(LISTOUT)CO218
!acmcld_comm
	 READ(LISTOUT)NCFRCV
	 READ(LISTOUT)NCFRST
!!	 write(listOut)tclod        !include in cut-cell version?
!!	 write(listOut)nclod        !
!vrbls_comm
	 READ(LISTOUT)RES    !?
	 READ(LISTOUT)PDOLD   !?
	 READ(LISTOUT)PB     !?
	 READ(LISTOUT)ACDTDT  !?
	 READ(LISTOUT)RDDTDT
!pvrbls_comm
 	 READ(LISTOUT)QS
	 READ(LISTOUT)ACCLIQ
	 READ(LISTOUT)CLDEFI   !BMJ, change init.f90 for restart
!pptasm_comm	 
	 READ(LISTOUT)TLATCU   !BMJ
	 READ(LISTOUT)TLATGS   !BMJ
!cldwtr_comm
	 READ(LISTOUT)LC

!GSM	 CLOSE(LISTOUT)

!
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

!GSM         RESTRTFILE8 = "GEF_from_modules_new"//C_MYPE//"."//C_NHRS
!GSM         OPEN(UNIT=LISTOUT, FILE= TRIM(RESTRTFILE8), FORM = 'UNFORMATTED')

!acmrdl_comm
	 READ(LISTOUT)TRDLW
	 READ(LISTOUT)ARDLW
	 READ(LISTOUT)NRDLW
!acmrds.comm
	 READ(LISTOUT)TRDSW
	 READ(LISTOUT)ARDSW
	 READ(LISTOUT)NRDSW
!acmsfc.comm
	 READ(LISTOUT)TSRFC
	 READ(LISTOUT)ASRFC
	 READ(LISTOUT)APHTIM
	 READ(LISTOUT)NSRFC
!loops.comm
	 READ(LISTOUT)LMH
	 READ(LISTOUT)LMV
!phys_comm
	 READ(LISTOUT)DFRLG
	 READ(LISTOUT)DTQ2
	 READ(LISTOUT)TDTQ2
	 READ(LISTOUT)DTD
	 READ(LISTOUT)TDTD
	 READ(LISTOUT)ROS	 
	 READ(LISTOUT)DS
	 READ(LISTOUT)ROI
	 READ(LISTOUT)CI	 
	 READ(LISTOUT)DI
	 READ(LISTOUT)PL
	 READ(LISTOUT)THL	 
	 READ(LISTOUT)RDQ
	 READ(LISTOUT)RDTH
	 READ(LISTOUT)RDP	 
	 READ(LISTOUT)RDTHE
	 READ(LISTOUT)PLQ
	 READ(LISTOUT)RDPQ	 
	 READ(LISTOUT)RDTHEQ
	 READ(LISTOUT)PLQ
	 READ(LISTOUT)RDPQ	 
	 READ(LISTOUT)QS0	 
	 READ(LISTOUT)SQS
	 READ(LISTOUT)THE0
	 READ(LISTOUT)STHE	 
	 READ(LISTOUT)THE0Q
	 READ(LISTOUT)STHEQ
	 READ(LISTOUT)PTBL	 
	 READ(LISTOUT)TTBL
	 READ(LISTOUT)TTBLQ
	 READ(LISTOUT)SSTM	 
	 READ(LISTOUT)KTM
	 READ(LISTOUT)GFFC
	 READ(LISTOUT)HDAC	 
	 READ(LISTOUT)HDACV
	 READ(LISTOUT)SST1
!kflut_comm
         READ(LISTOUT)RDPR
         READ(LISTOUT)RDTHK
         READ(LISTOUT)PTOP
!kffdbk_comm	 
	 READ(LISTOUT)RAINCV
	 READ(LISTOUT)PPTCA
	 READ(LISTOUT)PSRC
	 READ(LISTOUT)PCLB
	 READ(LISTOUT)UMFB
	 READ(LISTOUT)SPCLB
	 READ(LISTOUT)TST
	 READ(LISTOUT)NCAD
	 READ(LISTOUT)NCA
	 READ(LISTOUT)NCLDCK	 
!co2dta_comm	 
	 READ(LISTOUT)B0
	 READ(LISTOUT)B1
	 READ(LISTOUT)B2
	 READ(LISTOUT)B3
!pvrbls_comm
 	 READ(LISTOUT)HGTSUB
	 READ(LISTOUT)ZEFFIJ
!tend_comm
 	 READ(LISTOUT)T_ADJ
	 READ(LISTOUT)T_OLD
!ctlblk_comm
 	 READ(LISTOUT)IDAT
 	 READ(LISTOUT)RUN	 
 	 READ(LISTOUT)FIRST	 
 	 READ(LISTOUT)RESTRT	 
 	 READ(LISTOUT)SIGMA	 
 	 READ(LISTOUT)SUBPOST	 
 	 READ(LISTOUT)LCORNERM
 	 READ(LISTOUT)IOUT
 	 READ(LISTOUT)IHRST	 
 	 READ(LISTOUT)NFCST	 
 	 READ(LISTOUT)NBC	 
 	 READ(LISTOUT)LIST	 
 	 READ(LISTOUT)NTSD	 
 	 READ(LISTOUT)NTSTM	 
 	 READ(LISTOUT)NDDAMP
 	 READ(LISTOUT)NPREC	 
 	 READ(LISTOUT)IDTAD	 
 	 READ(LISTOUT)NBOCO	 
 	 READ(LISTOUT)NSHDE	 
 	 READ(LISTOUT)NCP	 
 	 READ(LISTOUT)NPHS
 	 READ(LISTOUT)NCNVC
 	 READ(LISTOUT)NRADS	 
 	 READ(LISTOUT)NRADL	 
 	 READ(LISTOUT)NTDDMP	 
 	 READ(LISTOUT)NSTART	 
 	 READ(LISTOUT)OUTSTR	 
 	 READ(LISTOUT)NDASSIM
 	 READ(LISTOUT)NDASSIMM
 	 READ(LISTOUT)INITSS	 
 	 READ(LISTOUT)IDTAD2	 
 	 READ(LISTOUT)NTSD_INIT	 
 	 READ(LISTOUT)DT
!dynam_comm
 	 READ(LISTOUT)FADV
 	 READ(LISTOUT)FADV2	 
 	 READ(LISTOUT)FADT
 	 READ(LISTOUT)R	 
 	 READ(LISTOUT)PT
 	 READ(LISTOUT)F4D	 
 	 READ(LISTOUT)F4Q
 	 READ(LISTOUT)EF4T	 
 	 READ(LISTOUT)FKIN
 	 READ(LISTOUT)FCP	 
 	 READ(LISTOUT)DELTY
 	 READ(LISTOUT)DELTHZ	 
 	 READ(LISTOUT)KAPPA
 	 READ(LISTOUT)P0	 
 	 READ(LISTOUT)TSPH
 	 READ(LISTOUT)RTDF	 
 	 READ(LISTOUT)RTDFDT
 	 READ(LISTOUT)FADTQ	 
 	 READ(LISTOUT)F4D25
 	 READ(LISTOUT)DETA	 
 	 READ(LISTOUT)RDETA
 	 READ(LISTOUT)AETA	 
 	 READ(LISTOUT)DAETA
 	 READ(LISTOUT)F4Q2
 	 READ(LISTOUT)ETA
 	 READ(LISTOUT)DFL	 
 	 READ(LISTOUT)WPDAR
 	 READ(LISTOUT)F11	 
 	 READ(LISTOUT)F12
 	 READ(LISTOUT)F21	 
 	 READ(LISTOUT)F22
 	 READ(LISTOUT)P11	 
 	 READ(LISTOUT)P12
 	 READ(LISTOUT)P21	 
 	 READ(LISTOUT)P22
 	 READ(LISTOUT)FDIV
 	 READ(LISTOUT)FDDMP	 
 	 READ(LISTOUT)HSINP
 	 READ(LISTOUT)HCOSP	 
 	 READ(LISTOUT)FVDIFF
 	 READ(LISTOUT)HBMSK	 
 	 READ(LISTOUT)DX
 	 READ(LISTOUT)DDMP
!nhydro_comm
 	 READ(LISTOUT)DWDT
 	 READ(LISTOUT)PINT	 
 	 READ(LISTOUT)W
 	 READ(LISTOUT)Z
 	 READ(LISTOUT)PDWDT

	 CLOSE(LISTOUT)
!
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++   

!--------------------------------------------------- 
! DONE READING INITIAL CONDITIONS OR A RESTART FILE.
!---------------------------------------------------
!
!------------------------------ 
! END OF SUBROUTINE READ_RESTRT
!------------------------------ 
    IF (MYPE == 0) THEN
        WRITE(*,*) 'INIT:  EXIT READ_RESTRT'
        WRITE(*,*) ' '
    END IF
!
    RETURN
!
    END SUBROUTINE READ_RESTRT



