OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
crftlvl.f
Go to the documentation of this file.
1  subroutine crftlvl
2 c
3 c detemine the atmospheric levels that bracket the aircraft height
4 c also, compute the direct flux at the aircraft altidue
5 c
6 c***********************************************************************
7 c
8  implicit real*8 (a-h,o-z)
9  include 'afrt_rt2.cmn'
10 c
11  real*8 buffx(1000)
12 c
13 c**********************************************************************
14 c
15 c check if the aircraft height is less than ht(1)
16 c
17  if(hcrft.gt.ht(1) .or. hcrft.le.ht(nolyr+1))then
18 c write(6,100)hcrft
19 100 format('aircraft height is out of bound',0pf7.1,' km')
20  endif
21 c
22  lvlcrft=1
23  if(icrft.eq.1)then
24  do i=1,nolyr
25  if(hcrft.le.ht(i) .and. hcrft.gt.ht(i+1))then
26  lvlcrft=i
27  endif
28  enddo
29  endif
30 c
31 c find the atmospheric pressure and total optical thickness at
32 c the aircraft height
33 c
34  buffx(1)=0.0d0
35  do i=1,nolyr
36  buffx(i+1)=buffx(i)+dtot(i)
37  enddo
38  plg1=dlog(pl(lvlcrft))
39  plg2=dlog(pl(lvlcrft+1))
40  plc1=pl(lvlcrft)
41  plc2=pl(lvlcrft+1)
42  ht1=ht(lvlcrft)
43  ht2=ht(lvlcrft+1)
44  tcrft1=buffx(lvlcrft)
45  tcrft2=buffx(lvlcrft+1)
46 c
47  call xntpln(hcrft,ht1,ht2,plg1,plg2,plgc)
48  pcrft=dexp(plgc)
49  call xntpln(pcrft,plc1,plc2,tcrft1,tcrft2,taucrft)
50 c
51 c compute the direct flux at the aircraft altidue
52 c
53  crftdirf=amuo*dexp(-taucrft)
54 c
55  return
56  end
57 c***********************************************************************
#define real
Definition: DbAlgOcean.cpp:26
subroutine xntpln(x, x1, x2, y1, y2, y)
Definition: xntpln.f:2
subroutine crftlvl
Definition: crftlvl.f:2