142 module module_radiation_aerosols
147 &, kind_io4, kind_io8
151 use module_iounitdef
, only : niaercm
156 use funcphys
, only : fpkap
157 use gfs_phy_tracer_config
, only : gfs_phy_tracer, trcindx
164 character(40),
parameter :: &
165 & VTAGAER=
'NCEP-Radiation_aerosols v5.2 Jan 2013 '
177 integer,
parameter,
public ::
nspc = 5
181 real (kind=kind_phys),
parameter :: f_zero = 0.0
182 real (kind=kind_phys),
parameter :: f_one = 1.0
201 integer,
parameter,
public ::
nwvsol = 151
204 integer,
parameter,
public ::
nwvtot = 57600
206 integer,
parameter,
public ::
nwvtir = 4000
209 integer,
dimension(NWVSOL),
save ::
nwvns0
211 data nwvns0 / 100, 11, 14, 18, 24, 33, 50, 83, 12, 12, &
212 & 13, 15, 15, 17, 18, 20, 21, 24, 26, 30, 32, 37, 42, &
213 & 47, 55, 64, 76, 91, 111, 139, 179, 238, 333, 41, 42, 45, &
214 & 46, 48, 51, 53, 55, 58, 61, 64, 68, 71, 75, 79, 84, &
215 & 89, 95, 101, 107, 115, 123, 133, 142, 154, 167, 181, 197, 217, &
216 & 238, 263, 293, 326, 368, 417, 476, 549, 641, 758, 909, 101, 103, &
217 & 105, 108, 109, 112, 115, 117, 119, 122, 125, 128, 130, 134, 137, &
218 & 140, 143, 147, 151, 154, 158, 163, 166, 171, 175, 181, 185, 190, &
219 & 196, 201, 207, 213, 219, 227, 233, 240, 248, 256, 264, 274, 282, &
220 & 292, 303, 313, 325, 337, 349, 363, 377, 392, 408, 425, 444, 462, &
221 & 483, 505, 529, 554, 580, 610, 641, 675, 711, 751, 793, 841, 891, &
222 & 947,1008,1075,1150,1231,1323,1425,1538,1667,1633,14300 /
225 real (kind=kind_phys),
dimension(NWVSOL),
save ::
s0intv
228 & 1.60000e-6, 2.88000e-5, 3.60000e-5, 4.59200e-5, 6.13200e-5, &
229 & 8.55000e-5, 1.28600e-4, 2.16000e-4, 2.90580e-4, 3.10184e-4, &
230 & 3.34152e-4, 3.58722e-4, 3.88050e-4, 4.20000e-4, 4.57056e-4, &
231 & 4.96892e-4, 5.45160e-4, 6.00600e-4, 6.53600e-4, 7.25040e-4, &
232 & 7.98660e-4, 9.11200e-4, 1.03680e-3, 1.18440e-3, 1.36682e-3, &
233 & 1.57560e-3, 1.87440e-3, 2.25500e-3, 2.74500e-3, 3.39840e-3, &
234 & 4.34000e-3, 5.75400e-3, 7.74000e-3, 9.53050e-3, 9.90192e-3, &
235 & 1.02874e-2, 1.06803e-2, 1.11366e-2, 1.15830e-2, 1.21088e-2, &
236 & 1.26420e-2, 1.32250e-2, 1.38088e-2, 1.44612e-2, 1.51164e-2, &
237 & 1.58878e-2, 1.66500e-2, 1.75140e-2, 1.84450e-2, 1.94106e-2 /
239 & 2.04864e-2, 2.17248e-2, 2.30640e-2, 2.44470e-2, 2.59840e-2, &
240 & 2.75940e-2, 2.94138e-2, 3.13950e-2, 3.34800e-2, 3.57696e-2, &
241 & 3.84054e-2, 4.13490e-2, 4.46880e-2, 4.82220e-2, 5.22918e-2, &
242 & 5.70078e-2, 6.19888e-2, 6.54720e-2, 6.69060e-2, 6.81226e-2, &
243 & 6.97788e-2, 7.12668e-2, 7.27100e-2, 7.31610e-2, 7.33471e-2, &
244 & 7.34814e-2, 7.34717e-2, 7.35072e-2, 7.34939e-2, 7.35202e-2, &
245 & 7.33249e-2, 7.31713e-2, 7.35462e-2, 7.36920e-2, 7.23677e-2, &
246 & 7.25023e-2, 7.24258e-2, 7.20766e-2, 7.18284e-2, 7.32757e-2, &
247 & 7.31645e-2, 7.33277e-2, 7.36128e-2, 7.33752e-2, 7.28965e-2, &
248 & 7.24924e-2, 7.23307e-2, 7.21050e-2, 7.12620e-2, 7.10903e-2 /
249 data s0intv(101:151) / 7.12714e-2, &
250 & 7.08012e-2, 7.03752e-2, 7.00350e-2, 6.98639e-2, 6.90690e-2, &
251 & 6.87621e-2, 6.52080e-2, 6.65184e-2, 6.60038e-2, 6.47615e-2, &
252 & 6.44831e-2, 6.37206e-2, 6.24102e-2, 6.18698e-2, 6.06320e-2, &
253 & 5.83498e-2, 5.67028e-2, 5.51232e-2, 5.48645e-2, 5.12340e-2, &
254 & 4.85581e-2, 4.85010e-2, 4.79220e-2, 4.44058e-2, 4.48718e-2, &
255 & 4.29373e-2, 4.15242e-2, 3.81744e-2, 3.16342e-2, 2.99615e-2, &
256 & 2.92740e-2, 2.67484e-2, 1.76904e-2, 1.40049e-2, 1.46224e-2, &
257 & 1.39993e-2, 1.19574e-2, 1.06386e-2, 1.00980e-2, 8.63808e-3, &
258 & 6.52736e-3, 4.99410e-3, 4.39350e-3, 2.21676e-3, 1.33812e-3, &
259 & 1.12320e-3, 5.59000e-4, 3.60000e-4, 2.98080e-4, 7.46294e-5 /
273 integer,
allocatable,
save ::
ivolae(:,:,:)
292 integer,
parameter ::
nxc = 5
294 integer,
parameter ::
nae = 7
296 integer,
parameter ::
ndm = 5
309 integer,
parameter :: ncm =
ncm1+
ncm2
312 real (kind=kind_phys),
dimension(NRHLEV),
save ::
rhlev
313 data rhlev(:) / 0.0, 0.5, 0.7, 0.8, 0.9, 0.95, 0.98, 0.99 /
323 real (kind=kind_phys),
save,
dimension(NDM,NAE) ::
haer
325 real (kind=kind_phys),
save,
dimension(NDM,NAE) ::
prsref
327 real (kind=kind_phys),
save,
dimension(NDM,NAE) ::
sigref
349 real (kind=kind_phys),
allocatable,
save,
dimension(:,:) :: &
350 & extrhi, scarhi, ssarhi, asyrhi
351 real (kind=kind_phys),
allocatable,
save,
dimension(:,:,:) :: &
352 & extrhd, scarhd, ssarhd, asyrhd
353 real (kind=kind_phys),
allocatable,
save,
dimension(:) :: &
366 real (kind=kind_phys),
dimension(NXC,IMXAE,JMXAE),
save ::
cmixg
368 real (kind=kind_phys),
dimension( 2 ,IMXAE,JMXAE),
save ::
denng
370 integer,
dimension(NXC,IMXAE,JMXAE),
save ::
idxcg
372 integer,
dimension( IMXAE,JMXAE),
save ::
kprfg
396 real (kind=kind_phys),
dimension(KRHLEV) :: rhlev_grt &
397 data rhlev_grt (:)/ .00, .05, .10, .15, .20, .25, .30, .35, &
398 & .40, .45, .50, .55, .60, .65, .70, .75, .80, .81, .82, &
399 & .83, .84, .85, .86, .87, .88, .89, .90, .91, .92, .93, &
400 & .94, .95, .96, .97, .98, .99 /
473 real (kind=kind_phys),
allocatable,
save,
dimension(:,:) :: &
476 real (kind=kind_phys),
allocatable,
save,
dimension(:,:) :: &
479 real (kind=kind_phys),
allocatable,
save,
dimension(:,:) :: &
485 real (kind=kind_phys),
allocatable,
save,
dimension(:,:,:) :: &
488 real (kind=kind_phys),
allocatable,
save,
dimension(:,:,:) :: &
491 real (kind=kind_phys),
allocatable,
save,
dimension(:,:,:) :: &
513 integer,
parameter ::
imxg = 144
515 integer,
parameter ::
jmxg = 91
517 integer,
parameter ::
kmxg = 30
522 real (kind=kind_phys),
parameter :: dltx = 360.0 / float(
imxg)
523 real (kind=kind_phys),
parameter :: dlty = 180.0 / float(
jmxg-1)
532 real (kind=kind_phys),
allocatable,
save::
psclmg(:,:,:)
534 real (kind=kind_phys),
allocatable,
save::
dmclmg(:,:,:,:)
538 real (kind=kind_phys),
allocatable,
save,
dimension(:)::
geos_rlon
540 real (kind=kind_phys),
allocatable,
save,
dimension(:)::
geos_rlat
547 real (kind=kind_io4),
allocatable ::
molwgt(:)
566 real (kind=kind_phys),
save ::
ctaer = f_zero
593 integer,
save ::
isoot, iwaso, isuso, issam, isscm
605 integer :: dust1, dust2, dust3, dust4, dust5
607 integer :: ssam, sscm
611 integer :: waso_phobic, waso_philic
613 integer :: soot_phobic, soot_philic
620 integer :: du001, du002, du003, du004, du005
622 integer :: ss001, ss002, ss003, ss004, ss005
626 integer :: ocphobic, ocphilic
628 integer :: bcphobic, bcphilic
658 data idxspc / 1, 2, 1, 1, 1, 1, 3, 5, 5, 4 /
664 real (kind=kind_phys),
parameter ::
wvn550 = 1.0e4/0.55
728 integer,
intent(in) :: NLAY, me
733 real (kind=kind_phys),
dimension(NWVTOT) :: solfwv
734 real (kind=kind_phys),
dimension(NWVTIR) :: eirfwv
792 & ( solfwv, eirfwv, me &
807 print *,
' !!! ERROR in aerosol model scheme selection', &
872 print *,
' - Using OPAC-seasonal climatology for tropospheric', &
875 print *,
' - Using GOCART-climatology for tropospheric', &
878 print *,
' - Using GOCART-prognostic aerosols for tropospheric', &
881 print *,
' !!! ERROR in selection of aerosol model scheme', &
890 print *,
' - No tropospheric/volcanic aerosol effect included'
891 print *,
' Input values of aerosol optical properties to' &
892 & ,
' both SW and LW radiations are set to zeros'
895 print *,
' - Include stratospheric volcanic aerosol effect'
897 print *,
' - No stratospheric volcanic aerosol effect'
901 print *,
' - Compute multi-band aerosol optical' &
902 & ,
' properties for SW input parameters'
904 print *,
' - No SW radiation aerosol effect, values of' &
905 & ,
' aerosol properties to SW input are set to zeros'
910 print *,
' - Compute 1 broad-band aerosol optical' &
911 & ,
' properties for LW input parameters'
913 print *,
' - Compute multi-band aerosol optical' &
914 & ,
' properties for LW input parameters'
917 print *,
' - No LW radiation aerosol effect, values of' &
918 & ,
' aerosol properties to LW input are set to zeros'
971 real (kind=kind_phys) :: soltot, tmp1, tmp2, tmp3
973 integer :: nb, nw, nw1, nw2, nmax, nmin
994 nw2 = nw1 +
nwvns0(nb) - 1
1014 eirfwv(nw) = (tmp1 * tmp3**3) / (exp(tmp2*tmp3) - 1.0)
1054 if ( .not.
allocated(
ivolae) )
then
1055 allocate (
ivolae(12,4,10) )
1081 & ( solfwv, eirfwv, me &
1129 real (kind=kind_phys),
dimension(:) :: solfwv
1130 real (kind=kind_phys),
dimension(:) :: eirfwv
1132 integer,
intent(in) :: me
1137 real (kind=kind_phys),
dimension(NAERBND,NCM1) :: &
1138 & rhidext0, rhidsca0, rhidssa0, rhidasy0
1139 real (kind=kind_phys),
dimension(NAERBND,NRHLEV,NCM2):: &
1140 & rhdpext0, rhdpsca0, rhdpssa0, rhdpasy0
1141 real (kind=kind_phys),
dimension(NAERBND) :: straext0
1143 real (kind=kind_phys),
dimension(NSWBND,NAERBND) :: solwaer
1144 real (kind=kind_phys),
dimension(NSWBND) :: solbnd
1145 real (kind=kind_phys),
dimension(NLWBND,NAERBND) :: eirwaer
1146 real (kind=kind_phys),
dimension(NLWBND) :: eirbnd
1148 integer,
dimension(NSWBND) :: nv1, nv2
1149 integer,
dimension(NLWBND) :: nr1, nr2
1251 integer,
dimension(NAERBND) :: iendwv
1253 integer :: i, j, k, m, mb, ib, ii, id, iw, iw1, iw2
1255 real (kind=kind_phys) :: sumsol, sumir
1257 logical :: file_exist
1258 character :: cline*80
1267 if ( file_exist )
then
1269 open (unit=niaercm,file=
aeros_file,status=
'OLD', &
1270 & action=
'read',form=
'FORMATTED')
1273 print *,
' Requested aerosol data file "',
aeros_file, &
1275 print *,
' *** Stopped in subroutine aero_init !!'
1282 read (niaercm,12) cline
1294 if ( .not.
allocated( extrhi ) )
then
1303 allocate ( extstra(
nswlwbd) )
1307 read(niaercm,21) cline
1309 read(niaercm,22) iendwv(:)
1313 read(niaercm,21) cline
1314 read(niaercm,24)
haer(:,:)
1318 read(niaercm,21) cline
1319 read(niaercm,26)
prsref(:,:)
1323 read(niaercm,21) cline
1324 read(niaercm,28) rhidext0(:,:)
1328 read(niaercm,21) cline
1329 read(niaercm,28) rhidsca0(:,:)
1332 read(niaercm,21) cline
1333 read(niaercm,28) rhidssa0(:,:)
1336 read(niaercm,21) cline
1337 read(niaercm,28) rhidasy0(:,:)
1340 read(niaercm,21) cline
1341 read(niaercm,28) rhdpext0(:,:,:)
1344 read(niaercm,21) cline
1345 read(niaercm,28) rhdpsca0(:,:,:)
1348 read(niaercm,21) cline
1349 read(niaercm,28) rhdpssa0(:,:,:)
1352 read(niaercm,21) cline
1353 read(niaercm,28) rhdpasy0(:,:,:)
1356 read(niaercm,21) cline
1357 read(niaercm,28) straext0(:)
1374 solwaer(i,j) = f_zero
1382 iw1 = nint(wvnsw1(mb))
1383 iw2 = nint(wvnsw2(mb))
1385 if ( wvnsw2(mb) >=
wvn550 .and.
wvn550 >= wvnsw1(mb) )
then
1389 lab_swdowhile :
do while ( iw1 > iendwv(ii) )
1390 if ( ii ==
naerbnd )
exit lab_swdowhile
1398 solbnd(ib) = solbnd(ib) + solfwv(iw)
1399 sumsol = sumsol + solfwv(iw)
1401 if ( iw == iendwv(ii) )
then
1402 solwaer(ib,ii) = sumsol
1411 if ( iw2 /= iendwv(ii) )
then
1412 solwaer(ib,ii) = sumsol
1428 eirwaer(i,j) = f_zero
1441 iw1 = nint(wvnlw1(mb))
1442 iw2 = nint(wvnlw2(mb))
1445 lab_lwdowhile :
do while ( iw1 > iendwv(ii) )
1446 if ( ii ==
naerbnd )
exit lab_lwdowhile
1454 eirbnd(ib) = eirbnd(ib) + eirfwv(iw)
1455 sumir = sumir + eirfwv(iw)
1457 if ( iw == iendwv(ii) )
then
1458 eirwaer(ib,ii) = sumir
1467 if ( iw2 /= iendwv(ii) )
then
1468 eirwaer(ib,ii) = sumir
1580 real (kind=kind_phys) :: sumk, sums, sumok, sumokg, sumreft, &
1581 & sp, refb, reft, rsolbd, rirbd
1583 integer :: ib, nb, ni, nh, nc
1594 rsolbd = f_one / solbnd(nb)
1605 do ni = nv1(nb), nv2(nb)
1606 sp = sqrt( (f_one - rhidssa0(ni,nc)) &
1607 & / (f_one - rhidssa0(ni,nc)*rhidasy0(ni,nc)) )
1608 reft = (f_one - sp) / (f_one + sp)
1609 sumreft = sumreft + reft*solwaer(nb,ni)
1611 sumk = sumk + rhidext0(ni,nc)*solwaer(nb,ni)
1612 sums = sums + rhidsca0(ni,nc)*solwaer(nb,ni)
1613 sumok = sumok + rhidssa0(ni,nc)*solwaer(nb,ni) &
1615 sumokg = sumokg + rhidssa0(ni,nc)*solwaer(nb,ni) &
1616 & * rhidext0(ni,nc)*rhidasy0(ni,nc)
1619 refb = sumreft * rsolbd
1621 extrhi(nc,nb) = sumk * rsolbd
1622 scarhi(nc,nb) = sums * rsolbd
1623 asyrhi(nc,nb) = sumokg / (sumok + 1.0e-10)
1624 ssarhi(nc,nb) = 4.0*refb &
1625 & / ( (f_one+refb)**2 - asyrhi(nc,nb)*(f_one-refb)**2 )
1637 do ni = nv1(nb), nv2(nb)
1638 sp = sqrt( (f_one - rhdpssa0(ni,nh,nc)) &
1639 & / (f_one - rhdpssa0(ni,nh,nc)*rhdpasy0(ni,nh,nc)) )
1640 reft = (f_one - sp) / (f_one + sp)
1641 sumreft = sumreft + reft*solwaer(nb,ni)
1643 sumk = sumk + rhdpext0(ni,nh,nc)*solwaer(nb,ni)
1644 sums = sums + rhdpsca0(ni,nh,nc)*solwaer(nb,ni)
1645 sumok = sumok + rhdpssa0(ni,nh,nc)*solwaer(nb,ni) &
1646 & * rhdpext0(ni,nh,nc)
1647 sumokg = sumokg + rhdpssa0(ni,nh,nc)*solwaer(nb,ni) &
1648 & * rhdpext0(ni,nh,nc)*rhdpasy0(ni,nh,nc)
1651 refb = sumreft * rsolbd
1653 extrhd(nh,nc,nb) = sumk * rsolbd
1654 scarhd(nh,nc,nb) = sums * rsolbd
1655 asyrhd(nh,nc,nb) = sumokg / (sumok + 1.0e-10)
1656 ssarhd(nh,nc,nb) = 4.0*refb &
1657 & / ( (f_one+refb)**2 - asyrhd(nh,nc,nb)*(f_one-refb)**2 )
1664 do ni = nv1(nb), nv2(nb)
1665 sumk = sumk + straext0(ni)*solwaer(nb,ni)
1668 extstra(nb) = sumk * rsolbd
1695 rirbd = f_one / eirbnd(nb)
1704 do ni = nr1(nb), nr2(nb)
1705 sp = sqrt( (f_one - rhidssa0(ni,nc)) &
1706 & / (f_one - rhidssa0(ni,nc)*rhidasy0(ni,nc)) )
1707 reft = (f_one - sp) / (f_one + sp)
1708 sumreft = sumreft + reft*eirwaer(nb,ni)
1710 sumk = sumk + rhidext0(ni,nc)*eirwaer(nb,ni)
1711 sums = sums + rhidsca0(ni,nc)*eirwaer(nb,ni)
1712 sumok = sumok + rhidssa0(ni,nc)*eirwaer(nb,ni) &
1714 sumokg = sumokg + rhidssa0(ni,nc)*eirwaer(nb,ni) &
1715 & * rhidext0(ni,nc)*rhidasy0(ni,nc)
1718 refb = sumreft * rirbd
1720 extrhi(nc,ib) = sumk * rirbd
1721 scarhi(nc,ib) = sums * rirbd
1722 asyrhi(nc,ib) = sumokg / (sumok + 1.0e-10)
1723 ssarhi(nc,ib) = 4.0*refb &
1724 & / ( (f_one+refb)**2 - asyrhi(nc,ib)*(f_one-refb)**2 )
1735 do ni = nr1(nb), nr2(nb)
1736 sp = sqrt( (f_one - rhdpssa0(ni,nh,nc)) &
1737 & / (f_one - rhdpssa0(ni,nh,nc)*rhdpasy0(ni,nh,nc)) )
1738 reft = (f_one - sp) / (f_one + sp)
1739 sumreft = sumreft + reft*eirwaer(nb,ni)
1741 sumk = sumk + rhdpext0(ni,nh,nc)*eirwaer(nb,ni)
1742 sums = sums + rhdpsca0(ni,nh,nc)*eirwaer(nb,ni)
1743 sumok = sumok + rhdpssa0(ni,nh,nc)*eirwaer(nb,ni) &
1744 & * rhdpext0(ni,nh,nc)
1745 sumokg = sumokg + rhdpssa0(ni,nh,nc)*eirwaer(nb,ni) &
1746 & * rhdpext0(ni,nh,nc)*rhdpasy0(ni,nh,nc)
1749 refb = sumreft * rirbd
1751 extrhd(nh,nc,ib) = sumk * rirbd
1752 scarhd(nh,nc,ib) = sums * rirbd
1753 asyrhd(nh,nc,ib) = sumokg / (sumok + 1.0e-10)
1754 ssarhd(nh,nc,ib) = 4.0*refb &
1755 & / ( (f_one+refb)**2 - asyrhd(nh,nc,ib)*(f_one-refb)**2 )
1762 do ni = nr1(nb), nr2(nb)
1763 sumk = sumk + straext0(ni)*eirwaer(nb,ni)
1766 extstra(ib) = sumk * rirbd
1805 & ( iyear, imon, me )
1832 integer,
intent(in) :: iyear, imon, me
1840 if ( imon < 1 .or. imon > 12 )
then
1841 print *,
' ***** ERROR in specifying requested month !!! ', &
1843 print *,
' ***** STOPPED in subroutinte aer_update !!!'
1907 real (kind=kind_phys) :: cmix(
nxc), denn, tem
1908 integer :: idxc(
nxc), kprf
1910 integer :: i, id, j, k, m, nc
1911 logical :: file_exist
1913 character :: cline*80, ctyp*3
1921 if ( file_exist )
then
1923 open (unit=niaercm,file=
aeros_file,status=
'OLD', &
1924 & action=
'read',form=
'FORMATTED')
1928 print *,
' Opened aerosol data file: ',
aeros_file
1931 print *,
' Requested aerosol data file "',
aeros_file, &
1933 print *,
' *** Stopped in subroutine trop_update !!'
1942 cmixg(m,i,j) = f_zero
1950 denng(1,i,j) = f_zero
1951 denng(2,i,j) = f_zero
1957 lab_do_12mon :
do m = 1, 12
1959 read(niaercm,12) cline
1962 if ( m /= imon )
then
1971 if ( me == 0 ) print *,
' --- Reading ',cline
1975 read(niaercm,14) (idxc(k),cmix(k),k=1,
nxc),kprf,denn,nc, &
1977 14
format(5(i2,e11.4),i2,f8.2,i3,1x,a3)
1981 if ( kprf >= 6 )
then
1984 denng(2,i,j) = f_zero
1989 idxcg(k,i,j) = idxc(k)
1990 cmixg(k,i,j) = cmix(k)
2067 logical :: file_exist
2069 character :: cline*80, volcano_file*32
2070 data volcano_file /
'volcanic_aerosols_1850-1859.txt ' /
2081 kyrstr = iyear - mod(iyear,10)
2094 print *,
' Request volcanic date out of range,', &
2095 &
' optical depth set to lowest value'
2099 60
format(i4.4,
'-',i4.4)
2101 inquire (file=volcano_file, exist=file_exist)
2102 if ( file_exist )
then
2104 open (unit=niaercm,file=volcano_file,status=
'OLD', &
2105 & action=
'read',form=
'FORMATTED')
2107 read(niaercm,62) cline
2112 print *,
' Opened volcanic data file: ',volcano_file
2118 read(niaercm,64) (
ivolae(i,j,k),i=1,12)
2125 print *,
' Requested volcanic data file "', &
2126 & volcano_file,
'" not found!'
2127 print *,
' *** Stopped in subroutine VOLC_AERINIT !!'
2137 print *,
' CHECK: Sample Volcanic data used for month, year:', &
2181 & ( prsi,prsl,prslk,tvly,rhlay,slmsk,tracer,xlon,xlat, &
2182 & imax,nlay,nlp1, lsswr,lslwr, &
2242 integer,
intent(in) :: IMAX, NLAY, NLP1
2244 real (kind=kind_phys),
dimension(:,:),
intent(in) :: prsi, prsl, &
2245 & prslk, tvly, rhlay
2246 real (kind=kind_phys),
dimension(:),
intent(in) :: xlon, xlat, &
2248 real (kind=kind_phys),
dimension(:,:,:),
intent(in):: tracer
2250 logical,
intent(in) :: lsswr, lslwr
2254 real (kind=kind_phys),
dimension(:,:,:,:),
intent(out) :: &
2257 real (kind=kind_phys),
dimension(:,:) ,
intent(out) :: aerodp
2260 real (kind=kind_phys),
parameter :: psrfh = 5.0
2262 real (kind=kind_phys),
dimension(IMAX) :: alon,alat,volcae,rdelp
2264 real (kind=kind_phys) :: prsln(nlp1),hz(imax,nlp1),dz(imax,nlay)
2265 real (kind=kind_phys) :: tmp1, tmp2, psrfl
2267 integer :: kcutl(imax), kcuth(imax)
2268 integer :: i, i1, j, k, m, mb, kh, kl
2270 logical :: laddsw=.false., laersw=.false.
2271 logical :: laddlw=.false., laerlw=.false.
2274 real (kind=kind_phys),
parameter :: rdg = 180.0 /
con_pi
2275 real (kind=kind_phys),
parameter :: rovg = 0.001 *
con_rd /
con_g
2283 aerosw(i,k,j,m) = f_zero
2293 aerolw(i,k,j,m) = f_zero
2302 aerodp(i,k) = f_zero
2307 if ( .not. (lsswr .or. lslwr) )
then
2321 alon(i) = xlon(i) * rdg
2322 if (alon(i) < f_zero) alon(i) = alon(i) + 360.0
2323 alat(i) = xlat(i) * rdg
2331 lab_do_imax :
do i = 1, imax
2333 lab_if_flip :
if (
ivflip == 1)
then
2336 prsln(k) = log(prsi(i,k))
2338 prsln(nlp1)= log(prsl(i,nlay))
2341 dz(i,k) = rovg * (prsln(k) - prsln(k+1)) * tvly(i,k)
2343 dz(i,nlay) = 2.0 * dz(i,nlay)
2347 hz(i,k+1) = hz(i,k) + dz(i,k)
2352 prsln(1) = log(prsl(i,1))
2354 prsln(k) = log(prsi(i,k))
2358 dz(i,k) = rovg * (prsln(k+1) - prsln(k)) * tvly(i,k)
2360 dz(i,1) = 2.0 * dz(i,1)
2364 hz(i,k) = hz(i,k+1) + dz(i,k)
2388 & ( prsi,prsl,prslk,tvly,rhlay,dz,hz,tracer, &
2389 & alon,alat,slmsk, laersw,laerlw, &
2393 & aerosw,aerolw,aerodp &
2438 & ( alon,alat,prslk,rhlay,dz,hz,
nswlwbd, &
2439 & prsl,tvly,tracer, &
2440 & imax,nlay,nlp1,
ivflip, lsswr,lslwr, &
2473 if ( alat(i) > 46.0 )
then
2475 else if ( alat(i) > 44.0 )
then
2476 volcae(i) = 5.0e-5 &
2478 else if ( alat(i) > 1.0 )
then
2480 else if ( alat(i) > -1.0 )
then
2481 volcae(i) = 5.0e-5 &
2483 else if ( alat(i) >-44.0 )
then
2485 else if ( alat(i) >-46.0 )
then
2486 volcae(i) = 5.0e-5 &
2499 tmp1 = abs( alat(i) )
2500 if ( tmp1 > 70.0 )
then
2502 elseif ( tmp1 < 20.0 )
then
2505 psrfl = 110.0 + 2.0*tmp1
2510 rdelp(i) = f_one / prsi(i,2)
2512 lab_do_kcuth0 :
do k = 2, nlay-2
2513 if ( prsi(i,k) >= psrfh )
then
2519 lab_do_kcutl0 :
do k = 2, nlay-2
2520 if ( prsi(i,k) >= psrfl )
then
2522 rdelp(i) = f_one / (prsi(i,k) - prsi(i,kcuth(i)))
2534 if ( wvnsw1(mb) > 20000 )
then
2536 elseif ( wvnsw2(mb) < 20000 )
then
2541 tmp1 = (0.275e-4 * (wvnsw2(mb)+wvnsw1(mb))) ** tmp2
2547 tmp2 = tmp1 * ((prsi(i,k+1) - prsi(i,k)) * rdelp(i))
2548 aerosw(i,k,m,1) = aerosw(i,k,m,1) + tmp2*volcae(i)
2553 if ( aerosw(i,kl,m,1) > 10.*aerosw(i,kl+1,m,1) )
then
2554 tmp2 = aerosw(i,kl,m,1) + aerosw(i,kl+1,m,1)
2555 aerosw(i,kl ,m,1) = 0.8 * tmp2
2556 aerosw(i,kl+1,m,1) = 0.2 * tmp2
2580 tmp1 = (0.55 / 11.0) ** 1.2
2585 tmp2 = tmp1 * ((prsi(i,k+1) - prsi(i,k)) * rdelp(i)) &
2588 aerolw(i,k,m,1) = aerolw(i,k,m,1) + tmp2
2596 tmp1 = (0.275e-4 * (wvnlw2(m) + wvnlw1(m))) ** 1.2
2602 tmp2 = tmp1 * ((prsi(i,k+1)-prsi(i,k)) * rdelp(i))
2603 aerolw(i,k,m,1) = aerolw(i,k,m,1) + tmp2*volcae(i)
2617 tmp1 = abs( alat(i) )
2618 if ( tmp1 > 70.0 )
then
2620 elseif ( tmp1 < 20.0 )
then
2623 psrfl = 110.0 + 2.0*tmp1
2628 rdelp(i) = f_one / prsi(i,nlay-1)
2630 lab_do_kcuth1 :
do k = nlay-1, 2, -1
2631 if ( prsi(i,k) >= psrfh )
then
2637 lab_do_kcutl1 :
do k = nlay, 2, -1
2638 if ( prsi(i,k) >= psrfl )
then
2640 rdelp(i) = f_one / (prsi(i,k) - prsi(i,kcuth(i)+1))
2652 if ( wvnsw1(mb) > 20000 )
then
2654 elseif ( wvnsw2(mb) < 20000 )
then
2659 tmp1 = (0.275e-4 * (wvnsw2(mb)+wvnsw1(mb))) ** tmp2
2665 tmp2 = tmp1 * ((prsi(i,k) - prsi(i,k+1)) * rdelp(i))
2666 aerosw(i,k,m,1) = aerosw(i,k,m,1) + tmp2*volcae(i)
2671 if ( aerosw(i,kl,m,1) > 10.*aerosw(i,kl-1,m,1) )
then
2672 tmp2 = aerosw(i,kl,m,1) + aerosw(i,kl-1,m,1)
2673 aerosw(i,kl ,m,1) = 0.8 * tmp2
2674 aerosw(i,kl-1,m,1) = 0.2 * tmp2
2697 tmp1 = (0.55 / 11.0) ** 1.2
2702 tmp2 = tmp1 * ((prsi(i,k) - prsi(i,k+1)) * rdelp(i)) &
2705 aerolw(i,k,m,1) = aerolw(i,k,m,1) + tmp2
2713 tmp1 = (0.275e-4 * (wvnlw2(m) + wvnlw1(m))) ** 1.2
2719 tmp2 = tmp1 * ((prsi(i,k)-prsi(i,k+1)) * rdelp(i))
2720 aerolw(i,k,m,1) = aerolw(i,k,m,1) + tmp2*volcae(i)
2769 & ( prsi,prsl,prslk,tvly,rhlay,dz,hz,tracer, &
2770 & alon,alat,slmsk, laersw,laerlw, &
2772 & aerosw,aerolw,aerodp &
2837 integer,
intent(in) :: IMAX, NLAY, NLP1
2839 logical,
intent(in) :: laersw, laerlw
2841 real (kind=kind_phys),
dimension(:,:),
intent(in) :: prsi, prsl, &
2842 & prslk, tvly, rhlay, dz, hz
2843 real (kind=kind_phys),
dimension(:),
intent(in) :: alon, alat, &
2845 real (kind=kind_phys),
dimension(:,:,:),
intent(in):: tracer
2848 real (kind=kind_phys),
dimension(:,:,:,:),
intent(out) :: &
2850 real (kind=kind_phys),
dimension(:,:) ,
intent(out) :: aerodp
2853 real (kind=kind_phys),
dimension(NCM) :: cmix
2854 real (kind=kind_phys),
dimension( 2) :: denn
2855 real (kind=kind_phys),
dimension(NSPC) :: spcodp
2857 real (kind=kind_phys),
dimension(NLAY) :: delz, rh1, dz1
2858 integer,
dimension(NLAY) :: idmaer
2860 real (kind=kind_phys),
dimension(NLAY,NSWLWBD):: tauae,ssaae,asyae
2863 real (kind=kind_phys) :: tmp1, tmp2, rps, dtmp, h1
2864 real (kind=kind_phys) :: wi, wj, w11, w12, w21, w22
2866 integer :: i, ii, i1, i2, i3, j1, j2, j3, k, m, m1, &
2870 real (kind=kind_phys),
parameter :: dltg = 360.0 / float(
imxae)
2871 real (kind=kind_phys),
parameter :: hdlt = 0.5 * dltg
2872 real (kind=kind_phys),
parameter :: rdlt = 1.0 / dltg
2886 lab_do_imax :
do i = 1, imax
2892 lab_do_imxae :
do while ( i3 <=
imxae )
2893 tmp1 = dltg * (i3 - 1)
2894 dtmp = alon(i) - tmp1
2897 if ( dtmp > dltg )
then
2899 if ( i3 >
imxae )
then
2900 print *,
' ERROR! In setclimaer alon>360. ipt =',i, &
2901 &
', dltg,alon,tlon,dlon =',dltg,alon(i),tmp1,dtmp
2904 elseif ( dtmp >= f_zero )
then
2906 i2 = mod(i3,
imxae) + 1
2908 if ( dtmp <= hdlt )
then
2918 print *,
' ERROR! In setclimaer alon< 0. ipt =',i, &
2919 &
', dltg,alon,tlon,dlon =',dltg,alon(i),tmp1,dtmp
2929 lab_do_jmxae :
do while ( j3 <=
jmxae )
2930 tmp2 = 90.0 - dltg * (j3 - 1)
2931 dtmp = tmp2 - alat(i)
2934 if ( dtmp > dltg )
then
2936 if ( j3 >=
jmxae )
then
2937 print *,
' ERROR! In setclimaer alat<-90. ipt =',i, &
2938 &
', dltg,alat,tlat,dlat =',dltg,alat(i),tmp2,dtmp
2941 elseif ( dtmp >= f_zero )
then
2945 if ( dtmp <= hdlt )
then
2955 print *,
' ERROR! In setclimaer alat>90. ipt =',i, &
2956 &
', dltg,alat,tlat,dlat =',dltg,alat(i),tmp2,dtmp
2971 if ( kp /= kpa )
then
2972 if ( kpa == 6 )
then
2974 if ( slmsk(i) > f_zero )
then
2981 elseif ( kpa == 7 )
then
2983 if ( slmsk(i) <= f_zero )
then
2999 w11 = (f_one-wi) * (f_one-wj)
3000 w12 = (f_one-wi) * wj
3001 w21 = wi * (f_one-wj)
3016 denn(m) = w11*
denng(m,i1,j1) + w12*
denng(m,i1,j2) &
3026 cmix(ii) = cmix(ii) + w11*
cmixg(m,i1,j1)
3030 cmix(ii) = cmix(ii) + w12*
cmixg(m,i1,j2)
3034 cmix(ii) = cmix(ii) + w21*
cmixg(m,i2,j1)
3038 cmix(ii) = cmix(ii) + w22*
cmixg(m,i2,j2)
3054 lab_if_flip :
if (
ivflip == 1)
then
3056 if ( prsi(i,1) > 100.0 )
then
3057 rps = f_one / prsi(i,1)
3059 print *,
' !!! (1) Error in subr radiation_aerosols:', &
3060 &
' unrealistic surface pressure =', i,prsi(i,1)
3066 if (prsi(i,k+1)*rps <
sigref(ii,kp))
then
3080 if (tmp1 > f_zero)
then
3082 delz(k) = tmp1 * (exp(-hz(i,k)*tmp2)-exp(-hz(i,k+1)*tmp2))
3090 if ( prsi(i,nlp1) > 100.0 )
then
3091 rps = 1.0 / prsi(i,nlp1)
3093 print *,
' !!! (2) Error in subr radiation_aerosols:', &
3094 &
' unrealistic surface pressure =', i,prsi(i,nlp1)
3099 if (prsi(i,k)*rps <
sigref(ii,kp))
then
3113 if (tmp1 > f_zero)
then
3115 delz(k) = tmp1 * (exp(-hz(i,k+1)*tmp2)-exp(-hz(i,k)*tmp2))
3142 aerosw(i,k,m,1) = tauae(k,m)
3143 aerosw(i,k,m,2) = ssaae(k,m)
3144 aerosw(i,k,m,3) = asyae(k,m)
3150 aerodp(i,1) = aerodp(i,1) + tauae(k,
nv_aod)
3156 aerodp(i,m+1) = spcodp(m)
3168 aerolw(i,k,m,1) = tauae(k,m1)
3169 aerolw(i,k,m,2) = ssaae(k,m1)
3170 aerolw(i,k,m,3) = asyae(k,m1)
3177 aerolw(i,k,m,1) = tauae(k,m1)
3178 aerolw(i,k,m,2) = ssaae(k,m1)
3179 aerolw(i,k,m,3) = asyae(k,m1)
3229 real (kind=kind_phys) :: crt1, crt2
3230 parameter(crt1=30.0, crt2=0.03333)
3236 real (kind=kind_phys) :: cm, hd, hdi, sig0u, sig0l, ratio, tt0, &
3237 & ex00, sc00, ss00, as00, ex01, sc01, ss01, as01, tt1, &
3238 & ex02, sc02, ss02, as02, ex03, sc03, ss03, as03, tt2, &
3239 & ext1, sca1, ssa1, asy1, drh0, drh1, rdrh
3241 integer :: ih1, ih2, kk, idom, icmp, ib, ii, ic, ic1
3250 lab_do_layer :
do kk = 1, nlay
3255 do while ( rh1(kk) >
rhlev(ih2) )
3259 ih1 = max( 1, ih2-1 )
3263 drh1 = rh1(kk) -
rhlev(ih1)
3264 if ( ih1 == ih2 )
then
3274 lab_if_idom :
if (idom == 5)
then
3278 tauae(kk,ib) = f_zero
3281 asyae(kk,ib) = 0.696
3288 elseif (idom == 4)
then lab_if_idom
3292 tauae(kk,ib) = extstra(ib) * delz(kk)
3295 asyae(kk,ib) = 0.696
3304 spcodp(idx) = spcodp(idx) + tauae(kk,
nv_aod)
3306 elseif (idom == 3)
then lab_if_idom
3321 ex03 = extrhd(ih1,1,ib) &
3322 & + rdrh * (extrhd(ih2,1,ib) - extrhd(ih1,1,ib))
3323 sc03 = scarhd(ih1,1,ib) &
3324 & + rdrh * (scarhd(ih2,1,ib) - scarhd(ih1,1,ib))
3325 ss03 = ssarhd(ih1,1,ib) &
3326 & + rdrh * (ssarhd(ih2,1,ib) - ssarhd(ih1,1,ib))
3327 as03 = asyrhd(ih1,1,ib) &
3328 & + rdrh * (asyrhd(ih2,1,ib) - asyrhd(ih1,1,ib))
3330 ext1 = 0.17e-3*ex01 + 0.4*ex02 + 0.59983*ex03
3331 sca1 = 0.17e-3*sc01 + 0.4*sc02 + 0.59983*sc03
3332 ssa1 = 0.17e-3*ss01*ex01 + 0.4*ss02*ex02 + 0.59983*ss03*ex03
3333 asy1 = 0.17e-3*as01*sc01 + 0.4*as02*sc02 + 0.59983*as03*sc03
3335 tauae(kk,ib) = ext1 * 730.0 * delz(kk)
3336 ssaae(kk,ib) = min(f_one, ssa1/ext1)
3337 asyae(kk,ib) = min(f_one, asy1/sca1)
3341 spcodp(1) = spcodp(1) + 0.17e-3*ex01*730.0*delz(kk)
3342 spcodp(2) = spcodp(2) + 0.4 *ex02*730.0*delz(kk)
3343 spcodp(3) = spcodp(3) + 0.59983*ex03*730.0*delz(kk)
3348 elseif (idom == 1)
then lab_if_idom
3351 lab_do_ib :
do ib = 1,
nswlwbd
3357 lab_do_icmp :
do icmp = 1, ncm
3362 lab_if_cm :
if ( cm > f_zero )
then
3364 lab_if_ic :
if ( ic <=
ncm1 )
then
3365 tt0 = cm * extrhi(ic,ib)
3367 sca1 = sca1 + cm * scarhi(ic,ib)
3368 ssa1 = ssa1 + cm * ssarhi(ic,ib) * extrhi(ic,ib)
3369 asy1 = asy1 + cm * asyrhi(ic,ib) * scarhi(ic,ib)
3373 ex00 = extrhd(ih1,ic1,ib) &
3374 & + rdrh * (extrhd(ih2,ic1,ib) - extrhd(ih1,ic1,ib))
3375 sc00 = scarhd(ih1,ic1,ib) &
3376 & + rdrh * (scarhd(ih2,ic1,ib) - scarhd(ih1,ic1,ib))
3377 ss00 = ssarhd(ih1,ic1,ib) &
3378 & + rdrh * (ssarhd(ih2,ic1,ib) - ssarhd(ih1,ic1,ib))
3379 as00 = asyrhd(ih1,ic1,ib) &
3380 & + rdrh * (asyrhd(ih2,ic1,ib) - asyrhd(ih1,ic1,ib))
3384 sca1 = sca1 + cm * sc00
3385 ssa1 = ssa1 + cm * ss00 * ex00
3386 asy1 = asy1 + cm * as00 * sc00
3391 spcodp(idx) = spcodp(idx) + tt0*denn(1)*delz(kk)
3397 tauae(kk,ib) = ext1 * denn(1) * delz(kk)
3398 ssaae(kk,ib) = min(f_one, ssa1/ext1)
3399 asyae(kk,ib) = min(f_one, asy1/sca1)
3402 elseif (idom == 2)
then lab_if_idom
3406 tauae(kk,ib) = extrhi(6,ib) * denn(2) * delz(kk)
3407 ssaae(kk,ib) = ssarhi(6,ib)
3408 asyae(kk,ib) = asyrhi(6,ib)
3412 spcodp(1) = spcodp(1) + tauae(kk,
nv_aod)
3418 tauae(kk,ib) = f_zero
3419 ssaae(kk,ib) = f_one
3420 asyae(kk,ib) = f_zero
3439 if ( tauae(kk,ib) > f_zero )
then
3440 ratio = tauae(kk-1,ib) / tauae(kk,ib)
3445 tt0 = tauae(kk,ib) + tauae(kk-1,ib)
3449 if ( ratio > crt1 )
then
3451 tauae(kk-1,ib) = tt2
3454 if ( ratio < crt2 )
then
3456 tauae(kk-1,ib) = tt1
3464 do kk = nlay-1, 1, -1
3465 if ( tauae(kk,ib) > f_zero )
then
3466 ratio = tauae(kk+1,ib) / tauae(kk,ib)
3471 tt0 = tauae(kk,ib) + tauae(kk+1,ib)
3475 if ( ratio > crt1 )
then
3477 tauae(kk+1,ib) = tt2
3480 if ( ratio < crt2 )
then
3482 tauae(kk+1,ib) = tt1
3594 integer,
intent(in) :: NWVTOT,NWVTIR,NBDSW,NLWBND,NSWLWBD,imon,me
3596 real (kind=kind_phys),
intent(in) :: raddt, fdaer
3598 real (kind=kind_phys),
intent(in) :: solfwv(:),soltot, eirfwv(:)
3604 real (kind=kind_phys),
dimension(NBDSW,KAERBND) :: solwaer
3605 real (kind=kind_phys),
dimension(NBDSW) :: solbnd
3606 real (kind=kind_phys),
dimension(NLWBND,KAERBND) :: eirwaer
3607 real (kind=kind_phys),
dimension(NLWBND) :: eirbnd
3608 real (kind=kind_phys) :: sumsol, sumir
3610 integer,
dimension(NBDSW) :: nv1, nv2
3611 integer,
dimension(NLWBND) :: nr1, nr2
3613 integer :: i, mb, ib, ii, iw, iw1, iw2
3679 solwaer(:,:) = f_zero
3686 iw1 = nint(wvnsw1(mb))
3687 iw2 = nint(wvnsw2(mb))
3691 if (10000./iw1 >= 0.55 .and. &
3692 & 10000./iw2 <= 0.55 )
then
3696 lab_swdowhile :
do while ( iw1 >
iendwv_grt(ii) )
3697 if ( ii ==
kaerbnd )
exit lab_swdowhile
3705 solbnd(ib) = solbnd(ib) + solfwv(iw)
3706 sumsol = sumsol + solfwv(iw)
3709 solwaer(ib,ii) = sumsol
3719 solwaer(ib,ii) = sumsol
3724 if((me==0) .and.
lckprnt) print *,
'RAD-nv1,nv2:', &
3727 & 10000./iw1, 10000./iw2
3731 if((me==0) .and.
lckprnt)
then
3733 iw1 = nint(wvnsw1(mb))
3734 iw2 = nint(wvnsw2(mb))
3735 print *,
'RAD-nv_aod:', &
3736 &
nv_aod, iw1, iw2, 10000./iw1, 10000./iw2
3743 eirwaer(:,:) = f_zero
3747 if ( nlwbnd == 1 )
then
3751 iw1 = nint(wvnlw1(ib))
3752 iw2 = nint(wvnlw2(ib))
3755 lab_lwdowhile :
do while ( iw1 >
iendwv_grt(ii) )
3756 if ( ii ==
kaerbnd )
exit lab_lwdowhile
3764 eirbnd(ib) = eirbnd(ib) + eirfwv(iw)
3765 sumir = sumir + eirfwv(iw)
3768 eirwaer(ib,ii) = sumir
3778 eirwaer(ib,ii) = sumir
3783 if(me==0 .and.
lckprnt) print *,
'RAD-nr1,nr2:', &
3786 & 10000./iw1, 10000./iw2
3796 print *,
'RAD -After optavg_grt, sw band info'
3799 print *,
'RAD -wvnsw1,wvnsw2: ',ib,wvnsw1(mb),wvnsw2(mb)
3800 print *,
'RAD -lamda1,lamda2: ',ib,10000./wvnsw1(mb), &
3805 print *,
'RAD -extrhd_grt:',i,rhlev_grt(i), &
3809 print *,
'RAD -After optavg_grt, lw band info'
3812 print *,
'RAD -wvnlw1,wvnlw2: ',ib,wvnlw1(ib),wvnlw2(ib)
3813 print *,
'RAD -lamda1,lamda2: ',ib,10000./wvnlw1(ib), &
3818 print *,
'RAD -extrhd_grt:',i,rhlev_grt(i), &
3875 real (kind=kind_phys),
intent(in) :: raddt, fdaer
3885 if( fdaer >= 99999. )
ctaer = f_one
3886 if((fdaer>0.).and.(fdaer<99999.))
ctaer=exp(-raddt/fdaer)
3889 print *,
'RAD -raddt, fdaer,ctaer: ', raddt, fdaer,
ctaer
3890 if (
ctaer == f_one )
then
3891 print *,
'LU -aerosol fields determined from fcst'
3892 elseif (
ctaer == f_zero)
then
3893 print *,
'LU -aerosol fields determined from clim'
3895 print *,
'LU -aerosol fields determined from fcst/clim'
3914 if ( gfs_phy_tracer%doing_GOCART )
then
3915 if ( gfs_phy_tracer%doing_DU )
then
3919 if ( gfs_phy_tracer%doing_SU )
then
3923 if ( gfs_phy_tracer%doing_SS )
then
3927 if ( gfs_phy_tracer%doing_OC )
then
3931 if ( gfs_phy_tracer%doing_BC )
then
3940 print *,
'ERROR: prognostic aerosols not found,abort',me
3946 print *,
'ERROR: prognostic aerosols option off, abort',me
3972 dm_indx%waso_phobic = -999
3973 dm_indx%soot_phobic = -999
3976 dm_indx%dust1 = -999
3981 dm_indx%waso_phobic = indxr + 1
3982 dm_indx%waso_philic = indxr + 2
3985 dm_indx%soot_phobic = indxr + 1
3986 dm_indx%soot_philic = indxr + 2
3989 dm_indx%ssam = indxr + 1
3990 dm_indx%sscm = indxr + 2
3993 dm_indx%suso = indxr + 1
3996 dm_indx%dust1 = indxr + 1
3997 dm_indx%dust2 = indxr + 2
3998 dm_indx%dust3 = indxr + 3
3999 dm_indx%dust4 = indxr + 4
4000 dm_indx%dust5 = indxr + 5
4003 print *,
'ERROR: aerosol species not supported, abort',me
4019 if ( gfs_phy_tracer%doing_OC )
then
4020 dmfcs_indx%ocphobic = trcindx(
'ocphobic', gfs_phy_tracer)
4021 dmfcs_indx%ocphilic = trcindx(
'ocphilic', gfs_phy_tracer)
4023 if ( gfs_phy_tracer%doing_BC )
then
4024 dmfcs_indx%bcphobic = trcindx(
'bcphobic', gfs_phy_tracer)
4025 dmfcs_indx%bcphilic = trcindx(
'bcphilic', gfs_phy_tracer)
4027 if ( gfs_phy_tracer%doing_SS )
then
4028 dmfcs_indx%ss001 = trcindx(
'ss001', gfs_phy_tracer)
4029 dmfcs_indx%ss002 = trcindx(
'ss002', gfs_phy_tracer)
4030 dmfcs_indx%ss003 = trcindx(
'ss003', gfs_phy_tracer)
4031 dmfcs_indx%ss004 = trcindx(
'ss004', gfs_phy_tracer)
4032 dmfcs_indx%ss005 = trcindx(
'ss005', gfs_phy_tracer)
4034 if ( gfs_phy_tracer%doing_SU )
then
4035 dmfcs_indx%so4 = trcindx(
'so4', gfs_phy_tracer)
4037 if ( gfs_phy_tracer%doing_DU )
then
4038 dmfcs_indx%du001 = trcindx(
'du001', gfs_phy_tracer)
4039 dmfcs_indx%du002 = trcindx(
'du002', gfs_phy_tracer)
4040 dmfcs_indx%du003 = trcindx(
'du003', gfs_phy_tracer)
4041 dmfcs_indx%du004 = trcindx(
'du004', gfs_phy_tracer)
4042 dmfcs_indx%du005 = trcindx(
'du005', gfs_phy_tracer)
4062 if ( tp /=
'DU' )
then
4074 if ( tp /=
'SS' )
then
4088 if( me == 0 .and.
lckprnt)
then
4090 print *,
'RAD -gridcomp :',
gridcomp(:)
4091 print *,
'RAD -NMXG:',
nmxg
4092 print *,
'RAD -dm_indx ===> '
4093 print *,
'RAD -aerspc: dust1=', dm_indx%dust1
4094 print *,
'RAD -aerspc: dust2=', dm_indx%dust2
4095 print *,
'RAD -aerspc: dust3=', dm_indx%dust3
4096 print *,
'RAD -aerspc: dust4=', dm_indx%dust4
4097 print *,
'RAD -aerspc: dust5=', dm_indx%dust5
4098 print *,
'RAD -aerspc: ssam=', dm_indx%ssam
4099 print *,
'RAD -aerspc: sscm=', dm_indx%sscm
4100 print *,
'RAD -aerspc: suso=', dm_indx%suso
4101 print *,
'RAD -aerspc: waso_phobic=',dm_indx%waso_phobic
4102 print *,
'RAD -aerspc: waso_philic=',dm_indx%waso_philic
4103 print *,
'RAD -aerspc: soot_phobic=',dm_indx%soot_phobic
4104 print *,
'RAD -aerspc: soot_philic=',dm_indx%soot_philic
4106 print *,
'RAD -KCM1 =',
kcm1
4107 print *,
'RAD -KCM2 =',
kcm2
4108 print *,
'RAD -KCM =',
kcm
4109 if (
kcm2 > 0 )
then
4110 print *,
'RAD -aerspc: issam=', issam
4111 print *,
'RAD -aerspc: isscm=', isscm
4112 print *,
'RAD -aerspc: isuso=', isuso
4113 print *,
'RAD -aerspc: iwaso=', iwaso
4114 print *,
'RAD -aerspc: isoot=',
isoot
4118 print *,
'RAD -dmfcs_indx ===> '
4119 print *,
'RAD -trc_du001=',dmfcs_indx%du001
4120 print *,
'RAD -trc_du002=',dmfcs_indx%du002
4121 print *,
'RAD -trc_du003=',dmfcs_indx%du003
4122 print *,
'RAD -trc_du004=',dmfcs_indx%du004
4123 print *,
'RAD -trc_du005=',dmfcs_indx%du005
4124 print *,
'RAD -trc_so4 =',dmfcs_indx%so4
4125 print *,
'RAD -trc_ocphobic=',dmfcs_indx%ocphobic
4126 print *,
'RAD -trc_ocphilic=',dmfcs_indx%ocphilic
4127 print *,
'RAD -trc_bcphobic=',dmfcs_indx%bcphobic
4128 print *,
'RAD -trc_bcphilic=',dmfcs_indx%bcphilic
4129 print *,
'RAD -trc_ss001=',dmfcs_indx%ss001
4130 print *,
'RAD -trc_ss002=',dmfcs_indx%ss002
4131 print *,
'RAD -trc_ss003=',dmfcs_indx%ss003
4132 print *,
'RAD -trc_ss004=',dmfcs_indx%ss004
4133 print *,
'RAD -trc_ss005=',dmfcs_indx%ss005
4177 INTEGER,
PARAMETER :: NP = 100, np2 = 2*np, nwave=100, &
4179 INTEGER :: NW, NS, nH, n_bin
4180 real (kind=kind_io8),
Dimension( NP2 ) :: Angle, Cos_Angle, &
4182 real (kind=kind_io8),
Dimension(n_p,nAero) :: RH, rm, reff
4183 real (kind=kind_io8),
Dimension(nWave,n_p,nAero) :: &
4185 real (kind=kind_io8),
Dimension(NP2,n_p,nWave,nAero) :: ph0
4186 real (kind=kind_io8) :: wavelength(nwave), density(naero), &
4187 & sigma(nAero), wave,n_fac,PI,t1,s1,g1
4188 CHARACTER(len=80) :: AerosolName(naero)
4189 INTEGER :: i, j, k, l, ij
4191 character :: aerosol_file*30
4192 logical :: file_exist
4193 integer :: indx_dust(8)
4195 data aerosol_file /
"NCEP_AEROSOL.bin"/
4196 data aerosolname/
' Dust ',
' Soot ',
' SUSO ',
' WASO ', &
4197 &
' SSAM ',
' SSCM '/
4203 data indx_dust/4, 8, 12, 18, 21, 24, 30, 36/
4223 inquire (file = aerosol_file, exist = file_exist)
4225 if ( file_exist )
then
4226 if(me==0 .and.
lckprnt) print *,
'RAD -open :',aerosol_file
4228 open (unit=niaercm,file=aerosol_file,status=
'OLD', &
4229 & action=
'read',form=
'UNFORMATTED')
4231 print *,
' Requested aerosol data file "',aerosol_file, &
4232 &
'" not found!', me
4233 print *,
' *** Stopped in subroutine RD_GOCART_LUTS !!'
4237 READ(niaercm) (cos_angle(i),i=1,np)
4238 READ(niaercm) (cos_weight(i),i=1,np)
4243 READ(niaercm) (wavelength(i),i=1,nw)
4247 print *,
"Incorrect spectral band, abort ", nw
4254 if(me==0 .and.
lckprnt) print *,
'RAD -wn,lamda:', &
4259 if(me==0 .and.
lckprnt) print *,
'RAD -read LUTs:', &
4263 READ(niaercm) n_bin, density(j), sigma(j)
4265 READ(niaercm) (rh(i,j),i=1, n_bin)
4267 READ(niaercm) (rm(i,j),i=1, n_bin)
4269 READ(niaercm) (reff(i,j),i=1, n_bin)
4272 if (n_bin /=
krhlev )
then
4273 print *,
"Incorrect rh levels, abort ", n_bin
4279 READ(niaercm) wave,(ext0(k,l,j),l=1,n_bin)
4280 READ(niaercm) (sca0(k,l,j),l=1,n_bin)
4281 READ(niaercm) (asy0(k,l,j),l=1,n_bin)
4282 READ(niaercm) (ph0(1:np2,l,k,j),l=1,n_bin)
4286 if (aerosolname(j) ==
' Dust ' )
then
4296 if (aerosolname(j) ==
' Soot ') ij =
isoot
4297 if (aerosolname(j) ==
' SUSO ') ij = isuso
4298 if (aerosolname(j) ==
' WASO ') ij = iwaso
4299 if (aerosolname(j) ==
' SSAM ') ij = issam
4300 if (aerosolname(j) ==
' SSCM ') ij = isscm
4301 if ( ij .ne. -999 )
then
4366 real (kind=kind_phys) :: sumk, sumok, sumokg, sumreft, &
4367 & sp, refb, reft, rsolbd, rirbd
4369 integer :: ib, nb, ni, nh, nc
4388 rsolbd = f_one / solbnd(nb)
4392 lab_rhi:
if (
kcm1 > 0 )
then
4399 do ni = nv1(nb), nv2(nb)
4402 reft = (f_one - sp) / (f_one + sp)
4403 sumreft = sumreft + reft*solwaer(nb,ni)
4412 refb = sumreft * rsolbd
4415 asyrhi_grt(nc,nb) = sumokg / (sumok + 1.0e-10)
4417 & / ( (f_one+refb)**2 -
asyrhi_grt(nc,nb)*(f_one-refb)**2 )
4424 lab_rhd:
if (
kcm2 > 0 )
then
4432 do ni = nv1(nb), nv2(nb)
4435 reft = (f_one - sp) / (f_one + sp)
4436 sumreft = sumreft + reft*solwaer(nb,ni)
4439 sumok = sumok +
rhdpssa0_grt(ni,nh,nc)*solwaer(nb,ni) &
4441 sumokg = sumokg +
rhdpssa0_grt(ni,nh,nc)*solwaer(nb,ni) &
4445 refb = sumreft * rsolbd
4448 asyrhd_grt(nh,nc,nb) = sumokg / (sumok + 1.0e-10)
4450 & /((f_one+refb)**2 -
asyrhd_grt(nh,nc,nb)*(f_one-refb)**2)
4462 rirbd = f_one / eirbnd(nb)
4466 lab_rhi_lw:
if (
kcm1 > 0 )
then
4473 do ni = nr1(nb), nr2(nb)
4476 reft = (f_one - sp) / (f_one + sp)
4477 sumreft = sumreft + reft*eirwaer(nb,ni)
4486 refb = sumreft * rirbd
4489 asyrhi_grt(nc,ib) = sumokg / (sumok + 1.0e-10)
4491 & / ( (f_one+refb)**2 -
asyrhi_grt(nc,ib)*(f_one-refb)**2 )
4497 lab_rhd_lw:
if (
kcm2 > 0 )
then
4505 do ni = nr1(nb), nr2(nb)
4508 reft = (f_one - sp) / (f_one + sp)
4509 sumreft = sumreft + reft*eirwaer(nb,ni)
4512 sumok = sumok +
rhdpssa0_grt(ni,nh,nc)*eirwaer(nb,ni) &
4514 sumokg = sumokg+
rhdpssa0_grt(ni,nh,nc)*eirwaer(nb,ni) &
4518 refb = sumreft * rirbd
4521 asyrhd_grt(nh,nc,ib) = sumokg / (sumok + 1.0e-10)
4523 & /((f_one+refb)**2 -
asyrhd_grt(nh,nc,ib)*(f_one-refb)**2 )
4581 integer,
parameter :: MAXSPC = 5
4582 real (kind=kind_io4),
parameter :: PINT = 0.01
4583 real (kind=kind_io4),
parameter :: EPSQ = 0.0
4585 integer :: i, j, k, numspci, ii
4586 integer :: icmp, nrecl, nt1, nt2, nn(maxspc)
4587 character :: ymd*6, yr*4, mn*2, tp*2, &
4588 & fname*30, fin*30, aerosol_file*40
4589 logical :: file_exist
4591 real (kind=kind_io4),
dimension(KMXG) :: sig
4592 real (kind=kind_io4),
dimension(IMXG,JMXG) :: ps
4593 real (kind=kind_io4),
dimension(IMXG,JMXG,KMXG) :: temp
4594 real (kind=kind_io4),
dimension(IMXG,JMXG,KMXG,MAXSPC):: buff
4595 real (kind=kind_phys) :: pstmp
4598 real (kind=kind_io4),
dimension(KMXG):: hyam, hybm
4599 real (kind=kind_io4) :: p0
4606 & 9.98547e-01,9.94147e-01,9.86350e-01,9.74300e-01,9.56950e-01, &
4607 & 9.33150e-01,9.01750e-01,8.61500e-01,8.11000e-01,7.50600e-01, &
4608 & 6.82900e-01,6.10850e-01,5.37050e-01,4.63900e-01,3.93650e-01, &
4609 & 3.28275e-01,2.69500e-01,2.18295e-01,1.74820e-01,1.38840e-01, &
4610 & 1.09790e-01,8.66900e-02,6.84150e-02,5.39800e-02,4.25750e-02, &
4611 & 3.35700e-02,2.39900e-02,1.36775e-02,5.01750e-03,5.30000e-04 /
4616 & 0, 0.0062694, 0.02377049, 0.05011813, 0.08278809, 0.1186361, &
4617 & 0.1540329, 0.1836373, 0.2043698, 0.2167788, 0.221193, &
4618 & 0.217729, 0.2062951, 0.1865887, 0.1615213, 0.1372958, &
4619 & 0.1167039, 0.09920014, 0.08432171, 0.06656809, 0.04765031, &
4620 & 0.03382346, 0.0237648, 0.01435208, 0.00659734, 0.002826232, &
4621 & 0.001118959, 0.0004086494, 0.0001368611, 3.750308e-05/
4624 & 0.992555, 0.9642, 0.90556, 0.816375, 0.703815, 0.576585, &
4625 & 0.44445, 0.324385, 0.226815, 0.149165, 0.089375, &
4626 & 0.045865, 0.017485, 0.00348, 0, 0, 0, 0, 0, &
4627 & 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /
4634 if ( .not.
allocated (
dmclmg) )
then
4645 if ( .not.
allocated (
geos_rlon ))
then
4667 aerosol_file =
'200001.PS.avg'
4668 inquire (file = aerosol_file, exist = file_exist)
4671 aerosol_file =
'gocart_climo_2000x2007_ps_01.bin'
4672 inquire (file = aerosol_file, exist = file_exist)
4679 write(mn,
'(i2.2)') imon
4681 aerosol_file =
'null'
4683 aerosol_file = ymd//
'.PS.avg'
4685 aerosol_file =
'gocart_climo_2000x2007_ps_'//mn//
'.bin'
4688 inquire (file = aerosol_file, exist = file_exist)
4689 lab_if_ps :
if ( file_exist )
then
4694 open(niaercm, file=trim(aerosol_file), &
4695 & action=
'read',access=
'direct',recl=nrecl)
4696 read(niaercm, rec=1) ps
4700 pstmp = pint + sig(k) * (ps(i,j) - pint)
4701 psclmg(i,j,k) = 0.1 * pstmp
4707 open(niaercm, file=trim(aerosol_file), &
4708 & action=
'read',status=
'old', form=
'unformatted')
4709 read(niaercm) ps(:,:)
4713 pstmp = hyam(k)*p0 + hybm(k)*ps(i,j)
4714 psclmg(i,j,k) = 0.1 * pstmp
4723 print *,
' *** Requested aerosol data file "', &
4724 & trim(aerosol_file),
'" not found!'
4725 print *,
' *** Stopped in RD_GOCART_CLIM ! ', me
4736 aerosol_file =
'null'
4738 if(tp ==
'DU') fname=
'.DU.STD.tv20.g.avg'
4739 if(tp ==
'SS') fname=
'.SS.STD.tv17.g.avg'
4740 if(tp ==
'SU') fname=
'.SU.STD.tv15.g.avg'
4741 if(tp ==
'OC') fname=
'.CC.STD.tv15.g.avg'
4742 if(tp ==
'BC') fname=
'.CC.STD.tv15.g.avg'
4743 aerosol_file=ymd//trim(fname)
4745 fin =
'gocart_climo_2000x2007_'
4746 if(tp ==
'DU') fname=trim(fin)//
'du_'
4747 if(tp ==
'SS') fname=trim(fin)//
'ss_'
4748 if(tp ==
'SU') fname=trim(fin)//
'su_'
4749 if(tp ==
'OC') fname=trim(fin)//
'cc_'
4750 if(tp ==
'BC') fname=trim(fin)//
'cc_'
4751 aerosol_file=trim(fname)//mn//
'.bin'
4755 if(tp ==
'DU') numspci = 5
4756 inquire (file=trim(aerosol_file), exist = file_exist)
4757 lab_if_aer:
if ( file_exist )
then
4762 open (niaercm, file=trim(aerosol_file), &
4763 & action=
'read',access=
'direct', recl=nrecl)
4764 read(niaercm,rec=1)(nt1,nt2,nn(i),buff(:,:,:,i),i=1,numspci)
4767 open (niaercm, file=trim(aerosol_file), &
4768 & action=
'read',status=
'old', form=
'unformatted')
4771 read(niaercm) temp(:,:,k)
4772 buff(:,:,k,i) = temp(:,:,k)
4782 if ( dm_indx%dust1 /= -999)
then
4784 dmclmg(:,:,:,dm_indx%dust1+ii-1) = buff(:,:,:,ii)
4787 print *,
'ERROR: invalid DU index, abort! ',me
4793 if ( dm_indx%soot_phobic /= -999)
then
4794 dmclmg(:,:,:,dm_indx%soot_phobic)=buff(:,:,:,1)
4795 dmclmg(:,:,:,dm_indx%soot_philic)=buff(:,:,:,3)
4796 molwgt(dm_indx%soot_phobic) = 12.
4797 molwgt(dm_indx%soot_philic) = 12.
4799 print *,
'ERROR: invalid BC index, abort! ',me
4805 if ( dm_indx%suso /= -999)
then
4806 dmclmg(:,:,:,dm_indx%suso) = buff(:,:,:,3)
4807 molwgt(dm_indx%suso) = 96.
4809 print *,
'ERROR: invalid SU index, abort! ',me
4815 if ( dm_indx%waso_phobic /= -999)
then
4816 dmclmg(:,:,:,dm_indx%waso_phobic) = 1.4*buff(:,:,:,2)
4817 dmclmg(:,:,:,dm_indx%waso_philic) = 1.4*buff(:,:,:,4)
4818 molwgt(dm_indx%waso_phobic) = 12.
4819 molwgt(dm_indx%waso_philic) = 12.
4821 print *,
'ERROR: invalid OC index, abort! ',me
4827 if ( dm_indx%ssam /= -999)
then
4828 dmclmg(:,:,:,dm_indx%ssam) = buff(:,:,:,1)
4829 dmclmg(:,:,:,dm_indx%sscm) = buff(:,:,:,2) + &
4830 & buff(:,:,:,3)+buff(:,:,:,4)
4832 print *,
'ERROR: invalid SS index, abort! ',me
4838 print *,
'ERROR: invalid aerosol species, abort ',tp
4844 print *,
' *** Requested aerosol data file "',aerosol_file, &
4846 print *,
' *** Stopped in RD_GOCART_CLIM ! ', me
4893 & ( alon,alat,prslk,rhlay,dz,hz,
nswlwbd, &
4894 & prsl,tvly,trcly, &
4895 & imax,nlay,nlp1,
ivflip, lsswr,lslwr, &
4952 integer,
intent(in) :: IMAX,NLAY,NLP1,ivflip,NSWLWBD
4953 logical,
intent(in) :: lsswr, lslwr
4955 real (kind=kind_phys),
dimension(:,:),
intent(in) :: prslk, &
4956 & prsl, rhlay, tvly, dz, hz
4957 real (kind=kind_phys),
dimension(:),
intent(in) :: alon, alat
4958 real (kind=kind_phys),
dimension(:,:,:),
intent(in) :: trcly
4961 real (kind=kind_phys),
dimension(:,:,:,:),
intent(out) :: &
4965 real (kind=kind_phys),
dimension(NLAY) :: rh1, dz1
4966 real (kind=kind_phys),
dimension(NLAY,NSWLWBD)::tauae,ssaae,asyae
4967 real (kind=kind_phys),
dimension(NLAY,max_num_gridcomp) :: &
4970 real (kind=kind_phys) :: tmp1, tmp2
4972 integer :: i, i1, i2, j1, j2, k, m, m1, kp
4975 real (kind=kind_phys),
dimension(:,:,:),
allocatable:: aermr,dmfcs
4978 real (kind=kind_phys),
dimension(:,:),
allocatable :: &
4979 & dmanl,dmclm, dmclmx
4980 real (kind=kind_phys),
dimension(KMXG) :: pstmp, pkstr
4981 real (kind=kind_phys) :: ptop, psfc, tem, plv, tv, rho
4984 real (kind=kind_phys),
parameter :: hdltx = 0.5 * dltx
4985 real (kind=kind_phys),
parameter :: hdlty = 0.5 * dlty
4989 if ( .not.
allocated(dmanl) )
then
4991 allocate ( dmanl(nlay,
nmxg) )
4992 allocate ( dmclm(nlay,
nmxg) )
4994 allocate ( aermr(imax,nlay,
nmxg) )
4995 allocate ( dmfcs(imax,nlay,
nmxg) )
5000 dmfcs(:,:,:) = f_zero
5010 lab_do_imax :
do i = 1, imax
5019 if (tmp1 > 180.) tmp1 = tmp1 - 360.0
5020 lab_do_imxg :
do i1 = 1,
imxg
5022 if (tmp2 > 180.) tmp2 = tmp2 - 360.0
5023 if (abs(tmp1-tmp2) <= hdltx)
then
5030 lab_do_jmxg :
do j1 = 1,
jmxg
5031 if (abs(alat(i)-
geos_rlat(j1)) <= hdlty)
then
5038 pstmp(:)=
psclmg(i2,j2,:)*1000.0
5039 dmclmx(:,:) =
dmclmg(i2,j2,:,:)
5042 pkstr(:)=fpkap(pstmp(:))
5050 if(ivflip==0) kp = nlay - k + 1
5054 if(tmp1 > pkstr(m1+1) .and. tmp1 <= pkstr(m1))
then
5055 tmp2 = f_one / (pkstr(m1)-pkstr(m1+1))
5056 tem = (pkstr(m1) - tmp1) * tmp2
5057 dmclm(kp,:) = tem * dmclmx(m1+1,:)+ &
5058 & (f_one-tem) * dmclmx(m1,:)
5078 plv = 100. * prsl(i,k)
5080 rho = plv / (
con_rd * tv)
5083 dmfcs(i,k,m) = max(1000.*(rho*aermr(i,k,m)),f_zero)
5088 dmclm(k,m)=1000.*dmclm(k,m)*rho
5089 if (
molwgt(m) /= 0. )
then
5098 dmanl(k,m)=
ctaer*dmfcs(i,k,m) + &
5099 & ( f_one-
ctaer)*dmclm(k,m)
5116 aerosw(i,k,m,1) = tauae(k,m)
5117 aerosw(i,k,m,2) = ssaae(k,m)
5118 aerosw(i,k,m,3) = asyae(k,m)
5124 aerosw(:,:,:,:) = f_zero
5138 aerolw(i,k,m,1) = tauae(k,m1)
5139 aerolw(i,k,m,2) = ssaae(k,m1)
5140 aerolw(i,k,m,3) = asyae(k,m1)
5147 aerolw(i,k,m,1) = tauae(k,m1)
5148 aerolw(i,k,m,2) = ssaae(k,m1)
5149 aerolw(i,k,m,3) = asyae(k,m1)
5156 aerolw(:,:,:,:) = f_zero
5202 integer :: i, indx, ii
5206 aermr(:,:,:) = f_zero
5210 if( gfs_phy_tracer%doing_DU )
then
5211 aermr(:,:,dm_indx%dust1) = trcly(:,:,dmfcs_indx%du001-ii)
5212 aermr(:,:,dm_indx%dust2) = trcly(:,:,dmfcs_indx%du002-ii)
5213 aermr(:,:,dm_indx%dust3) = trcly(:,:,dmfcs_indx%du003-ii)
5214 aermr(:,:,dm_indx%dust4) = trcly(:,:,dmfcs_indx%du004-ii)
5215 aermr(:,:,dm_indx%dust5) = trcly(:,:,dmfcs_indx%du005-ii)
5219 if( gfs_phy_tracer%doing_OC )
then
5220 aermr(:,:,dm_indx%waso_phobic) = &
5221 & trcly(:,:,dmfcs_indx%ocphobic-ii)
5222 aermr(:,:,dm_indx%waso_philic) = &
5223 & trcly(:,:,dmfcs_indx%ocphilic-ii)
5227 if( gfs_phy_tracer%doing_BC )
then
5228 aermr(:,:,dm_indx%soot_phobic) = &
5229 & trcly(:,:,dmfcs_indx%bcphobic-ii)
5230 aermr(:,:,dm_indx%soot_philic) = &
5231 & trcly(:,:,dmfcs_indx%bcphilic-ii)
5235 if( gfs_phy_tracer%doing_SS )
then
5236 aermr(:,:,dm_indx%ssam) = trcly(:,:,dmfcs_indx%ss001-ii) &
5237 & + trcly(:,:,dmfcs_indx%ss002-ii)
5238 aermr(:,:,dm_indx%sscm) = trcly(:,:,dmfcs_indx%ss003-ii) &
5239 & + trcly(:,:,dmfcs_indx%ss004-ii) &
5240 & + trcly(:,:,dmfcs_indx%ss005-ii)
5244 if( gfs_phy_tracer%doing_SU )
then
5245 aermr(:,:,dm_indx%suso) = trcly(:,:,dmfcs_indx%so4-ii)
5294 real (kind=kind_phys) :: aerdm
5295 real (kind=kind_phys) :: ext1, ssa1, asy1, ex00, ss00, as00, &
5296 & ex01, ss01, as01, exint
5297 real (kind=kind_phys) :: tau, ssa, asy, &
5298 & sum_tau, sum_ssa, sum_asy
5303 real (kind=kind_phys) :: fd(4)
5304 data fd / 0.01053,0.08421,0.25263,0.65263 /
5307 integer :: icmp, n, kk, ib, ih2, ih1, ii, ij, ijk
5308 real (kind=kind_phys) :: drh0, drh1, rdrh
5310 real (kind=kind_phys) :: qmin
5311 data qmin / 1.e-20 /
5320 tauae_gocart = f_zero
5324 lab_do_layer :
do kk = 1, nlay
5329 do while ( rh1(kk) > rhlev_grt(ih2) )
5333 ih1 = max( 1, ih2-1 )
5336 drh0 = rhlev_grt(ih2) - rhlev_grt(ih1)
5337 drh1 = rh1(kk) - rhlev_grt(ih1)
5338 if ( ih1 == ih2 )
then
5346 lab_do_ib :
do ib = 1, nswlwbd
5366 aerdm = dmanl(kk,dm_indx%dust1) * fd(n)
5368 aerdm = dmanl(kk,dm_indx%dust1+n-4 )
5371 if (aerdm < qmin) aerdm = f_zero
5372 ex00 =
extrhi_grt(n,ib)*(1000.*dz1(kk))*aerdm
5376 ssa1 = ssa1 + ex00 * ss00
5377 asy1 = asy1 + ex00 * ss00 * as00
5391 aerdm = dmanl(kk, dm_indx%suso)
5392 if (aerdm < qmin) aerdm = f_zero
5393 ex00 = exint*(1000.*dz1(kk))*aerdm
5396 asy1 = ex00 * ss00 * as00
5409 aerdm = dmanl(kk, dm_indx%ssam+n-1)
5410 if (aerdm < qmin) aerdm = f_zero
5411 ex00 = exint*(1000.*dz1(kk))*aerdm
5413 ssa1 = ssa1 + ex00 * ss00
5414 asy1 = asy1 + ex00 * ss00 * as00
5423 ii = dm_indx%waso_phobic
5426 ii = dm_indx%soot_phobic
5431 aerdm = dmanl(kk, ii)
5432 if (aerdm < qmin) aerdm = f_zero
5433 ex00 =
extrhd_grt(1,ij,ib)*(1000.*dz1(kk))*aerdm
5437 aerdm = dmanl(kk, ii+1)
5438 if (aerdm < qmin) aerdm = f_zero
5441 ex01 = exint*(1000.*dz1(kk))*aerdm
5448 ssa1 = (ex00 * ss00) + (ex01 * ss01)
5449 asy1 = (ex00 * ss00 * as00) + (ex01 * ss01 * as01)
5455 if (ext1 > f_zero) ssa=min(f_one,ssa1/ext1)
5456 if (ssa1 > f_zero) asy=min(f_one,asy1/ssa1)
5462 tauae_gocart(kk,ijk) = tau
5468 sum_tau = sum_tau + tau
5469 sum_ssa = sum_ssa + tau * ssa
5470 sum_asy = sum_asy + tau * ssa * asy
5476 tauae(kk,ib) = sum_tau
5477 if (sum_tau > f_zero) ssaae(kk,ib) = sum_ssa / sum_tau
5478 if (sum_ssa > f_zero) asyae(kk,ib) = sum_asy / sum_ssa
5499 end module module_radiation_aerosols
integer, parameter ndm
num of atmos aerosols domains
real(kind=kind_phys), dimension(:,:,:), allocatable, save extrhd_grt
extinction coefficient for SW+LW spectral band
integer, parameter, public nspc
num of species for output aod (opnl)
integer, save kcm2
num of rh dep aerosols (set in subr set_aerspc)
integer, save iaermdl
aerosol model scheme control flag =0:seasonal global distributed OPAC aerosol climatology =1:mont...
subroutine radclimaer
This subroutine computes aerosols optical properties in NSWLWBD bands. there are seven different vert...
real(kind=kind_phys), parameter con_pi
pi
real(kind=kind_phys), dimension(:,:,:), allocatable, save asyrhd_grt
asymmetry parameter for SW+LW band
integer, parameter, public nlwstr
starting band number in ir region
real(kind=kind_phys), dimension(:,:), allocatable, save extrhi_grt
extinction coefficient for SW+LW spectral band
logical, save lckprnt
logical parameter for gocart debug print control
real(kind=kind_phys), dimension(:,:), allocatable, save ssarhi_grt
single scattering albedo for SW+LW spectral band
real(kind=kind_phys), parameter con_g
gravity ( )
integer, save nswlwbd
total number of bands for sw+lw aerosols
logical, save lalwflg
LW aerosols effect control flag =.true.:aerosol effect is included in LW radiation =...
integer, parameter kmxg
num of vertical layers in geos dataset
integer kyrend
ending year of data in the input file
logical, save get_clim
option to get clim gocart aerosol field
integer, parameter nxc
num of max componets in a profile
integer, save iaerflg
aerosol effect control flag 3-digit flag 'abc': a-stratospheric volcanic aerols b-tropospheric ...
integer kyrsav
the year of data in use in the input file
real(kind=kind_phys), dimension(:), allocatable, save geos_rlat
geos-gocart latitude arrays
integer, parameter ncm2
num of rh dependent aeros species
real(kind=kind_phys), dimension(:,:,:), allocatable rhdpext0_grt
extinction coefficient
integer, parameter krhlev
num of rh levels for rh-dep components
integer, save isoot
index for rh dependent aerosol optical properties (2nd dimension for extrhd_grt, ssarhd_grt, and asyrhd_grt)
subroutine optavg
This subroutine computes mean aerosols optical properties over each SW radiation spectral band for ea...
subroutine aeropt_grt
This subroutine computes aerosols optical properties in NSWLWBD SW/LW bands. Aerosol distribution at ...
integer, parameter naerbnd
num of bands for clim aer data (opac)
integer, dimension(:), allocatable iendwv_grt
spectral band structure: ending wavenumber ( ) for each band
integer, save kcm1
num of rh indep aerosols (set in subr set_aerspc)
real(kind=kind_phys), dimension(:,:,:), allocatable, save psclmg
pressure in cb
subroutine clim_aerinit(solfwv, eirfwv, me )
This subroutine is the opac-climatology aerosol initialization program to set up necessary parameters...
real(kind=kind_phys), dimension(:), allocatable, save geos_rlon
geos-gocart longitude arrays
character *4, save gocart_climo
control flag for gocart climo data set: xxxx as default; ver3 for geos3; ver4 for geos4; 0000 for unk...
real(kind=kind_phys), dimension(:,:,:), allocatable rhdpssa0_grt
single scattering albedo
integer, parameter, public nf_aelw
num of output fields for LW rad
integer, parameter jmxae
num of lat-points in glb aeros data set
integer, dimension(nxc, imxae, jmxae), save idxcg
aeros component index
integer, parameter, public nwvsol
num of wvnum regions where solar flux is constant
integer, save num_gridcomp
number of aerosol grid components
logical, save get_fcst
option to get fcst gocart aerosol field
real(kind=kind_phys), parameter con_t0c
temp at 0C (K)
integer, dimension( imxae, jmxae), save kprfg
aeros profile index
real(kind=kind_phys), dimension(:,:), allocatable, save asyrhi_grt
asymmetry parameter for SW+LW spectral band
integer, parameter, public nwvtot
total num of wvnum included
integer, dimension(nwvsol), save nwvns0
number of wavenumbers in each region where the solar flux is constant
integer, parameter max_num_gridcomp
default full-package setting
real(kind=kind_phys), dimension(ndm, nae), save prsref
ref pressure lev (sfc to toa) in mb (100Pa)
subroutine gocart_init(NWVTOT, solfwv, soltot, NWVTIR, eirfwv, NBDSW, NLWBND, NSWLWBD, imon, me, raddt, fdaer )
The initialization program for gocart aerosols.
integer, parameter nrhlev
num of rh levels for rh-dep components
logical, parameter lalw1bd
selects 1 band or multi bands for LW aerosol properties =.true.:aerosol properties calculated in 1 ...
subroutine rd_gocart_clim
This subroutine:
integer, dimension(:,:,:), allocatable, save ivolae
monthly, 45-deg lat-zone aerosols data set in subroutine 'aer_init'
subroutine aer_property(prsi, prsl, prslk, tvly, rhlay, dz, hz, tracer, alon, alat, slmsk, laersw, laerlw, IMAX, NLAY, NLP1, aerosw, aerolw, aerodp )
This subroutine maps the 5 degree global climatological aerosol data set onto model grids...
subroutine, public aer_init(NLAY, me)
The initialization program is to set up necessary parameters and working arrays.
integer, parameter maxvyr
upper limit (year) data available
index for gocart aerosol species to be included in the calculations of aerosol optical properties (ex...
real(kind=kind_phys), parameter con_c
speed of light ( )
character, save aeros_file
external aerosols data file: aerosol.dat
integer, parameter nswstr
SW bands counter starting index (for compatibility with previous SW radiation schemes) ...
character *2, dimension(max_num_gridcomp) max_gridcomp
data max_gridcomp /'DU', 'BC', 'OC', 'SU', 'SS'/
This module is for specifying the band structures and program parameters used by the RRTMG-SW scheme...
real(kind=kind_phys), dimension(:,:,:), allocatable rhdpasy0_grt
asymmetry parameter
real(kind=kind_phys), dimension(:,:,:), allocatable, save ssarhd_grt
single scattering albedo for SW+LW band
real(kind=kind_phys), parameter con_plnk
planck constant ( )
integer, parameter kaerbnd
num of bands for aer data (gocart)
logical, save lgrtint
logical parameter for gocart initialization control
integer, parameter, public nf_aesw
num of output fields for SW rad
logical, save laswflg
SW aerosols effect control flag =.true.:aerosol effect is included in SW radiation =...
subroutine optavg_grt
This subroutine computes mean aerosols optical properties over each SW/LW radiation spectral band for...
subroutine trop_update
This subroutine updates the monthly global distribution of aerosol profiles in five degree horizontal...
subroutine set_volcaer
The initialization program for stratospheric volcanic aerosols.
real(kind=kind_phys), parameter wvn550
the wavenumber ( ) of wavelength 550nm for diagnostic aod output
real(kind=kind_phys), dimension(nwvsol), save s0intv
solar flux in each wvnumb region where it is constant
subroutine map_aermr
This subroutine maps input tracer fields (trcly) to local tracer array (aermr).
integer, parameter ncm1
num of rh independent aeros species
real(kind=kind_phys), parameter con_rd
gas constant air ( )
subroutine volc_update
This subroutine searches historical volcanic data sets to find and read in monthly 45-degree lat-zone...
This module contains LW band parameters set up.
integer, parameter, public nwvtir
total num of wvnum in ir range
integer, parameter imxae
num of lon-points in glb aeros data set
subroutine wrt_aerlog
This subroutine writes aerosol parameter configuration to run log file.
subroutine set_aercoef
The initialization program for climatological aerosols. The program reads and maps the pre-tabulated ...
subroutine setgocartaer(alon, alat, prslk, rhlay, dz, hz, NSWLWBD, prsl, tvly, trcly, IMAX, NLAY, NLP1, ivflip, lsswr, lslwr, aerosw, aerolw )
This subroutine computes SW + LW aerosol optical properties for gocart aerosol species (merged from f...
real(kind=kind_phys), dimension(:,:), allocatable rhidasy0_grt
asymmetry parameter
integer kmonsav
the month of data in use in the input file
integer, save nswbnd
number of actual bands for sw aerosols; calculated according to laswflg setting
real(kind=kind_phys), dimension(:,:), allocatable rhidssa0_grt
single scattering albedo
integer kyrstr
starting year of data in the input file
integer, save nv_aod
the sw spectral band covering wvn550 (comp in aer_init)
subroutine set_spectrum
This subroutine defines the one wavenumber solar fluxes based on toa solar spectral distribution...
integer, parameter imxg
num of lon-points in geos dataset
integer, save nmxg
to be determined by set_aerspc
integer, parameter, public nspc1
total+species
real(kind=kind_phys), dimension(ndm, nae), save sigref
ref sigma lev (sfc to toa)
real(kind=kind_phys), save ctaer
merging coefficients for fcst/clim; determined from fdaer
real(kind=kind_phys), dimension(nrhlev), save rhlev
predefined relative humidity levels
subroutine, public aer_update(iyear, imon, me)
This subroutine checks and updates time varying climatology aerosol data sets.
real(kind=kind_phys), dimension(nxc, imxae, jmxae), save cmixg
aeros component mixing ratio
integer, save nlwbnd
number of actual bands for lw aerosols; calculated according to lalwflg and lalw1bd settings ...
subroutine, public setaer(prsi, prsl, prslk, tvly, rhlay, slmsk, tracer, xlon, xlat, IMAX, NLAY, NLP1, lsswr, lslwr, aerosw, aerolw , aerodp )
This subroutine computes aerosols optical properties.
index for gocart aerosols from prognostic tracer fields
integer, save kcm
=KCM1+KCM2 (set in subr set_aerspc)
integer, dimension(ncm) idxspc
index conversion array:data idxspc / 1, 2, 1, 1, 1, 1, 3, 5, 5, 4 /
integer, save ivflip
vertical profile indexing flag
integer, parameter jmxg
num of lat-points in geos dataset
real(kind=kind_io4), dimension(:), allocatable molwgt
molecular wght of gocart aerosol species
real(kind=kind_phys), dimension(2,imxae, jmxae), save denng
aeros number density
subroutine rd_gocart_luts
This subroutine reads input gocart aerosol optical data from Mie code calculations.
real(kind=kind_phys), dimension(:,:,:,:), allocatable, save dmclmg
aerosol dry mass in g/m3 or aerosol mixing ration in mol/mol or Kg/Kg
real(kind=kind_phys), parameter con_boltz
boltzmann constant ( )
real(kind=kind_phys), dimension(:,:), allocatable rhidext0_grt
extinction coefficient
logical, save lavoflg
stratospheric volcanic aerosol effect flag =.true.:historical events of stratosphere volcanic aeros...
character, dimension(:), allocatable, save gridcomp
aerosol grid components
integer, parameter nae
num of aerosols profile structures
integer, parameter minvyr
lower limit (year) data available
subroutine set_aerspc(raddt, fdaer)
This subroutine determines merging coefficients ctaer; setup aerosol specification.
real(kind=kind_phys), parameter con_amd
molecular wght of dry air ( )
real(kind=kind_phys), dimension(ndm, nae), save haer
scale height of aerosols (km)