Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1023,6 +1023,7 @@ subroutine driver_radiation_sw(itimestep,configs,mesh,state,time_lev,diag_physic
swdnt = swdnt_p , swdntc = swdntc_p , swupb = swupb_p , &
swupbc = swupbc_p , swdnb = swdnb_p , swdnbc = swdnbc_p , &
swddir = swddir_p , swddni = swddni_p , swddif = swddif_p , &
julian = curr_julday , &
ids = ids , ide = ide , jds = jds , jde = jde , kds = kds , kde = kde , &
ims = ims , ime = ime , jms = jms , jme = jme , kms = kms , kme = kme , &
its = its , ite = ite , jts = jts , jte = jte , kts = kts , kte = kte &
Expand Down
13 changes: 10 additions & 3 deletions src/core_atmosphere/physics/physics_wrf/module_ra_rrtmg_sw.F
Original file line number Diff line number Diff line change
Expand Up @@ -10036,7 +10036,7 @@ subroutine rrtmg_swrad( &
swupt,swuptc,swdnt,swdntc, &
swupb,swupbc,swdnb,swdnbc, &
swupflx, swupflxc, swdnflx, swdnflxc, &
swddir,swddni,swddif, &
swddir,swddni,swddif,julian, &
ids,ide, jds,jde, kds,kde, &
ims,ime, jms,jme, kms,kme, &
its,ite, jts,jte, kts,kte &
Expand All @@ -10054,6 +10054,7 @@ subroutine rrtmg_swrad( &
integer,intent(in):: icloud,cldovrlp,idcor
integer,intent(in):: has_reqc,has_reqi,has_reqs
integer,intent(in),optional:: o3input
real,intent(in):: julian

real,intent(in):: radt,degrad,xtime,declin,solcon,gmt
real,intent(in),dimension(ims:ime,jms:jme):: xlat,xlong
Expand Down Expand Up @@ -10101,6 +10102,7 @@ subroutine rrtmg_swrad( &
integer:: i,j,k,n

real:: coszrs,xt24,tloctm,hrang,xxlat,adjes,scon
real:: da,eot
real:: ro,dz
real:: corr
real:: gliqwp,gicewp,gsnowp,gravmks
Expand Down Expand Up @@ -10197,9 +10199,14 @@ subroutine rrtmg_swrad( &

!--- calculate the cosine of the solar zenith angle at the current time step to determine if the sun is
! above or below the horizon (xt24 is the fractional part of simulation days plus half of radt in
! units of minutes, julian is in days, and radt is in minutes). do not call rrtmg_sw is night-time:
! units of minutes, julian is in days, and radt is in minutes). eot (equation of time) is a correction
! of mean solar time due to the difference between that time and the apparent solar time.
! do not call rrtmg_sw is night-time:
dorrsw = .true.
xt24 = mod(xtime+radt*0.5,1440.)
da=6.2831853071795862*(julian-1.)/365.
eot=(0.000075+0.001868*cos(da)-0.032077*sin(da) &
-0.014615*cos(2*da)-0.04089*sin(2*da))*(229.18)
xt24 = mod(xtime+radt*0.5,1440.)+eot
tloctm = gmt + xt24/60. + xlong(i,j)/15.
hrang = 15. * (tloctm-12.) * degrad
xxlat = xlat(i,j) * degrad
Expand Down