OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
outdty.f
Go to the documentation of this file.
1  subroutine outdty(oxzeroz,oxzerod)
2 
3 c***********************************************************************
4 c subroutine outdt creates output datasets for upwelling and
5 c downwelling diffused radiation leaving the top and bottom of
6 c the atmosphere
7 c***********************************************************************
8 c.....include the common blocks
9  implicit real*8 (a-h,o-z)
10  include 'afrt_rt2.cmn'
11  real*8 tma(nsz),tmb(nsz),tmc(nsz),tmfd(nsz),tmfu(nsz),tms(nsz)
12  real*8 tmg(nsz),tmh(nsz),tmp(nsz),tmq(nsz),tmpp(nsz),tmqq(nsz)
13  real*8 tmrr(nsz),tmss(nsz)
14  real*8 oxzeroz(nstk,nph,nth,nsz),oxzerod(nstk,nph,nth,nsz)
15  integer*4 s
16 c***********************************************************************
17 c
18  lsza=bfr1(35)+0.001
19  do i=1,lsza,1
20  m=msza(i)
21  tma(i)=the0in(m)
22  tmb(i)=fdirc(m)
23  tmc(i)=sbarz(m)
24  tmfd(i)=fdown(m)
25  tmfu(i)=fup(m)
26  tms(i)=oalb(m)
27  tmg(i)=albtdr(m)*pi
28  tmh(i)=albtdf(m)*pi
29  tmp(i)=albtrf(m)*pi
30  tmq(i)=albwl(m)*pi
31  tmpp(i)=tmq(i)/(tmb(i)+tmfd(i))
32  tmqq(i)=tms(i)-tmpp(i)
33  tmrr(i)=albrdr(m)
34  tmss(i)=albrdf(m)
35  enddo
36 c
37  iprn=4
38  call headr(iprn)
39 c
40  write(iprn,6659)
41  do 5567 i=1,lsza
42  it=msza(i)
43  write(iprn,6660)tma(i),pi
44  write(iprn,6661)tmb(i),tmfd(i)
45  if(iref.eq.1 .or. iref.eq.2)then
46  write(iprn,6662)tmfu(i),tms(i)
47  write(iprn,7663)tmg(i),tmh(i)
48  write(iprn,7664)tmp(i),tmq(i)
49  write(iprn,7665)tmpp(i),tmqq(i)
50  write(iprn,7666)tmrr(i),tmss(i)
51  endif
52  if(iref.eq.3)write(iprn,6665)tmfu(i),tms(i)
53  write(iprn,6668)
54  write(iprn,6664)(the(ir),ir=1,(nx-1))
55  do is=1,jpart
56  write(iprn,6667)jphi(is),(xzeroz(1,it,ir,is)*pi,ir=1,(nx-1))
57  do ir=1,(nx-1)
58  do s=1,nstk
59  oxzeroz(s,is,ir,it) = xzeroz(s,it,ir,is)*pi
60  enddo
61  enddo
62  enddo
63 5567 continue
64 c
65  iprn=3
66  call headr(iprn)
67 c
68  write(iprn,6659)
69  do 5568 i=1,lsza
70  it=msza(i)
71  write(iprn,6660)tma(i),pi
72  write(iprn,6661)tmb(i),tmfd(i)
73  if(iref.eq.1 .or. iref.eq.2)then
74  write(iprn,6662)tmfu(i),tms(i)
75  write(iprn,7663)tmg(i),tmh(i)
76  write(iprn,7664)tmp(i),tmq(i)
77  write(iprn,7665)tmpp(i),tmqq(i)
78  write(iprn,7666)tmrr(i),tmss(i)
79  endif
80  if(iref.eq.3)write(iprn,6665)tmfu(i),tms(i)
81  write(iprn,6668)
82  write(iprn,6664)(the(ir),ir=1,(nx-1))
83  do is=1,jpart
84  write(iprn,6667)jphi(is),(xzerod(1,it,ir,is)*pi,ir=1,(nx-1))
85  do ir=1,(nx-1)
86  do s=1,nstk
87  oxzerod(s,is,ir,it) = xzerod(s,it,ir,is)*pi
88  enddo
89  enddo
90  enddo
91 5568 continue
92 c*****format statements*************************************************
93 c
94 6659 format(t1,'fluxes')
95 6660 format(t8,'sza',t32,f6.1,t40,'f0_top',t64,1pe12.4)
96 6661 format(t8,'fdir_btm',t26,1pe12.4,t40,'fdif_btm',t64,1pe12.4)
97 6662 format(t8,'fdif_up',t26,1pe12.4,t40,'hem. ref(ocean)',t64,1pe12.4)
98 6664 format('phi theta',7(2x,f5.1,3x)/3(9x,7(2x,f5.1,3x)/))
99 6665 format(t8,'fdif_up',t26,1pe12.4,t40,'hem. ref(surf)',t64,1pe12.4)
100 6667 format(i3,6x,1p7e10.3/3(9x,1p7e10.3/))
101 6668 format(t1,'radiances (f0=pi)')
102 6672 format(t8,'fdif_up',t26,1pe12.4,t40,'sbar',t64,1pe12.4)
103 7663 format(t8,'ftw_dir(ocn)',t26,1pe12.4,
104  1 t40,'ftw_difdn(ocn)',t64,1pe12.4)
105 7664 format(t8,'ftw_difup(blow_ocn)',t27,1pe11.4,
106  1 t40,'ftw_difup(above_ocn)',t64,1pe12.4)
107 7665 format(t8,'hem_ref(ocn_trans)',t26,1pe12.4,
108  1 t40,'hem_ref(ocn_refl)',t64,1pe12.4)
109 7666 format(t8,'hem_ref(ocn_dirrfl)',t27,1pe11.4,
110  1 t40,'hem_ref(ocn_difrfl)',t64,1pe12.4)
111 c***********************************************************************
112  return
113  end
114 c************************************************************************
#define real
Definition: DbAlgOcean.cpp:26
subroutine outdty(oxzeroz, oxzerod)
Definition: outdty.f:2
#define pi
Definition: vincenty.c:23
subroutine headr(iprn)
Definition: headr.f:2