OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
outsurfy.f
Go to the documentation of this file.
1  subroutine outsurfy(osurfzu)
2 
3 c***********************************************************************
4 c subroutine outsurf creates output datasets for upwelling
5 c diffused radiation leaving 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 osurfzu(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=16
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 (surfzu(it,ir,is)*pi,ir=1,(nx-1))
54  do ir=1,(nx-1)
55  osurfzu(is,ir,it) = surfzu(it,ir,is)*pi
56  enddo
57  enddo
58 c convert the upwelling radiances into brdf
59 c do is=1,jpart
60 c write(iprn,6667)jphi(is),
61 c 1 (surfzu(it,ir,is)*(pi/tmt(i)),ir=1,(nx-1))
62 c enddo
63 5567 continue
64 c
65 c*****format statements*************************************************
66 c
67 6659 format(t1,'fluxes')
68 6660 format(t8,'sza',t32,f6.1,t40,'f0_top',t64,1pe12.4)
69 6661 format(t8,'fdir_btm',t26,1pe12.4,t40,'fdif_btm',t64,1pe12.4)
70 6662 format(t8,'fdif_up',t26,1pe12.4,t40,'hem. ref(ocean)',t64,1pe12.4)
71 6664 format('phi theta',7(2x,f5.1,3x)/3(9x,7(2x,f5.1,3x)/))
72 6665 format(t8,'fdif_up',t26,1pe12.4,t40,'hem. ref(surf)',t64,1pe12.4)
73 6667 format(i3,6x,1p7e10.3/3(9x,1p7e10.3/))
74 6668 format(t1,'radiances (f0=pi)')
75 6672 format(t8,'fdif_up',t26,1pe12.4,t40,'sbar',t64,1pe12.4)
76 7663 format(t8,'ftw_dir(ocn)',t26,1pe12.4,
77  1 t40,'ftw_difdn(ocn)',t64,1pe12.4)
78 7664 format(t8,'ftw_difup(blow_ocn)',t27,1pe11.4,
79  1 t40,'ftw_difup(above_ocn)',t64,1pe12.4)
80 7665 format(t8,'hem_ref(ocn_trans)',t26,1pe12.4,
81  1 t40,'hem_ref(ocn_refl)',t64,1pe12.4)
82 c***********************************************************************
83  return
84  end
85 c************************************************************************
#define real
Definition: DbAlgOcean.cpp:26
subroutine outsurfy(osurfzu)
Definition: outsurfy.f:2
#define pi
Definition: vincenty.c:23
subroutine headr(iprn)
Definition: headr.f:2