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

coszen made not optional in Dudhia swrad #1675

Merged
merged 1 commit into from
Mar 15, 2022
Merged
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
19 changes: 3 additions & 16 deletions phys/module_ra_sw.F
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ SUBROUTINE SWRAD(dt,RTHRATEN,GSW,XLAT,XLONG,ALBEDO, &
INTEGER, INTENT(IN ) :: JULDAY

! --- jararias 14/08/2013
REAL, DIMENSION( ims:ime, jms:jme ), OPTIONAL, INTENT(IN) :: COSZEN
REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN) :: COSZEN
REAL, OPTIONAL, INTENT(IN) :: JULIAN

!-- amontornes-bcodina 2015/09
Expand Down Expand Up @@ -285,7 +285,7 @@ SUBROUTINE SWPARA(TTEN,GSW,XLAT,XLONG,ALBEDO, &
SOLCON,XLAT,XLONG,ALBEDO, &
RADFRQ, DEGRAD

REAL, OPTIONAL, INTENT(IN) :: COSZEN, JULIAN ! jararias, 14/08/2013
REAL, INTENT(IN) :: COSZEN, JULIAN

!
INTEGER, INTENT(IN) :: icloud
Expand Down Expand Up @@ -346,20 +346,7 @@ SUBROUTINE SWPARA(TTEN,GSW,XLAT,XLONG,ALBEDO, &
bexth2o=5.E-6
! SOLTOP=SOLCON
SOLTOP = SOLCON*(1-obscur0)
! jararias, 14/08/2013
if (present(coszen)) then
csza=coszen
else
! 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+radfrq*0.5,1440.)+eot
tloctm = gmt + xt24/60. + xlong/15.
hrang = 15. * (tloctm-12.) * degrad
xxlat = xlat * degrad
csza = sin(xxlat) * sin(declin) &
+ cos(xxlat) * cos(declin) * cos(hrang)
end if
csza=coszen

! RETURN IF NIGHT
IF(CSZA.LE.1.E-9)GOTO 7
Expand Down