You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
COSP/RTTOV inputs copied over 1:pver instead of reduced domain ktop:pver in cospsimulator_intr.F90 #1591
Several COSP/RTTOV input fields in cospsimulator_intr.F90 are copied over the full column 1:pver instead of the reduced COSP domain ktop:pver used by their neighbors, producing vertically shifted profiles (or out-of-bounds access) in high-top configurations.
COSP runs on nlay = pver - ktop + 1 levels and most fields are correctly subset ktop:pver. But the fields added in the RTTOV / COSP-2.2.1 integration (tca, co2, ch4, n2o, cloudIce, cloudLiq, DeffLiq, DeffIce) use 1:pver. When ktop > 1 (any high-top configuration, e.g. WACCM):
Whole-array assignments silently reallocate the derived-type components to the wrong size, so profiles are vertically shifted by ktop−1 layers relative to the correctly-subset T/q/p.
The Deff* lines are non-conforming / out-of-bounds reads and writes.
Impact
All RTTOV radiances and tca-dependent COSP diagnostics are misaligned (or memory is corrupted) in high-top runs. No effect in default low-top CAM where ktop = 1. Diagnostics only.
Suggested fix
Subset all of these fields ktop:pver to match their neighbors.
Found via a systematic line-by-line scientific code review of src/physics/cam/ at commit 21a78294 (≈cam6_4_180). This is a candidate bug identified by code inspection; it has not yet been confirmed by a model run. An issue-tracker search on 2026-06-11 found no existing report.
Activity