From f3bec85082119f51bd67fd7874584242affc1d9d Mon Sep 17 00:00:00 2001 From: dudhia Date: Tue, 29 Dec 2020 16:27:21 -0700 Subject: [PATCH] Bug fixes for RRTMG-K option (#1317) 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). --- phys/module_ra_rrtmg_swk.F | 4 ++-- phys/module_radiation_driver.F | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/phys/module_ra_rrtmg_swk.F b/phys/module_ra_rrtmg_swk.F index 46e5fbc694..a18146b9dc 100644 --- a/phys/module_ra_rrtmg_swk.F +++ b/phys/module_ra_rrtmg_swk.F @@ -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* & @@ -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, & diff --git a/phys/module_radiation_driver.F b/phys/module_radiation_driver.F index 3a57db4c85..1c47e82ff0 100644 --- a/phys/module_radiation_driver.F +++ b/phys/module_radiation_driver.F @@ -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, &