Modular canopy-column radiative transfer, thermal and fluorescence cavity transport, anatomical leaf-face illumination, conditional single- and dual-photosystem (PSII + PSI) leaf spectral escape, spectral basis pullbacks, and hemispheric source coupling in Julia.
CanopyRadiation.jl sits directly above CanopyOptics.jl (v0.2.3) with zero dependency on vSmartMOM, leaf physiology (LeafPhotosynthesis.jl), canopy scalar exchange (CanopyExchange.jl), or atmospheric host state packages (Thermodynamics.jl, ClimaCore.jl):
- Passive Two-Stream Column Solvers:
NativeTwoStream(thin-slab Taylor direct source + adding-doubling) andAnalyticTwoStream(closed-formr_∞-free Green's-function operator), positional@.-broadcastablefoursail_canopy_ratesandpifm_canopy_rates(two-stream closurePIFMClosure: diffusivity and isotropic backward share, PIFM defaults), and zero-scratchsolve_column/solve_column!(ColumnFluxWorkspace). - Cancellation-Free Absorption Path:
StableTwoStreamintegrates layer absorptances inside the layer (layer_responsereturns a seven-numberLayerResponse), accurate for very thin layers, near-conservative scattering andFloat32;solve_column_responses!(ColumnResponseWorkspace) returns per-layer absorption for unit direct and unit diffuse irradiance in one zero-allocation pass, with separate direct and diffuse ground albedos. - Unified Thermal & Fluorescence Cavity Solvers:
NoEmission,UniformEmission,QuadratureEmission,emitting_layer, 7-fieldsolve_emitting_column/solve_emitting_column!(EmittingColumnWorkspace) satisfying net and gross column conservation, and zero-incidentsolve_emission. - Leaf-Face Illumination, Population Geometry, & Angular Escape:
source_projection(with zenith/nadir tangent-safeunit_sin_from_cos),beam_face_absorption,isotropic_face_absorption,regular_plate_passive,PopulationQuadrature,leaf_inclination_quadrature,orientation_hemisphere_samples,LambertianFaces,MixedLambertianFaces, andAngularEmissionBoundary/couple_emission. - Single- & Dual-Photosystem Conditional Spectral Escape:
LeafEmissionMatrix(with explicitout_of_windowtail ledger),DualLeafEmissionMatrix,FullEmissionSupport, full-spectrumwindow_indicesbuild_leaf_emission_matrices(avoiding false Stokes renormalization),prepare_emission_basis, andprepare_anchor_basis. - Hemispheric Source Projection & GPU Batch Kernels:
LayerHemisphericSource(unit-intervalfractional_depths),DualLayerHemisphericSource,evaluate_hemispheric_sif_bin,evaluate_hemispheric_sif_spectrum,KernelAbstractionsbatch kernels (batch_solve_columns!,batch_solve_emitting_columns!,batch_hemispheric_moments!,batch_expand_hemispheric_sources!), andCanopyRadiationCUDAExt(adapt_radiation_storage).
julia --startup-file=no --project=. -e 'using Pkg; Pkg.test()'Optional NVIDIA GPU verification (CUDA.allowscalar(false)):
julia --startup-file=no -e '
using Pkg; Pkg.activate(temp=true)
Pkg.develop(path="."); Pkg.add(["CUDA", "Aqua", "Test"])
include("test/run_cuda.jl")
'