updated top-level README and version_decl for V4.5 (#1847)
[WRF.git] / var / da / da_ssmi / spemiss.inc
blob62bcaef7ba237f66cbdc81c807bde284a8c47fdd
1       subroutine spemiss(f,tk,theta,ssw,ev,eh)
2 !     returns the specular emissivity of sea water for given freq. (GHz), 
3 !     temperature T (K), incidence angle theta (degrees), salinity (permil)
4 !     
5 !     Returned values verified against data in Klein and Swift (1977) and
6 !     against Table 3.8 in Olson (1987, Ph.D. Thesis)
8       real,intent(in   ) :: f,tk,theta
9       real,intent(out  ) :: ev,eh
10       real   epsr,epsi,ssw
12       real   tc,costh,sinth,rthet,tmp1r,tmp1i
13       complex   etav,etah,eps,cterm1v,cterm1h,cterm2,cterm3v,cterm3h
16       tc = tk - t_kelvin
17       call epsalt(f,tc,ssw,epsr,epsi)
18       eps = cmplx(epsr,epsi)
19       etav = eps
20       etah = (1.0,0.0)
21       rthet = theta*0.017453292
22       costh = cos(rthet)
23       sinth = sin(rthet)
24       sinth = sinth*sinth
25       cterm1v = etav*costh
26       cterm1h = etah*costh
27       eps = eps - sinth
28       cterm2 = csqrt(eps)
29       cterm3v = (cterm1v - cterm2)/(cterm1v + cterm2)
30       cterm3h = (cterm1h - cterm2)/(cterm1h + cterm2)
31       tmp1r   =  real(cterm3v)
32       tmp1i   = -aimag(cterm3v)
33 !     ev = 1.0 - cabs(cterm3v)**2
34       ev =  1.0 - (tmp1r*tmp1r+tmp1i*tmp1i)
36       eh = 1.0 - cabs(cterm3h)**2
38       end subroutine spemiss