aircraft & downwelling RT support, surface-reflectance derivation, and clear-sky bookkeeping fixes#276
Conversation
…wnward through emission and scattering TL/AD paths; implement downwelling TL/AD for ADA and SOI solvers; fix CloudScatter TL backscatter gating and VIS SfcOptics TL/AD stubs; ensure RTSolution/common output handles downwelling radiance; map K‑Matrix downwelling input into adjoint preprocessing
|
Note: this has not yet been tested in UFO / FV3-JEDI. I'll probably increment the version number here aiming for v3.2.0, this will be the first of a few PRs heading toward v3.2.0. |
…_threads path, removing the temporary ifx workaround. Move the non-variable Atmosphere/Surface copies until after skip/input validation to avoid mutating outputs for skipped profiles.
|
As of this message, this has been tested using IFX / ICX (2025) in jedi-bundle: fv3-jedi, and UFO, under multiple NUM_OMP_THREADS configurations, all ctests pass (except 1 in fv3-jedi and traditionally failing tests in UFO that are unrelated). I think it's ready for review. edit: also this increments the version number to v3.2.0, but it's not there officially yet -- just getting ready. |
eb967bc to
2c60472
Compare
|
The force pushes were reversions back to when things were working in fv3-jedi, I didn't realize that the subsequent changes broke a few tests. I'll work on smaller incremental changes. |
|
closing in favor of starting a new, clean PR -- this one got too crufty. :) |
Summary
This PR extends CRTM forward, tangent-linear, adjoint, and K-matrix functionality to support radiative transfer at aircraft pressure levels and user-defined downwelling-radiance pressure levels. It also hardens cloud-fraction handling, improves clear-sky output consistency, integrates optional surface-reflectance derivation across all solution paths, and fixes several scattering and surface-optics edge cases for improved physical and numerical robustness. :contentReference[oaicite:0]{index=0}
Key changes
1. Aircraft-pressure and downwelling-radiance support
AIRCRAFT_PRESSURE_THRESHOLDand consistent handling of:Opt%Aircraft_Pressure(aircraft RT)Opt%Obs_4_downward_P(downwelling radiance at a pressure level; surface if zero)CRTM_Get_PressureLevelIdxto select the closest profile level.2. Clear-sky and fractional-cloud bookkeeping
RTV_Clear%n_StokesfollowsOpt%n_Stokesoverrides.Solar_Flag_truetoRTV_Clearfor fractionally cloudy atmospheres.Tb_clearandR_clearequal toBrightness_TemperatureandRadiancewhen:Atm%n_Clouds == 0, or< MIN_COVERAGE_THRESHOLD(note: this is not aerosol-cleared output).
3. Small cloud-fraction hardening
Cloud_Fraction < MIN_COVERAGE_THRESHOLD:4. Surface reflectance derivation hook
ADA_Module::CRTM_SurfRefinto FWD/TL/AD/K-matrix solutions.Options_Presentopt%Derive_Surface_Refl == .TRUE.mth_Azi == 0COS_SUN > 05. Scattering and surface-optics correctness fixes
Is_Active_SensorandInclude_Scattering.SfcOptics_KandSfcOptics_Clear_KtrackUse_New_MWSSEMconsistently with the forward path.SfcOptics/SfcOptics_Kn_Stokesconsistency after option overrides.Rationale
These changes enable aircraft- and profile-level downwelling RT use cases, eliminate ambiguous behavior for near-zero cloud fractions, and make clear-sky outputs explicit and reliable. The surface-reflectance and scattering fixes address long-standing edge cases that affected TL/AD/K-matrix consistency.
Notes