Basic transform#
Basic transforms: general-purpose algebraic and interpolation operations.
These transforms handle data reshaping, unit conversion, interpolation, and simple mathematical operations that are model-agnostic and reusable across any CIF pipeline.
Transform summary#
backgroundAdds a pre-computed background concentration (from a global model with regional emissions switched off) to regional model simulations. Implements the Rödenbeck et al. (2009) background-subtraction approach.
clipcropZeroes out grid cells outside (crop) or inside (clip) a specified rectangular lon/lat region. Both forward and adjoint are exact.
expElement-wise exponential of a tracer field. Saves the forward input for the adjoint (\(\partial e^x / \partial x = e^x\)).
familiesAggregates multiple input tracers into a single output tracer by summing them. Supports ensemble (batch sampling) runs.
productElement-wise product of multiple input tracers. Saves the forward inputs for the adjoint (product rule).
regridReprojects data from one horizontal domain to another using one of four methods: mass-conservative, fast-conservative, bilinear, or grid-cell nearest-neighbour.
time_interpolationTemporally interpolates or re-indexes data from one time grid to another. Handles both gridded (array) and observation-indexed (sparse/sampled) data.
unit_conversionApplies a scalar scaling factor to convert between physical units. See Unit conversion unit_conversion/std for automatic unit-aware conversion.
vertical_interpolationVertically interpolates model fields from the model pressure/height grid to observation levels using static-level lookup, linear interpolation, closest-level, layer-matching, or layer-weighted methods.
Available Basic transform#
The following transform of sub-type basic are implemented in pyCIF so far:
- Adding background to simulations
background/std - Clip & crop
clipcrop/std - Element-wise product
product/std - Horizontal re-gridding
regrid/std - Temporal interpolation and re-indexing
time_interpolation/std - Tracer families or addition
families/std - Unit conversion
unit_conversion/std - Vertical interpolation and re-mapping
vertical_interpolation/std - exponential
exp/std