Repository navigation
Conversation
This was referenced Oct 19, 2026
danohu
force-pushed
the
emit-cie-upstream
branch
from
November 16, 2026 11:43
bd087a1 to
e52b605
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
emitnow writes sixcie-(Crop-Independent Emissions) bands beside its output. They describe the same conversions and carbon pools for the same assessment year, but stop before anything that depends on what the land became:Like
main's bands, they are undiscounted: each allocation leg discounts byconversion-year.Relation to
main#31 already made emit undiscounted and moved the discount downstream, which was part of what CIE argued for. So CIE now builds on
main's bands rather than duplicating them:cie-set carries only whatmain's bands don't. The year, the destination evidence and the pixel area are read from the existingconversion-year,destination-datasetandhectares-per-pixel(emit.SHARED_BANDS) instead of being copied.assessment_yearexactly asmain's do, throughget_conversion_record(lookback window, conversion year, destination maps).emit.derive_from_cierebuildsconversion,vegetation-emissions,soil-emissions, both*-peatland-occupationbands anddropped-emissionsfrom thecie-bands plusdestination-dataset. Nothing is discounted in emit or inderive_from_cie.Additive only.
main's bands are unchanged, and so is every consumer.Changes since the previous version
cie-conversion-year,cie-destination-datasetandcie-hectares-per-pixelare dropped.get_conversion_source, soConversionRecordandmain's emit tests are unchanged.Changes
jdluc/emit.py:ConversionSource,get_conversion_sourceandget_crop_independent_emissions.get_cropland_soil_loss_fractionandderive_from_cie.workflowdelegates toget_output_dset(assessment_year, dset), so the whole output can be tested on synthetic data.CIE_BANDSandSHARED_BANDS.docs/crop_independent_emissions.md:main's bands and CIE side by side, how each derives from CIE, the per-year discount and the assessment year.docs/data.md: thecie-bands in the emit schema.jdluc/__tests__/emit_test.py:test_cie_*, the source following the assessment year, and the derivation test for each assessment year.tools/compare-emit-layers.py: checks the identities on a real tile (with--assessment-year), and totals carbon by source and by whether a conversion fired.Cost
Each emit tile goes from 9 bands to 15.
Testing
uv run pytest: 1926 passed;main's emit tests unchanged.uv run pre-commit run --all-files: passes.tools/compare-emit-layers.py.