OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
frs.f
Go to the documentation of this file.
1  subroutine frs(xx,xr,xi,rfsea)
2 c
3 c compute the reflectivity of a flat ocean
4 c
5 c**********************************************************************
6 c
7  implicit real*8 (a-h,o-z)
8  xzx=-1.0d-8
9  cost=dcos(xx*3.1415926d0/180.d0)
10 c calculate the elements of fresnel matrix
11  sinsq = (1.0d0-cost**2)
12  sinsq2 = sinsq**2
13  a = (xr**2-xi**2 -1.0d0 + cost**2)
14  b = (-2.0d0 * xr * xi)
15  r = dsqrt(a**2 + b**2)
16  tmr = cost**2*r
17  xp = dsqrt(2.0d0*r + 2.0d0*a)
18  xmm = (2.0d0*r - 2.0d0*a)
19  if(xmm .lt. 0.0d0 .and. xmm .gt. xzx) xmm=-xmm
20  xm=dsqrt(xmm)
21  dnmr1 = (sinsq2 + tmr + cost*sinsq*xp)
22  qrmu = (sinsq2 - tmr)/dnmr1
23  qimu = (cost*sinsq*xm)/dnmr1
24  dnmr2 = (cost**2 + r + cost*xp)
25  rrr = (cost**2 - r)/dnmr2
26  rri = (cost*xm)/dnmr2
27  rer = qrmu*rrr - qimu*rri
28  rei = qimu*rrr + qrmu*rri
29  r11 = rer**2 + rei**2
30  r22 = rrr**2 + rri**2
31  r33 = rer*rrr + rei*rri
32  r34 = rri*rer - rei*rrr
33  rfsea=0.5d0*(r11+r22)
34  return
35  end
36 c**********************************************************************
subroutine frs(xx, xr, xi, rfsea)
Definition: frs.f:2