OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
outsurfsky.f
Go to the documentation of this file.
1  subroutine outsurfsky(oradsky)
2 
3 c***********************************************************************
4 c subroutine outsurf creates output datasets for upwelling
5 c diffused radiation (skylight component) at the 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),tmt(nsz)
12  real*8 tmg(nsz),tmh(nsz),tmp(nsz),tmq(nsz),tmpp(nsz),tmqq(nsz),
13  1 oradsky(nph,nth,nsz)
14 c***********************************************************************
15 c
16  lsza=bfr1(35)+0.001
17  do i=1,lsza,1
18  m=msza(i)
19  tma(i)=the0in(m)
20  tmb(i)=fdirc(m)
21  tmc(i)=sbarz(m)
22  tmfd(i)=fdown(m)
23  tmfu(i)=fup(m)
24  tms(i)=oalb(m)
25  tmg(i)=albtdr(m)*pi
26  tmh(i)=albtdf(m)*pi
27  tmp(i)=albtrf(m)*pi
28  tmq(i)=albwl(m)*pi
29  tmpp(i)=tmq(i)/(tmb(i)+tmfd(i))
30  tmqq(i)=tms(i)-tmpp(i)
31  tmt(i)=(fdirc(m)+fdown(m))/pi
32  enddo
33 c
34  iprn=43
35  call headr(iprn)
36 c
37  write(iprn,6659)
38  do 5567 i=1,lsza
39  it=msza(i)
40  write(iprn,6660)tma(i),pi
41  write(iprn,6661)tmb(i),tmfd(i)
42  if(iref.eq.1 .or. iref.eq.2)then
43  write(iprn,6662)tmfu(i),tms(i)
44  write(iprn,7663)tmg(i),tmh(i)
45  write(iprn,7664)tmp(i),tmq(i)
46  write(iprn,7665)tmpp(i),tmqq(i)
47  endif
48  if(iref.eq.3)write(iprn,6665)tmfu(i),tms(i)
49  write(iprn,6668)
50  write(iprn,6664)(the(ir),ir=1,(nx-1))
51  do is=1,jpart
52  write(iprn,6667)jphi(is),
53  1 (radsky(it,ir,is)*pi,ir=1,(nx-1))
54  do ir=1,(nx-1)
55  oradsky(is,ir,it) = radsky(it,ir,is)*pi
56  enddo
57  enddo
58 5567 continue
59 c
60 c*****format statements*************************************************
61 c
62 6659 format(t1,'fluxes')
63 6660 format(t8,'sza',t32,f6.1,t40,'f0_top',t64,1pe12.4)
64 6661 format(t8,'fdir_btm',t26,1pe12.4,t40,'fdif_btm',t64,1pe12.4)
65 6662 format(t8,'fdif_up',t26,1pe12.4,t40,'hem. ref(ocean)',t64,1pe12.4)
66 6664 format('phi theta',7(2x,f5.1,3x)/3(9x,7(2x,f5.1,3x)/))
67 6665 format(t8,'fdif_up',t26,1pe12.4,t40,'hem. ref(surf)',t64,1pe12.4)
68 6667 format(i3,6x,1p7e10.3/3(9x,1p7e10.3/))
69 6668 format(t1,'radiances (f0=pi)')
70 6672 format(t8,'fdif_up',t26,1pe12.4,t40,'sbar',t64,1pe12.4)
71 7663 format(t8,'ftw_dir(ocn)',t26,1pe12.4,
72  1 t40,'ftw_difdn(ocn)',t64,1pe12.4)
73 7664 format(t8,'ftw_difup(blow_ocn)',t27,1pe11.4,
74  1 t40,'ftw_difup(above_ocn)',t64,1pe12.4)
75 7665 format(t8,'hem_ref(ocn_trans)',t26,1pe12.4,
76  1 t40,'hem_ref(ocn_refl)',t64,1pe12.4)
77 c***********************************************************************
78  return
79  end
80 c************************************************************************
#define real
Definition: DbAlgOcean.cpp:26
subroutine outsurfsky(oradsky)
Definition: outsurfsky.f:2
#define pi
Definition: vincenty.c:23
subroutine headr(iprn)
Definition: headr.f:2