142 module module_radiation_aerosols
147 &, kind_io4, kind_io8
151 use module_iounitdef
, only : niaercm
153 & nswstr, wvnsw2=>wvnum2
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 '
171 integer,
parameter,
public :: nf_aesw = 3
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,
225 real (kind=kind_phys),
dimension(NWVSOL),
save ::
s0intv
249 data s0intv(101:151) / 7.12714e-2,
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,
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) )
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 '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
1380 mb = ib + nswstr - 1
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))
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
1637 do ni = nv1(nb), nv2(nb)
1638 sp = sqrt( (f_one - rhdpssa0(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
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))
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
1735 do ni = nr1(nb), nr2(nb)
1736 sp = sqrt( (f_one - rhdpssa0(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
1762 do ni = nr1(nb), nr2(nb)
1763 sumk = sumk + straext0(ni)*eirwaer(nb,ni)
1766 extstra(ib) = sumk * rirbd
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 '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 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 '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 "',
2127 print *,
' *** Stopped in subroutine VOLC_AERINIT !!'
2137 print *,
' CHECK: Sample Volcanic data used for month, year:',
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,
2393 & aerosw,aerolw,aerodp
2438 & ( alon,alat,prslk,rhlay,dz,hz,
nswlwbd,
2473 if ( alat(i) > 46.0 )
then
2475 else if ( alat(i) > 44.0 )
then
2478 else if ( alat(i) > 1.0 )
then
2480 else if ( alat(i) > -1.0 )
then
2483 else if ( alat(i) >-44.0 )
then
2485 else if ( alat(i) >-46.0 )
then
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)
2770 & alon,alat,slmsk, laersw,laerlw,
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,
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)
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)
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
3684 mb = ib + nswstr - 1
3686 iw1 = nint(wvnsw1(mb))
3687 iw2 = nint(wvnsw2(mb))
3691 if (10000./iw1 >= 0.55 .and.
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:',
3731 if((me==0) .and.
lckprnt)
then
3733 iw1 = nint(wvnsw1(mb))
3734 iw2 = nint(wvnsw2(mb))
3735 print *,
'RAD-nv_aod:',
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:',
3796 print *,
'RAD -After optavg_grt, sw band info'
3798 mb = ib + nswstr - 1
3799 print *,
'RAD -wvnsw1,wvnsw2: ',ib,wvnsw1(mb),wvnsw2(mb)
3800 print *,
'RAD -lamda1,lamda2: ',ib,10000./wvnsw1(mb),
3802 'RAD -extrhi_grt:', extrhi_grt(:,ib)
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),
3815 'RAD -extrhi_grt:', extrhi_grt(:,ii)
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 ',
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 'read',form=
'UNFORMATTED')
4231 print *,
' Requested aerosol data file "',aerosol_file,
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
4374 if (.not.
allocated(extrhd_grt) .and.
kcm2 > 0 )
then
4379 if (.not.
allocated(extrhi_grt) .and.
kcm1 > 0 )
then
4380 allocate ( extrhi_grt(
kcm1,nswlwbd) )
4381 allocate ( ssarhi_grt(
kcm1,nswlwbd) )
4382 allocate ( asyrhi_grt(
kcm1,nswlwbd) )
4388 rsolbd = f_one / solbnd(nb)
4392 lab_rhi:
if (
kcm1 > 0 )
then
4399 do ni = nv1(nb), nv2(nb)
4412 refb = sumreft * rsolbd
4414 extrhi_grt(nc,nb) = sumk * rsolbd
4415 asyrhi_grt(nc,nb) = sumokg / (sumok + 1.0e-10)
4416 ssarhi_grt(nc,nb) = 4.0*refb
4424 lab_rhd:
if (
kcm2 > 0 )
then
4432 do ni = nv1(nb), nv2(nb)
4445 refb = sumreft * rsolbd
4447 extrhd_grt(nh,nc,nb) = sumk * rsolbd
4448 asyrhd_grt(nh,nc,nb) = sumokg / (sumok + 1.0e-10)
4449 ssarhd_grt(nh,nc,nb) = 4.0*refb
4462 rirbd = f_one / eirbnd(nb)
4466 lab_rhi_lw:
if (
kcm1 > 0 )
then
4473 do ni = nr1(nb), nr2(nb)
4486 refb = sumreft * rirbd
4488 extrhi_grt(nc,ib) = sumk * rirbd
4489 asyrhi_grt(nc,ib) = sumokg / (sumok + 1.0e-10)
4490 ssarhi_grt(nc,ib) = 4.0*refb
4497 lab_rhd_lw:
if (
kcm2 > 0 )
then
4505 do ni = nr1(nb), nr2(nb)
4518 refb = sumreft * rirbd
4520 extrhd_grt(nh,nc,ib) = sumk * rirbd
4521 asyrhd_grt(nh,nc,ib) = sumokg / (sumok + 1.0e-10)
4522 ssarhd_grt(nh,nc,ib) = 4.0*refb
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
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 '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 '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 "',
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 '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 '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) +
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
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,:)+
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) +
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) =
5227 if( gfs_phy_tracer%doing_BC )
then
5228 aermr(:,:,dm_indx%soot_phobic) =
5235 if( gfs_phy_tracer%doing_SS )
then
5236 aermr(:,:,dm_indx%ssam) = trcly(:,:,dmfcs_indx%ss001-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
5373 ss00 = ssarhi_grt(n,ib)
5374 as00 = asyrhi_grt(n,ib)
5376 ssa1 = ssa1 + ex00 * ss00
5377 asy1 = asy1 + ex00 * ss00 * as00
5384 exint = extrhd_grt(ih1,ij,ib)
5392 if (aerdm < qmin) aerdm = f_zero
5393 ex00 = exint*(1000.*dz1(kk))*aerdm
5396 asy1 = ex00 * ss00 * as00
5402 exint = extrhd_grt(ih1,ij,ib)
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
5434 ss00 = ssarhd_grt(1,ij,ib)
5435 as00 = asyrhd_grt(1,ij,ib)
5437 aerdm = dmanl(kk, ii+1)
5438 if (aerdm < qmin) aerdm = f_zero
5439 exint = extrhd_grt(ih1,ij,ib)
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
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
subroutine radclimaer
This subroutine computes aerosols optical properties in NSWLWBD bands. there are seven different vert...
real(kind=kind_phys), parameter con_pi
pi
integer, parameter, public nlwstr
starting band number in ir region
logical, save lckprnt
logical parameter for gocart debug print control
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.
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
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
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
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 setgocartaer
This subroutine computes SW + LW aerosol optical properties for gocart aerosol species (merged from f...
integer, parameter nrhlev
num of rh levels for rh-dep components
logical, parameter lalw1bd
=t: use 1 broad-band LW aeros properties =f: use multi bands aeros properites
subroutine rd_gocart_clim
This subroutine:
integer, dimension(:,:,:), allocatable, save ivolae
monthly, 45-deg lat-zone aerosols data set in subroutine 'aer_init'
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
character *2, dimension(max_num_gridcomp) max_gridcomp
data max_gridcomp /'DU', 'BC', 'OC', 'SU', 'SS'/
This module contains SW band parameters set up.
real(kind=kind_phys), dimension(:,:,:), allocatable rhdpasy0_grt
asymmetry parameter
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
subroutine gocart_init
The initialization program for gocart aerosols.
logical, save laswflg
SW aerosols effect control flag.
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.
subroutine, public aer_init
The initialization program is to set up necessary parameters and working arrays.
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 ...
real(kind=kind_phys), dimension(:,:), allocatable rhidasy0_grt
asymmetry parameter
integer kmonsav
the month of data in use in the input file
subroutine, public setaer
This subroutine computes aerosols optical properties.
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 clim_aerinit
This subroutine is the opac-climatology aerosol initialization program to set up necessary parameters...
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)
subroutine aer_property
This subroutine maps the 5 degree global climatological aerosol data set onto model grids...
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
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 ...
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
subroutine, public aer_update
This subroutine checks and updates time varying climatology aerosol data sets.
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 effect flag
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)