ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
TwoStreamScratch Namespace Reference

Per-column scratch the sweep keeps in a caller-provided Array4. More...

Variables

constexpr int DZ = 0
 
constexpr int Z = 1
 
constexpr int TAU_SW = 2
 
constexpr int F_DIR = 3
 
constexpr int A = 4
 
constexpr int S = 5
 
constexpr int LW_UP = 6
 
constexpr int LW_DN = 7
 
constexpr int TAU_LW = 8
 
constexpr int NCOMP = 9
 

Detailed Description

Per-column scratch the sweep keeps in a caller-provided Array4.

The SW adding method and the LW sweeps need full interface profiles (direct beam, adding-method albedo and source, LW up/down fluxes) and the per-layer thickness, height and optical depths. Keeping those as fixed-size arrays inside the device lambda cost about 37 kB of local memory per GPU thread, so they live in a scratch FArrayBox that the level driver allocates once per box with NCOMP components on the box grown by one cell at its top (nlev + 1 interfaces per column), and the sweep addresses them as scratch(i, j, kmin + m, field). Each thread touches only its own column.

Variable Documentation

◆ A

◆ DZ

◆ F_DIR

constexpr int TwoStreamScratch::F_DIR = 3
constexpr

◆ LW_DN

constexpr int TwoStreamScratch::LW_DN = 7
constexpr

◆ LW_UP

constexpr int TwoStreamScratch::LW_UP = 6
constexpr

◆ NCOMP

constexpr int TwoStreamScratch::NCOMP = 9
constexpr

◆ S

◆ TAU_LW

constexpr int TwoStreamScratch::TAU_LW = 8
constexpr

◆ TAU_SW

constexpr int TwoStreamScratch::TAU_SW = 2
constexpr

◆ Z

constexpr int TwoStreamScratch::Z = 1
constexpr