      SUBROUTINE SEAEMS(WIND,LCLZEN,TSURF,SALINITY,FREQ,EMISS)
      IMPLICIT NONE
C
C**********************************************************************
C
C   NAME- SEAEMS
C
C   LANGUAGE- VS FORTRAN  TYPE- SUBROUTINE      COMPUTER- CRAY J916
C
C   VERSION- 1.0    DATE- 07/01/02   PROGRAMMER- A. ALLEGRINO (RAYTHEON)
C
C   FUNCTION-** THIS SUBROUTINE COMPUTES THE EMISSIVITIES FOR CHANNELS
C               1 AND 2 OF AMSU-A OVER OPEN OCEAN.  THE PARAMETER
C               WIND, WILL ALWAYS BE SET TO 5 SINCE ATOVS DOES
C               NOT PRODUCE WIND SPEEDS. (WR#197)
C
C   CALLING SEQUENCE PARAMETERS-
C     VARIABLE          TYPE I/O  FUNCTION
C     --------          ---- ---  --------
C     WIND              REAL   I  WIND SPEED (ALWAYS SET TO ZERO)   
C     LCLZEN            REAL   I  LOCAL ZENITH ANGLE                 
C     TSURF             REAL   I  SURFACE TEMPERATURE (SST OVER OCEAN,
C                                  EST HIRS CH 8 SURFACE TEMPERATURE OVER
C                                 LAND)
C     SALINITY          REAL   I  SEA WATER SALINITY (A CONSTANT)
C     FREQ              REAL   I  CHANNEL FREQUENCY (IN GHZ)
C     EMISS             REAL   O  COMPUTED EMISSIVITY
C     
C
C   COMMON AREA PARAMETERS- NONE
C
C   LOCAL PARAMETERS-
C     VARIABLE          TYPE  DESCRIPTION
C     --------          ----  -------------------------------------
C     EMISS             REAL  CALCULATED SURFACE EMISSIVITY
C      RH               REAL  SURFACE REFLECTANCE IN HORIZONTALLY POLARIZED
C                             STATE
C      RV               REAL  SURFACE REFLECTANCE IN VERTICALLY POLARIZED
C                             STATE
C      EH               REAL  SURFACE EMITTANCE IN HORIZONTALLY POLARIZED
C                             STATE TAKING INTO ACCOUNT SURFACE ROUGHNESS
C      EV               REAL  SURFACE EMITTANCE IN VERTICALLY POLARIZED
C                             STATE TAKING INTO ACCOUNT SURFACE ROUGHNESS
C     FOAM              REAL  FOAM FRACTION
C     G,TR              REAL  EMPIRICAL FUNCTIONS FOR WIND INDUCED CHANGES
C                             IN THE REFLECTION COEFFICIENT
C     FREQINHZ          REAL  FREQUENCY IN HERTZS
C     TSURFINC          REAL  SURFACE TEMPERATURE IN DEGREES CELCIUS
C     RFOAM             REAL  REFLECTIVITY BASED ON THE FOAM FRACTION
C     RCLEAR            REAL  REFLECTIVITY BASED ON CALM CONDITIONS
C      MU              CMPLX  TEMPORARY VARIABLE (NO PHYSICAL MEANING)
C     DIELCNST         CMPLX  DIELECTRIC PROPERTIES OF SALINE WATER 
C      AID1            CMPLX  TEMPORARY VARIABLE (NO PHYSICAL MEANING)
C      AID2            CMPLX  TEMPORARY VARIABLE (NO PHYSICAL MEANING)
C      AID3            CMPLX  TEMPORARY VARIABLE (NO PHYSICAL MEANING)
C      CANG            CMPLX  COMPLEX VERSION OF THE LOCAL ZENITH ANGLE
C
C
C********************************************************************
C
C
      REAL WIND, TSURF, SALINITY, FREQ, EMISS(2),LCLZEN
      COMPLEX MU, DIELCNST, AID1,AID2,AID3,CANG
 
      REAL PI,RH,RV,FOAM,RFOAM,G,RCLEAR,EH,EV,TR
      REAL TSURFINC,FREQINHZ
      MU = CMPLX(1.0,0.0)
C
C  COMPUTE THE COMPLEX DIELECTRIC PROPERTIES OF WATER
C  FIRST GET FREQUENCY IN HERTZ UNITS AND TEMPERATURE IN CELCIUS
C
      FREQINHZ = FREQ * 1.0E9
c     TSURFINC = TSURF - 273.15
      TSURFINC = TSURF - 273.16
      CALL H2ODIEL(TSURFINC,SALINITY,FREQINHZ,DIELCNST)


      PI = 4.0*ATAN(1.0)
      CANG = CMPLX(LCLZEN,0.0)
      AID1 = CSQRT(MU*DIELCNST - CSIN(CANG)**2)
      AID2 = MU*CCOS(CANG) - AID1
      AID3 = MU*CCOS(CANG) + AID1
      RH = (CABS(AID2/AID3))**2
      AID2 = DIELCNST*CCOS(CANG) - AID1
      AID3 = DIELCNST*CCOS(CANG) + AID1
      RV = (CABS(AID2/AID3))**2
    
C
C  COMPUTE INFLUENCE OF WIND AND FOAM
C
      IF(WIND .LT. 7.0) THEN
        FOAM = 0.0
      ELSE
        FOAM = 0.006*(1.0-EXP(-FREQINHZ*1.0E-9/7.5))*(WIND-7.0)
      ENDIF

      IF(FOAM .LT. 0) FOAM = 0.0
      IF(FOAM .GT. 1) FOAM = 1.0
C
C  EMPERICAL FUNCTIONS FOR WIND INDUCED REFLECTION CHANGES FOR HORIZONTAL
C  POLARIZATION 
C
      G = 1.0 - 1.748E-3*LCLZEN - 7.336E-5*LCLZEN**2 +
     >    1.044E-7*LCLZEN**3
      TR = WIND*(1.15E-1 + 3.8E-5*LCLZEN**2)* SQRT(FREQINHZ*1.0E-9)
      RFOAM = 1.0 - (208.0 + 1.29E-9*FREQINHZ)/TSURF*G
      RCLEAR = RH - TR/TSURF
      EH = 1.0 - (1.0-FOAM) * RCLEAR - (FOAM*RFOAM)
     
C
C  EMPERICAL FUNCTIONS FOR WIND INDUCED REFLECTION CHANGES FOR VERTICAL
C  POLARIZATION 
C
      G = 1.0 - 9.946E-4*LCLZEN + 3.218E-5*LCLZEN**2 -
     >    1.187E-6*LCLZEN**3 + 7E-20*LCLZEN**10
      TR = WIND*(1.17E-1 - 2.09E-3*EXP(7.32E-2*LCLZEN)) *
     >     SQRT(FREQINHZ*1.0E-9)
      RFOAM = 1.0 - (208.0 + 1.29E-9*FREQINHZ)/TSURF*G
      RCLEAR = RV - TR/TSURF
      EV = 1.0 - (1.0-FOAM) * RCLEAR - (FOAM*RFOAM)

      IF(EH .GT. 1.0) EH=1.0
      IF(EH .LT. 0.0) EH=0.0
      IF(EV .GT. 1.0) EV=1.0
      IF(EV .LT. 0.0) EV=0.0

      EMISS(1) = EH
      EMISS(2) = EV
    
      RETURN
      END

C**********************************************************************
    
      SUBROUTINE H2ODIEL(TSURF,SALINITY,FREQINHZ,DIELCNST)
      IMPLICIT NONE
     
C   FUNCTION -  CALCUALTE THE DIELECTRIC CONSTANT OF SALINE WATER 
C
C   
C   CALLING SEQUENCE PARAMETERS-
C     VARIABLE          TYPE I/O  FUNCTION
C     --------          ---- ---  --------
C      TSURF            REAL  I   SURFACE TEMPERATURE IN DEGREES CELSIUS
C      SALINITY         REAL  I   SALINITY OF OCEAN IN PARTS PER THOUSAND
C      FREQINHZ         REAL  I   CHANNEL FREQUENCY IN HERTZ
C      DIELCNST         REAL  O   DIELELECTRIC CONSTANT OF SALINE WATER
C
C
C   COMMON AREA PARAMETERS-  NONE
C
C  NOTE: NEED TO LOOK UP THE VARIABLES BELOW FOR MEANING (ASA)
C
C   LOCAL PARAMETERS-
C     VARIABLE          TYPE  DESCRIPTION
C     --------          ----  -------------------------------------
C      ESW              CMPLX  DIELECTRIC CONSTANT FOR SALINE WATER
C      A
C      ESWO
C      TSWO
C      B
C      EO
C      PI               REAL  THE NUMBER PI
C      TSW
C      SSW
C      D
C      FI
C      EPSPP
C      EPSP
C
C------------------------------------------------------------------------
C
      COMPLEX DIELCNST
      REAL ESWI,ESW,A,ESWO,TSWO,TSW,EPSP,EO,PI,SSWO,D
      REAL FI,EPSPP,SALINITY,TSURF,FREQINHZ,B,SSW

      ESWI = 4.9

      ESWO = 87.134 - 1.949E-1*TSURF - 1.276E-2*TSURF**2 + 
     >2.491E-4*TSURF**3
      A = 1.0 + 1.613E-5*TSURF*SALINITY - 3.656E-3*SALINITY +
     > 3.210E-5*SALINITY**2 - 4.232E-7*SALINITY**3
      ESW = ESWO*A

      TSWO = 1.1109E-10 - 3.824E-12*TSURF + 6.938E-14*TSURF**2 - 
     >5.096E-16*TSURF**3
      B = 1.0 + 2.282E-5*TSURF*SALINITY - 7.638E-4*SALINITY -
     > 7.760E-6*SALINITY**2 + 1.105E-8*SALINITY**3
      TSW = TSWO*B

      EPSP = ESWI +(ESW-ESWI)/(1.0+(FREQINHZ*TSW)**2)

      EO = 8.854E-12
      PI = 4.0 * ATAN(1.0)
      ESWO = 87.134 - 1.949E-1*TSURF - 1.276E-2*TSURF**2 + 
     > 2.491E-4*TSURF**3
      A = 1.0 + 1.613E-5*TSURF*SALINITY - 3.656E-3*SALINITY + 
     >3.210E-5*SALINITY**2 - 4.232E-7*SALINITY**3
      ESW = ESWO*A
      TSWO = 1.1109E-10 - 3.824E-12*TSURF + 6.938E-14*TSURF**2 - 
     >5.096E-16*TSURF**3
      B = 1.0 + 2.282E-5*TSURF*SALINITY - 7.638E-4*SALINITY - 
     >7.760E-6*SALINITY**2 + 1.105E-8*SALINITY**3
      TSW = TSWO*B
      SSWO = SALINITY*(0.18252 - 1.4619E-3*SALINITY +
     > 2.093E-5*SALINITY**2 - 1.282E-7*SALINITY**3)
      D = 25.0 - TSURF
      FI = D*(2.033E-2 + 1.266E-4*D + 2.464E-6*D**2 -    
     >      SALINITY*(1.849E-5-2.551E-7*D+2.551E-8*D*D))
      SSW = SSWO*EXP(-FI)
      EPSPP = TSW*FREQINHZ*(ESW-ESWI)/(1.0+(TSW*FREQINHZ)**2)
      EPSPP = EPSPP + SSW/(2.0*PI*EO*FREQINHZ)
    
      DIELCNST = CMPLX(EPSP, -EPSPP)

      RETURN
      END

