Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add equation of time correction to local time for sw radiation calculation #1172

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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 @@ -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 &
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 @@ -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 &
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down