Toggle navigation
Ocean Color Science Software
Jump to content
ocssw
V2022
web
ocssw
ocssw_src
src
afrt
flxtop.f
Go to the documentation of this file.
1
subroutine
flxtop
2
c
3
c subroutine flxtop computes the upward diffused flux at the
4
c top of the atmosphere for rg=0. also, it checks for flux balance
5
c***********************************************************************
6
c.....include common blocks
7
implicit real*8
(a-h,o-z)
8
include
'afrt_rt2.cmn'
9
c***********************************************************************
10
c
11
sum = 0.0
12
do
j = nx,nmum1
13
psum = 0.0
14
do
k = 1,2
15
psum=
fio
(k,j,1)+
fio
(k,j,jpart)+psum
16
enddo
17
do
k=1,2
18
do
i=2,nophi/2
19
psum=psum+2.*
fio
(k,j,i)
20
enddo
21
enddo
22
sum=sum+psum*dcmusq(j)*6.2831854d0/dfloat(nophi)
23
enddo
24
sumup=
abs
(sum)
25
sumpi=sumup*
pi
26
amufac = amuo*factr
27
amufpi = amufac*
pi
28
amzz=amuo
29
if
(kzz.eq.2) amzz=1.0
30
if
(iref.eq.0)
then
31
flxbln=(sumup+(1.0-refl)*(sumdwn+amuo*(factr)))/amzz
32
endif
33
c if(kzz.eq.1)write(6,7574)
34
c if(kzz.eq.2)write(6,7575)
35
c write(6,7576)
36
c write(6,7577) amufac,amufpi
37
c write(6,2008) sumdwn,sumdpi
38
c write(6,2007) sumup,sumpi
39
c if(iref .eq. 0) write(6,2015) flxbln
40
c if(iref.eq.1 .or. iref.eq.2)then
41
c write(6,2011) sumc,sumcpi,calb
42
c endif
43
c if(iref.eq.3)then
44
c write(6,2012) sumc,sumcpi,calb
45
c endif
46
c write(6,2025)jpass
47
c if(iref.eq.0)then
48
c flxb(jpass)=flxbln
49
c endif
50
c******format statements************************************************
51
2007
format
(
'upward diffused flux (top)'
,t35,
'='
,1pe12.4,
52
1 2x,
'( * pi = '
,1pe12.4,
' )'
)
53
2008
format
(
'downward diffused flux (bottom)'
, t35,
'='
,1pe12.4,
54
1 2x,
'( * pi = '
,1pe12.4,
' )'
)
55
2015
format
(
'flux balance '
,t35,
'='
,1pe12.4)
56
2011
format
(
'upward diff. flux (above ocean)'
,t35,
'='
,1pe12.4,
57
1 2x,
'( * pi = '
,1pe12.4,
' )'
//
58
2 ,
'ocean albedo '
,t35,
'='
,1pe12.4 )
59
2012
format
(
'upward diff. flux (above ocean)'
,t35,
'='
,1pe12.4,
60
1 2x,
'( * pi = '
,1pe12.4,
' )'
//
61
2 ,
'surf. albedo '
,t35,
'='
,1pe12.4 )
62
2025
format
(/ t40,
'***** end of iteration no. '
, i5,
63
1
' *****'
/ )
64
7574
format
(/
'illumination from top, f0=1'
)
65
7575
format
(/
'illumination from below'
)
66
7576
format
(/
'summary of flux calculations'
)
67
7577
format
(
'direct downward flux'
,t35,
'='
,1pe12.4,
68
1 2x,
'( * pi = '
, 1pe12.4,
' )'
)
69
c***********************************************************************
70
return
71
end
72
c***********************************************************************
pi
#define pi
Definition:
vincenty.c:23
flxtop
subroutine flxtop
Definition:
flxtop.f:2
fio
Definition:
RsViirs.h:71
abs
#define abs(a)
Definition:
misc.h:90