OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
crftout.f
Go to the documentation of this file.
1  subroutine crftout
2 c
3 c write the output data set for the aircraft height
4 c
5 c**********************************************************************
6 c
7 c include the common blocks
8 c
9  implicit real*8 (a-h,o-z)
10  include 'afrt_rt2.cmn'
11 c
12 c**********************************************************************
13 c
14  do m=1,4
15  do j=1,jpart
16  do i=1,(nx-1)
17  mz=nmum1-i+1
18  k=(m-1)*jpart*(nx-1)+(j-1)*(nx-1)+i
19  if(m.eq.1)then
20  bfr2(k)=(fiocrft(1,mz,j)+fiocrft(2,mz,j))
21  bfr3(k)=(fiocrft(1,i,j)+fiocrft(2,i,j))
22  endif
23  if(m.eq.2)then
24  bfr2(k)=(fiocrft(1,mz,j)-fiocrft(2,mz,j))
25  bfr3(k)=(fiocrft(1,i,j)-fiocrft(2,i,j))
26  endif
27  if(m.gt.2)then
28  bfr2(k)=fiocrft(m,mz,j)
29  bfr3(k)=fiocrft(m,i,j)
30  endif
31  enddo
32  enddo
33  enddo
34 c
35  nd=(nx-1)*jpart*4
36 c
37  bfr2(nd+1)=rmuo
38  bfr2(nd+2)=1.0
39  bfr2(nd+3)=amufac
40  bfr2(nd+4)=temp1(nolyr+1)
41  bfr2(nd+5)=temp2(1)
42  if(iref.eq.1 .or. iref.eq.2 .or. iref.eq.3)then
43  bfr2(nd+6)=calb
44  bfr2(nd+7)=flxupwat
45  endif
46  bfr2(nd+8)=crftfd
47  bfr2(nd+9)=crftfu
48  bfr2(nd+10)=hcrft
49  bfr2(nd+11)=taucrft
50 c
51  bfr3(nd+1)=rmuo
52  bfr3(nd+2)=1.0
53  bfr3(nd+3)=amufac
54  bfr3(nd+4)=temp1(nolyr+1)
55  bfr3(nd+5)=temp2(1)
56  if(iref.eq.1 .or. iref.eq.2 .or. iref.eq.3)then
57  bfr3(nd+6)=calb
58  bfr3(nd+7)=flxupwat
59  endif
60  bfr3(nd+8)=crftfd
61  bfr3(nd+9)=crftfu
62  bfr3(nd+10)=hcrft
63  bfr3(nd+11)=taucrft
64 c
65  kcrft=(nsza-1)*2+1
66  if(kzz.eq.2)then
67  kcrft=2*nthe0+1
68  endif
69 c
70  do i=1,1915
71  ebfr2(i)=bfr2(i)
72  ebfr3(i)=bfr3(i)
73  enddo
74 c
75  kcrft1=kcrft+1
76  kcrft2=kcrft+2
77  write(15,rec=kcrft1)ebfr2
78  write(15,rec=kcrft2)ebfr3
79  return
80  end
81 c***********************************************************************
subroutine crftout
Definition: crftout.f:2