C  CALL SUBROUTINE FST2SAC1 TO GET SAC-SMA MOISTURE STATES 
C
      SUBROUTINE FRZ2SAC1(PX,ZSOIL,SMC,SH2O,NUPL,NSAC,SWLT,RTUZ,RTLZ,
     +           FRZST,SACST,FROST, HRAPX,HRAPY)
      
      PARAMETER (FRST_FACT = 5.0)
      REAL ZSOIL(*),SMC(*),SH2O(*),FRZST(*),SACST(*)
      REAL LZTWC,LZFSC,LZFPC,LZTWH,LZFSH,LZFPH


C--      COMMON/FSMCO1/UZTWC,UZFWC,LZTWC,LZFSC,LZFPC,ADIMC,FGCO(6),RSUM(7),
C--     1           PPE,PSC,PTA,PWE,PSH,TSOIL(8)
C--      COMMON/FRZCNST/ FRST_FACT,ZBOT      
           
C  GET UPPER ZONE STATES
      UZTWH=FRZST(6)
      UZFWH=FRZST(7)
      UZTWC=SACST(1)
      UZFWC=SACST(2)
      XH=0.
      XC=0.

c      WRITE( *, *) 'UZFWH = ', UZFWH, ' UZFWC = ', UZFWC, ' UZTWH = ', 
c     + UZTWH
      CALL FST2SAC1(ZSOIL,SMC,SH2O,2,NUPL,SWLT,RTUZ,UZTWH,UZFWH,XH,
     +              UZTWC,UZFWC,XC,FROST1,PX, HRAPX,HRAPY)

      IF(FROST1 .EQ. 0.) THEN
       FROST=0.
      ELSE
       FROST=-FROST1/FRST_FACT
      ENDIF 
      FRZST(6)=UZTWH
      FRZST(7)=UZFWH

C  GET LOWER ZONE STATES
      LZTWH=FRZST(8)
      LZFSH=FRZST(9)
      LZFPH=FRZST(10)
      LZTWC=SACST(3)
      LZFSC=SACST(4)
      LZFPC=SACST(5)
      NUP=NUPL+1

      CALL FST2SAC1(ZSOIL,SMC,SH2O,NUP,NSAC,SWLT,RTLZ,LZTWH,LZFSH,
     +              LZFPH,LZTWC,LZFSC,LZFPC,FROST2,0., HRAPX,HRAPY)
      
      IF(FROST2 .NE. 0.) FROST=FROST-FROST2/FRST_FACT
      FRZST(8)=LZTWH
      FRZST(9)=LZFSH
      FRZST(10)=LZFPH
      
      RETURN
      END
            
