Heating-Rate
- RRTMLWHeating
model
atmospheric_radiation
rrtm_lw
Longwave heating of a model column from the RRTM up- and downwelling fluxes (WRF ra_lw_physics = 1, SUBROUTINE RTRN heating-rate loop 7000 and the TTEN/GLW/OLR mapping of SUBROUTINE RRTM in phys/module_ra_rrtm.F, WRF 4.8), written as the pressure-coordinate flux-divergence PDE dT/dt = -(g/cp) dF_net/ds, s = p_sfc - p on the EarthSciDiscretizations grids/column_nonuniform_1d grid. The grid's interface coordinate `ze` is here the PRESSURE DISTANCE ABOVE THE SURFACE s = p_e[1] - p_e (Pa, monotone increasing with lev), so the grid's layer measure dz is the layer pressure thickness p_e[k] - p_e[k+1] and the imported face_flux_D_lev_supplied_faces rule lowers D(F_net, lev) to (F_net[k+1] - F_net[k]) / (p_e[k] - p_e[k+1]); with the RRTM value of g/cp (HEATFAC) this is exactly RTRN's HTR(L-1) = HEATFAC (FNET(L-1) - FNET(L)) / (PZ(L-1) - PZ(L)), L = 1..NLAYERS, PZ in hPa, HTR in K/day, verified against the instrumented WRF dumps to real32 roundoff (this is the convention the instrumentation pass could not reproduce: HTR(L-1), not HTR(L), is the heating of layer L, and HTR(NLAYERS) is simply set to 0). Column mapping: RRTM indexes its column BOTTOM-UP like this grid -- RRTM layer L is model layer L for L <= NLEV (MM5ATM: PAVEL(L) = p(kte+1-L) undoes the top-down ordering of the RRTMLWRAD 1-D arrays), RRTM level L is the model interface L+1 (PZ(0) the surface p8w(1), PZ(NLEV) the model top p_top) -- and MM5ATM extends the column above p_top with NLAYERS - NLEV buffer layers of thickness deltap = 4 hPa down to PZ(NLAYERS) = 0 (temperatures from a standard profile offset to match the model top, constant water vapour 5e-6, model-top CH4/N2O, climatological ozone) so that the fluxes at the model interfaces include the emission of the atmosphere above the model top. Only the fluxes at the NLEV+1 MODEL interfaces enter this component (inputs F_up, F_dn of shape [lev_nodes], the first NLEV+1 entries of TOTUFLUX/TOTDFLUX); the buffer layers are heated by RTRN but their heating is discarded (RRTM: TTEN(K) = HTR(kte-K)/86400 for K = 1..kte, in the wrapper's top-down order). Outputs: dTdt (K/s, WRF TTEN reversed to bottom-up), dthdt = dTdt/exner (the increment RRTMLWRAD adds to RTHRATEN), glw = F_dn at the surface (GLW = TOTDFLUX(0)) and olr = F_up at the MODEL TOP (WRF sets OLR = TOTUFLUX(kte), the upward flux at p_top, not TOTUFLUX(NLAYERS) at the top of the RRTM column; the two differ by 3-7 W/m^2 in the reference run). The fluxes themselves (the RTRN two-stream sweep over 140 g-points and the gas optics) are the later stages of the RRTM transcription; this component is the flux-to-tendency stage that every longwave scheme shares. Inputs are REWRITE-TARGET ops `input_<name>` that the consumer lowers (in the inline tests through a per-test expression_template_imports library extracted from the WRF dumps, because esm-spec 6.6 parameter_overrides admit scalars only). EqWeFiC, cited here for FORTRAN_BUGS.md, couplings/ and components/atmospheric_dynamics/wrf_arw/, is https://github.com/EarthSciML/EqWeFiC, where these components were developed and are coupled into a WRF column.