58 SUBROUTINE swrad(dt,RTHRATEN,SDOWN3D,GSW,XLAT,XLONG,ALBEDO, &
59 rho_phy,T3D,P3D,pi3D,dz8w, &
61 QV3D,QC3D,QR3D,QI3D,QS3D,QG3D, &
62 F_QV,F_QC,F_QR,F_QI,F_QS,F_QG, &
75 real(DP),
INTENT(IN) :: dt
76 real(RP),
INTENT(INOUT) :: RTHRATEN(
ia,
ka,
ja)
77 real(RP),
INTENT(INOUT) :: SDOWN3D(
ia,
ka,
ja)
78 real(RP),
INTENT(INOUT) :: GSW(
ia,
ja)
80 real(RP),
INTENT(IN) :: XLAT(
ia,
ja), XLONG(
ia,
ja), ALBEDO(
ia,
ja)
81 real(RP),
INTENT(IN) :: rho_phy(
ia,
ka,
ja)
82 real(RP),
INTENT(IN) :: P3D(
ia,
ka,
ja), &
86 real(RP),
INTENT(IN) :: solins(
ia,
ja),cosSZA(
ia,
ja)
87 real(RP),
OPTIONAL,
INTENT(IN) :: QV3D (
ia,
ka,
ja), &
94 LOGICAL,
OPTIONAL,
INTENT(IN ) :: F_QV,F_QC,F_QR,F_QI,F_QS,F_QG
95 INTEGER,
INTENT(IN ) :: icloud
96 LOGICAL,
INTENT(IN ) :: warm_rain
101 integer :: its,ite,jts,jte,kts,kte
102 real(RP) :: R, CP, G, SOLCON
106 real(RP),
DIMENSION( KS:KE ) :: TTEN1D, &
118 real(RP) :: SDOWN1D(
ks:
ke+1)
120 real(RP) :: XLAT0,XLONG0,ALB0,GSW0,cosSZA0,solins0
121 real(RP) :: aer_dry1(
ks:
ke),aer_water1(
ks:
ke)
125 LOGICAL :: predicate , do_topo_shading
159 rho01d(k)=rho_phy(i,nk,j)
176 IF (
PRESENT(f_qv) .AND.
PRESENT(qv3d))
THEN 182 qv1d(k)=max(0.0_rp,qv1d(k))
187 IF (
PRESENT(f_qc) .AND.
PRESENT(qc3d))
THEN 193 qc1d(k)=max(0.0_rp,qc1d(k))
198 IF (
PRESENT(f_qr) .AND.
PRESENT(qr3d))
THEN 204 qr1d(k)=max(0.0_rp,qr1d(k))
210 IF (
PRESENT( f_qi ) )
THEN 216 IF ( predicate .AND.
PRESENT( qi3d ) )
THEN 221 qi1d(k)=max(0.0_rp,qi1d(k))
224 IF (.NOT. warm_rain)
THEN 226 IF(t1d(k) < 273.15)
THEN 236 IF (
PRESENT(f_qs) .AND.
PRESENT(qs3d))
THEN 242 qs1d(k)=max(0.0_rp,qs1d(k))
247 IF (
PRESENT(f_qg) .AND.
PRESENT(qg3d))
THEN 253 qg1d(k)=max(0.0_rp,qg1d(k))
264 CALL swpara(tten1d,sdown1d,gsw0,alb0,cossza0, &
265 t1d,qv1d,qc1d,qr1d,qi1d,qs1d,qg1d,p1d, &
269 icloud,aer_dry1,aer_water1, &
286 rthraten(i,k,j)=rthraten(i,k,j)+tten1d(nk)/pi3d(i,k,j)
287 sdown3d(i,k,j)=sdown1d(nk)
291 sdown3d(i,
ks-1,j)=sdown1d(
ke+1)
301 SUBROUTINE swpara(TTEN,SDOWN,GSW,ALBEDO,cosSZA, &
302 T,QV,QC,QR,QI,QS,QG,P, &
306 ICLOUD,aer_dry1,aer_water1, &
310 nowdate =>
time_nowdate !< current time [yyyy mm dd hh mm ss]
323 INTEGER,
INTENT(IN ) :: kts,kte
325 real(RP),
DIMENSION( kts:kte ),
INTENT(IN ) :: &
337 real(RP),
DIMENSION( kts:kte ),
INTENT(INOUT) :: TTEN
338 real(RP),
DIMENSION( kts:kte+1 ),
INTENT(OUT) :: SDOWN
340 real(RP),
INTENT(IN ) :: R,CP,G
341 real(RP),
INTENT(IN) :: ALBEDO,cosSZA,solins
342 integer ,
INTENT(IN) :: icloud
343 real(RP),
INTENT(INOUT) :: GSW
344 real(RP),
INTENT(IN ) :: XXLAT,XXLON
355 real(RP) :: XLWP( kts:kte )
356 real(RP) :: XATP( kts:kte )
357 real(RP) :: XWVP( kts:kte )
358 real(RP) :: aer_dry1( kts:kte )
359 real(RP) :: aer_water1( kts:kte )
360 real(RP) :: RO( kts:kte )
362 real(RP) :: ALBTAB(4,5), ABSTAB(4,5)
363 real(RP) :: XMUVAL(4)
366 real(RP) :: DayOfYear
369 DATA albtab/0.0,0.0,0.0,0.0, &
370 69.0,58.0,40.0,15.0, &
371 90.0,80.0,70.0,60.0, &
372 94.0,90.0,82.0,78.0, &
375 DATA abstab/0.0,0.0,0.0,0.0, &
381 DATA xmuval/0.0,0.2,0.5,1.0/
383 real(RP) :: bext340, absc, alba, alw, csza,dabsa,dsca,dabs
384 real(RP) :: bexth2o, dscld, ff,oldalb,oldabs,oldabc
385 real(RP) :: soltop, totabs, ugcm, uv,xabs,xabsa,wv
386 real(RP) :: wgm, xalb, xi, xsca, xmu,xabsc,trans0,yj
387 real(RP) :: HRANG,XT24,TLOCTM,tloc,dsec,lon,lat
390 INTEGER :: iil,ii,jjl,ju,k,iu
394 real(RP) :: diffuse_frac, corr_fac, csza_slp
412 tloc = mod((nowdate(4) + int(lon/15.0_rp)),24 )
413 dsec =
real(NOWDATE(5)*60 + NOWDATE(6)) / 60.0_RP /60.0_RP
414 tloctm =
real(NOWDATE(4)) + LON/15.0_RP + dsec
415 hrang = 15.*(tloctm-12.)*d2r
420 IF(csza <= 1.0e-9_rp)
GOTO 7
426 xwvp(k)=ro(k)*qv(k)*dz(k)*1000.
441 xlwp(k)=ro(k)*1000.*dz(k)*(qc(k)+0.1*qi(k)+0.05* &
442 qr(k)+0.02*qs(k)+0.05*qg(k))
449 sdown(kts)=soltop * max(cossza,0.0_rp)
476 totabs=2.9*ugcm/((1.+141.5*ugcm)**0.635+5.925*ugcm)
480 beta=0.4*(1.0-xmu)+0.1
482 xsca=(cssca*xatp(k)+beta*aer_dry1(k)*bext340*dz(k) &
483 +beta*aer_water1(k)*bexth2o*dz(k))/xmu
487 xabs=(totabs-oldabs)*(sdown(kts)-dscld-dsca-dabsa)/sdown(k)
492 alw=log10(wgm+1.0_rp)
493 IF(alw>3.999)alw=3.999_rp
496 IF(xmu>xmuval(ii))
THEN 499 xi=(xmu-xmuval(ii))/(xmuval(ii+1)-xmuval(ii))+
float(iil)
507 alba=(albtab(iu,ju)*(xi-iil)*(yj-jjl) &
508 +albtab(iil,ju)*(iu-xi)*(yj-jjl) &
509 +albtab(iu,jjl)*(xi-iil)*(ju-yj) &
510 +albtab(iil,jjl)*(iu-xi)*(ju-yj)) &
513 absc=(abstab(iu,ju)*(xi-iil)*(yj-jjl) &
514 +abstab(iil,ju)*(iu-xi)*(yj-jjl) &
515 +abstab(iu,jjl)*(xi-iil)*(ju-yj) &
516 +abstab(iil,jjl)*(iu-xi)*(ju-yj)) &
521 xalb=(alba-oldalb)*(sdown(kts)-dsca-dabs)/sdown(k)
522 xabsc=(absc-oldabc)*(sdown(kts)-dsca-dabs)/sdown(k)
525 dscld=dscld+(xalb+xabsc)*sdown(k)*0.01
526 dsca=dsca+xsca*sdown(k)
527 dabs=dabs+xabs*sdown(k)
528 dabsa=dabsa+xabsa*sdown(k)
532 trans0=100.0_rp-xalb-xabsc-xabs*100.0_rp-xsca*100.0_rp
534 ff=99.0_rp/(xalb+xabsc+xabs*100.0_rp+xsca*100.0_rp)
541 sdown(k+1)=max(1.0e-9_rp,sdown(k)*trans0*0.01_rp)
542 tten(k)=sdown(k)*(xabsc+xabs*100._rp+xabsa*100._rp)*0.01_rp/(ro(k)*cp*dz(k))
545 gsw=(1.-albedo)*sdown(kte+1)
608 LOGICAL :: allowed_to_read = .true.
609 real :: swrad_scat = 1
613 cssca = swrad_scat * 1.e-5
integer, public is
start point of inner domain: x, local
integer, public je
end point of inner domain: y, local
real(rp), public atmos_solarins_constant
subroutine swpara(TTEN, SDOWN, GSW, ALBEDO, cosSZA, T, QV, QC, QR, QI, QS, QG, P, RHO0, DZ, R, CP, G, solins, XXLAT, XXLON, ICLOUD, aer_dry1, aer_water1, kts, kte)
integer, public ke
end point of inner domain: z, local
real(rp), public const_d2r
degree to radian
integer, parameter, public i_lw
integer, parameter, public i_sw
integer, public ia
of x whole cells (local, with HALO)
integer, parameter, public i_dn
integer, public ka
of z whole cells (local, with HALO)
real(rp), public const_grav
standard acceleration of gravity [m/s2]
integer, public js
start point of inner domain: y, local
subroutine, public swinit
integer, public ks
start point of inner domain: z, local
subroutine, public swrad(dt, RTHRATEN, SDOWN3D, GSW, XLAT, XLONG, ALBEDO, rho_phy, T3D, P3D, pi3D, dz8w, solins, cosSZA, QV3D, QC3D, QR3D, QI3D, QS3D, QG3D, F_QV, F_QC, F_QR, F_QI, F_QS, F_QG, icloud, warm_rain)
integer, public ie
end point of inner domain: x, local
module ATMOSPHERE / Physics Radiation
integer, dimension(6), public time_nowdate
current time [YYYY MM DD HH MM SS]
module ATMOSPHERE / Physics Radiation
integer, parameter, public i_up
integer, public ja
of y whole cells (local, with HALO)