diff --git a/src/core_atmosphere/physics/mpas_atmphys_driver_radiation_sw.F b/src/core_atmosphere/physics/mpas_atmphys_driver_radiation_sw.F index f4b76d8fe8..ee40d407d8 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_driver_radiation_sw.F +++ b/src/core_atmosphere/physics/mpas_atmphys_driver_radiation_sw.F @@ -792,6 +792,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 & diff --git a/src/core_atmosphere/physics/physics_wrf/module_ra_rrtmg_sw.F b/src/core_atmosphere/physics/physics_wrf/module_ra_rrtmg_sw.F index be36c4afb1..55f57e9161 100644 --- a/src/core_atmosphere/physics/physics_wrf/module_ra_rrtmg_sw.F +++ b/src/core_atmosphere/physics/physics_wrf/module_ra_rrtmg_sw.F @@ -9876,7 +9876,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 & @@ -9893,6 +9893,7 @@ subroutine rrtmg_swrad( & integer,intent(in):: icloud,has_reqc,has_reqi,has_reqs integer,intent(in):: julday 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 @@ -9933,6 +9934,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 @@ -10022,9 +10024,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