OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
phase.f
Go to the documentation of this file.
1  subroutine phase
2 c***********************************************************************
3 c subroutine phase computes the phase matirx for first scatter in
4 c the half layer and subsequent scatter in the full layer
5 c and stores it in the buffer ppin
6 c***********************************************************************
7 c.....include the common blocks
8  implicit real*8 (a-h,o-z)
9  include 'afrt_rt2.cmn'
10 c***********************************************************************
11 c compute gamma for molecular depolarization correction
12  if(ipol.eq.1)then
13  gamma=rho/(2.0-rho)
14  agm=(1.0-gamma)/(1+2.0*gamma)
15  bgm=gamma/(1.0+2.0*gamma)
16  cgm=(1.0-3.0*gamma)/(1.0+2.0*gamma)
17  endif
18 c
19 c write(6,121)ipol,rho,gamma,agm,bgm,cgm
20 121 format('ipol,rho,gamma,agm,bgm,cgm',i2,1x,1p5e11.3)
21  lrec=1
22  ltrec=lrec*jpart*32*nmum1
23 c compute phase matrices for first scatter
24  kk=kkx
25  do 821 ii=1,nmum1
26  call matrx1
27  do i=1,jpart
28  do k=1,32
29  pc(k,i,ii)=p(k,i)
30  enddo
31  enddo
32  821 continue
33 c compute phase matrices for second scatter
34  do 880 i=1,(nx-1)
35  880 qsp(i)=0.
36  do 825 ii=1,nmum1
37  do 830 kk=1,nmum1
38 c call matrx2
39  call matrx1
40  do i=1,jpart
41  do k=1,32
42  ppin(k,i,ii,kk)=p(k,i)
43  enddo
44  enddo
45  830 continue
46  if(ifc.eq.0)go to 973
47  call compc
48  973 continue
49 c write(6,440)ltrec,ii
50 440 format('ltrec,ii',2i8)
51  825 continue
52 c write(6,135)ifc,nmum1,(nx-1)
53 135 format('phase..ifc,nmum1,(nx-1)=',3i5)
54  if(ifc.eq.0)go to 974
55 c write(6,882)
56 882 format(t3,'i',t17,'qsp',t29,'c')
57  do 881 i=1,na(nx-1)
58  c(i)=1.d0/qsp(i)
59  c(2*nx-1-i)=c(i)
60  881 continue
61  do i=1,(nx-1)
62 c write(6,883)i,qsp(i),c(i)
63 883 format(i5,1p2e12.4)
64  enddo
65  974 continue
66  return
67  end
68 c**********************************************************************
subroutine compc
Definition: compc.f:2
subroutine phase
Definition: phase.f:2
subroutine matrx1
Definition: matrx1.f:2