Metrics
NumericalRadiation.RadiationErrorMetrics — Type
struct RadiationErrorMetrics{FT}Error metrics for radiation validation against a reference solution.
All flux-like quantities are in the units of the inputs, normally W m^-2. Heating-rate quantities are in the units of the heating-rate inputs, normally K day^-1 for validation reports. bias is mean(candidate - reference).
Fields:
flux_rmse: Root-mean-square flux errorflux_maximum_absolute_error: Maximum absolute flux errorflux_bias: Mean signed flux error, candidate minus referenceheating_rate_rmse: Root-mean-square heating-rate errorheating_rate_maximum_absolute_error: Maximum absolute heating-rate errorheating_rate_bias: Mean signed heating-rate error, candidate minus referencetoa_forcing_error: Top-of-atmosphere forcing errorsurface_forcing_error: Surface forcing error
NumericalRadiation.RadiationThresholds — Type
struct RadiationThresholds{FT}Hard validation thresholds for RadiationErrorMetrics.
Each field defaults to Inf, so callers can enforce only the metrics relevant to a validation gate.
Fields:
flux_rmse: Bound on the root-mean-square flux errorflux_maximum_absolute_error: Bound on the maximum absolute flux errorflux_absolute_bias: Bound on the magnitude of the flux biasheating_rate_rmse: Bound on the root-mean-square heating-rate errorheating_rate_maximum_absolute_error: Bound on the maximum absolute heating-rate errorheating_rate_absolute_bias: Bound on the magnitude of the heating-rate biastoa_forcing_absolute_error: Bound on the magnitude of the top-of-atmosphere forcing errorsurface_forcing_absolute_error: Bound on the magnitude of the surface forcing error
NumericalRadiation.radiation_error_metrics — Function
radiation_error_metrics(; candidate_flux, reference_flux,
candidate_heating_rate, reference_heating_rate,
candidate_toa_flux, reference_toa_flux,
candidate_surface_flux, reference_surface_flux)Compute validation metrics used by accuracy reports and acceptance gates. Flux and heating-rate arrays may be flattened vectors or any array with matching linear indexing. Forcing errors are candidate-minus-reference at TOA and surface.
NumericalRadiation.radiative_flux_error_metrics — Function
radiative_flux_error_metrics(candidate_fluxes, reference_fluxes, atmosphere;
gravity = atmosphere.constants.gravity,
heat_capacity = atmosphere.constants.heat_capacity)Compare two RadiativeFluxes objects on the same ColumnAtmosphere. The flux metric is computed over all longwave and shortwave up/down interface flux components, while heating-rate metrics are computed from the native flux-divergence convention in heating_rates!, with the column's constants unless gravity and heat_capacity are passed. TOA and surface forcing errors use net downward flux.
NumericalRadiation.passes_thresholds — Function
passes_thresholds(metrics, thresholds; throw_on_error=false)Validate RadiationErrorMetrics against hard RadiationThresholds. Returns true when all thresholds pass. With throw_on_error=false, returns (valid, errors).