Skip to content

Commit

Permalink
Bug fixes for RRTMG-K option (#1317)
Browse files Browse the repository at this point in the history
TYPE: bug fix

KEYWORDS: RRTMG-K option (sw and lw option 14)

SOURCE: Soonyoung Roh and Hwan-Jin Song (National Institute of Meteorological Science, Korea)

DESCRIPTION OF CHANGES:
The bugs include wrong surface downward diagnostic output for long- and short-wave fluxes (clear sky fluxes misplaced in cloudy sky flux arrays), a wrong data statement value for wavenum2 and a wrong value used for bound check for effective size of snow.
Affects radiation driver call arguments for lw and sw scheme and internal numerical values in two places of the shortwave scheme (rrtmg_swk).

This has been confirmed as a correct fix by the developers.

ISSUE:
Fixes #1312

LIST OF MODIFIED FILES:
M phys/module_ra_rrtmg_swk.F
M phys/module_radiation_driver.F

TESTS CONDUCTED:
Test reported by source (documented in Issue #1312)
Jenkins testing all pass

RELEASE NOTE:
Fixed a bug in surface downward diagnostic output of long- and short-wave fluxes and two other bugs involving wrong numerical values used in the code (Thanks to Roh and Song of NIMS, Korea).
  • Loading branch information
dudhia authored Dec 29, 2020
1 parent 93ccd18 commit f3bec85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions phys/module_ra_rrtmg_swk.F
Original file line number Diff line number Diff line change
Expand Up @@ -1732,7 +1732,7 @@ subroutine cldprmc_sw(nlayers, inflag, iceflag, liqflag, cldfmc, &
'ERROR: SNOW GENERALIZED EFFECTIVE SIZE OUT OF BOUNDS'
factor = (radsno - 2._rb)/3._rb
index = int(factor)
if(index.eq.167) index = 166
if(index.eq.46) index = 45
fint = factor-real(index)
ib = ngb(ig)
extcosno(ig) = extice3(index,ib)+fint* &
Expand Down Expand Up @@ -4308,7 +4308,7 @@ subroutine swdatinit(cpdair)
7700._rb, 8050._rb,12850._rb,16000._rb,22650._rb,29000._rb, &
38000._rb, 820._rb/)
wavenum2(:) = (/3250._rb, 4000._rb, 4650._rb, 5150._rb, 6150._rb, 7700._rb, &
8050._rb, 2850._rb,16000._rb,22650._rb,29000._rb,38000._rb, &
8050._rb,12850._rb,16000._rb,22650._rb,29000._rb,38000._rb, &
50000._rb, 2600._rb/)
delwave(:) = (/ 650._rb, 750._rb, 650._rb, 500._rb, 1000._rb, 1550._rb, &
350._rb, 4800._rb, 3150._rb, 6650._rb, 6350._rb, 9000._rb, &
Expand Down
4 changes: 2 additions & 2 deletions phys/module_radiation_driver.F
Original file line number Diff line number Diff line change
Expand Up @@ -1984,10 +1984,10 @@ SUBROUTINE radiation_driver ( &
lwupflx, lwupflxc, lwdnflx, lwdnflxc, &
swupflx, swupflxc, swdnflx, swdnflxc, &
lwupt, lwuptc, lwdnt, lwdntc, &
lwupb, lwupbc, lwdnb, lwdnb, &
lwupb, lwupbc, lwdnb, lwdnbc, &
glw, olr, lwcf, &
swupt, swuptc, swdnt, swdntc, &
swupb, swupbc, swdnb, swdnb, &
swupb, swupbc, swdnb, swdnbc, &
gsw, swcf, &
coszen, solcon, albedo, emiss, &
t,t8w, tsk, rho, p, p8w, cldfra, &
Expand Down

0 comments on commit f3bec85

Please sign in to comment.