Ra_sw_physics=1
- DudhiaSW
model
atmospheric_radiation
dudhia_sw
The Dudhia (1989) shortwave radiation scheme of WRF (ra_sw_physics = 1, SUBROUTINE SWPARA of phys/module_ra_sw.F, WRF 4.8) as a single-column component on the EarthSciDiscretizations grids/column_nonuniform_1d grid (layer index `lev`, layer 1 at the surface; interface index `lev_nodes`, interface 1 the surface, interface NLEV+1 the top of the atmosphere). The scheme is a single downward pass of the direct solar beam S(z) that is depleted by four processes: absorption by water vapour, absorption by cloud, reflection by cloud, and Rayleigh/aerosol scattering. The first three are functions of CUMULATIVE slant paths from the top of the atmosphere, written here as the integrals W(z) = int_z^top rho q_l,eff dz (effective liquid water path, q_l,eff = qc + 0.1 qi + 0.05 qr + 0.02 qs + 0.05 qg) and U(z) = int_z^top rho qv dz (water-vapour path), lowered by the grid's integral_lev_nodes_cumulative_to_top rule: the vapour absorptance A_v(U/mu) is the Lacis-Hansen (1974) fit, the cloud reflectance R_c(mu, alw) and absorptance A_c(mu, alw) are Stephens (1978) tables in alw = log10(W/(mu 1 g/m^2) + 1), and a layer's fractional contribution is the downward increment of each cumulative function across the layer (SWPARA: TOTABS-OLDABS, ALBA-OLDALB, ABSC-OLDABC, clamped at 0). Scattering is a per-layer fraction cssca rho dz / mu. The beam itself is a genuinely sequential sweep, because SWPARA applies each layer's fraction not to S but to partial beams -- vapour absorption to the beam depleted only by cloud and scattering, cloud reflection and absorption to the beam depleted only by scattering and vapour -- which SWPARA bookkeeps with the running sums DABS, DSCLD, DSCA of the raw (unrenormalised) layer fluxes. The beam S and the two partial beams P_vap = SDOWN(1) - DSCLD - DSCA and P_cld = SDOWN(1) - DSCA - DABS are carried as three interleaved cells of ONE causal recurrence V_sweep (esm-spec 4.3.1.1), each step reading the previous triple at a fixed lag; one recurrence because the format forbids an edge between two distinct recurrence variables. The sweep runs top-down, i.e. against the lev index, and a recurrence folds only ascending, so the sweep variables live on the reversed index sets lev_down / lev_down_nodes / sweep (m = 1 the top layer, n = 1 the top of the atmosphere) and are mapped back by the reversal templates; all physics fields stay on lev / lev_nodes (lev_down: m = 1 the top layer, lev = NLEV + 1 - m; lev_down_nodes: n = 1 the top of the atmosphere, lev_nodes = NLEV + 2 - n; layer m lies between nodes m and m + 1). The heating rate is the applied (renormalised) vapour plus cloud absorption of each layer per unit volume, q_abs, divided by rho cp (SWPARA TTEN); the reflected and scattered parts leave the column without heating it, exactly as in SWPARA, and the surface absorbs (1 - albedo) S(surface). The theta tendency is dT/dt divided by the Exner function (SWRAD: RTHRATEN = RTHRATEN + TTEN1D/PI3D). Night: SWPARA returns all-zero when cos(zenith) <= 1e-9 or the top-of-atmosphere irradiance <= 1e-9 W/m^2; here the sweep is evaluated with the formal value mu = 1 at night (a near-zero mu would overflow the 1/mu slant paths) and the outputs gsw, dT/dt, dtheta/dt carry the factor `daylight`, so a night column yields exactly zero heating and surface flux while the internals are formal. Transcribed guards: negative increments clipped to 0, the table argument clamp alw_max, the renormalisation of a layer whose raw depletion exceeds 1 - tau_min (ff, tau; TRANS0 < 1: FF = 99/(...)), and the beam floor S_min (SDOWN = AMAX1(1.E-9, ...)). Not transcribed: the slope-dependent radiation option (slope_rad and its shadow correction of the surface flux) and the WRF-Chem aerosol optical depth terms (aer_dry1, aer_water1, zero without chemistry; the aerosol absorption XABSA is identically 0 in SWPARA). Reference tests: WRF v4.8.0 em_scm_xy single-column dumps from the instrumented fork ctessum-claude/WRF, commit e42a269 (v4.8.0-2-ge42a269e), replayed through that commit's real64 (-fdefault-real-8) standalone kernels/sw_driver; tolerances documented per test.