OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
foam.f
Go to the documentation of this file.
1  subroutine foam
2 c
3 c compute the contribution from foam to the upwelling radiance
4 c just above the sea surface
5 c
6 c**********************************************************************
7 c
8  implicit real*8 (a-h,o-z)
9  include 'afrt_rt2.cmn'
10  real*8 ref(39)
11 c
12 c effective reflectance of the whitecaps (Koepke, 1984)
13  data ref/
14  &0.220,0.220,0.220,0.220,0.220,0.220,0.215,0.210,0.200,0.190,
15  &0.175,0.155,0.130,0.080,0.100,0.105,0.100,0.080,0.045,0.055,
16  &0.065,0.060,0.055,0.040,0.000,0.000,0.000,0.000,0.000,0.000,
17  &0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000/
18 c
19  wl=xlam*1.0d4
20 c write(6,50)pi,vz,wl,pflx
21 50 format('pi,vz,wl,pflx',1p4e11.3)
22 C compute whitecaps reflectance 'afoam' for wavelength 'wl'
23  iwl=1+idint((wl-0.2)/0.1)
24 c write(6,*)'iwl',iwl
25  wlp=0.5+(iwl-1)*0.1
26  afoam=ref(iwl+1)+(wl-wlp)/0.1*(ref(iwl)-ref(iwl+1))
27 c
28 c write(6,100)wl,wlp,afoam
29 100 format('white caps ref. wl,wlp,afoam',1p3e11.3)
30  if(ifoam.eq.1)then
31  fracfm=2.95d-6*vz**3.52d0
32  bfr1(75)=fracfm
33  ffoam=afoam*fracfm
34 c write(6,150)fracfm,afoam,ffoam
35 150 format('fracfm,afoam,ffoam',1p3e11.3)
36 c foam reflected radiance
37  xifm=(ffoam*pflx)/pi
38  else
39  ffoam=0.0d0
40  fracfm=0.0d0
41  xifm=0.0d0
42  endif
43 c write(6,9988)ifoam,iwatr,fracfm,xifm
44  9988 format('ifoam,iwatr,fracfm,xifm',2i2,1x,1p2e11.3)
45 c
46  return
47  end
48 c
49 c**********************************************************************
subroutine foam
Definition: foam.f:2
#define real
Definition: DbAlgOcean.cpp:26
#define pi
Definition: vincenty.c:23