10 use kinds, only: int_kind, dbl_kind
39 integer (kind=int_kind):: &
45 real (kind=dbl_kind),
dimension(:),
allocatable:: &
57 real (kind=dbl_kind),
dimension(:,:),
allocatable:: &
72 real (kind=dbl_kind),
dimension(:,:),
allocatable:: &
75 real (kind=dbl_kind),
dimension(:,:),
allocatable:: &
84 real,
dimension(2) :: tarray
85 real :: dtime, elapsed
88 character(LEN=1) :: l0
89 character(LEN=200) :: line
93 write(*,*)
'Reading profile data from profile.dat.'
99 read(line(1:1),
"(A)") l0
105 allocate(ts(nlen) , amu0(nlen) , slr(nlen))
107 allocate(alvdr(nlen) , alndr(nlen) , alvdf(nlen), alndf(nlen))
108 allocate(umco2(nlen), umch4(nlen), umn2o(nlen))
109 allocate(pl(nlen,nlm), dpl(nlen,nlm), tl(nlen,nlm), ql(nlen,nlm), &
110 qcwl(nlen,nlm) , qcil(nlen,nlm), qrwl(nlen,nlm), qril(nlen,nlm), &
111 o3l(nlen,nlm), acld(nlen,nlm))
113 allocate(pl2(nlen,nlm+1))
115 allocate(atl(nlen,nlm), asl(nlen,nlm), fulw(nlen,nlm+1), &
116 fdlw(nlen,nlm+1), fusw(nlen,nlm+1), fdsw(nlen,nlm+1))
122 read(line(1:1),
"(A)") l0
124 read(line,*) i,pl(1,l),pl2(1,l),tl(1,l),ql(1,l),o3l(1,l), &
125 qcwl(1,l), qcil(1,l), qrwl(1,l), qril(1,l), acld(1,l)
126 pl2(1,l) = pl2(1,l)/100.
127 pl(1,l) = pl(1,l)/100.
132 read(line(1:1),
"(A)") l0
134 read(line,*) pl2(1,nlm+1),ts(1), amu0(1), alvdr(1), alvdf(1), &
135 alndr(1), alndf(1), umco2(1), umch4(1), umn2o(1)
136 pl2(1,nlm+1) = pl2(1,nlm+1)/100.
140 dpl(1,l) = pl2(1,l+1)-pl2(1,l)
175 acld(i,:) = acld(1,:)
176 qcwl(i,:) = qcwl(1,:)
177 qcil(i,:) = qcil(1,:)
178 qril(i,:) = qril(1,:)
197 elapsed = dtime(tarray)
198 call
bugs_rad(nlen,len,nlm,pl2,pl,dpl,tl,ql,qcwl,qcil,qril, &
199 o3l,ts,amu0,slr,alvdf,alndf,alvdr,alndr,sol_const, &
200 gravity,cp_dry_air,asl,atl,fdsw,fusw,fdlw,fulw, &
201 acld, umco2, umch4, umn2o)
202 elapsed = dtime(tarray)
206 print *,
"Dtime: ", elapsed
207 print *,
" Fluxes Plev SW_DN SW_UP LW_DN LW_UP"
208 print *,
" Pa W/m^2 W/m^2 W/m^2 W/m^2"
210 print
'(I4,5(F12.3))',l,pl2(1,l),fdsw(1,l),fusw(1,l), &
213 print *,
'Heating Rates Play SW LW'
214 print *,
' Pa K/day K/day'
216 print
'(I4,6X, F12.3,2(F15.5))', &
217 l,pl(1,l),asl(1,l)*86400.,atl(1,l)*86400.