diff --git a/bedrock/analysis/ghg_fbs_pin/upstream_inputs_pin.json b/bedrock/analysis/ghg_fbs_pin/upstream_inputs_pin.json index bd48768bb..5e75a6dbe 100644 --- a/bedrock/analysis/ghg_fbs_pin/upstream_inputs_pin.json +++ b/bedrock/analysis/ghg_fbs_pin/upstream_inputs_pin.json @@ -5,105 +5,105 @@ "methods": { "GHG_national_Cornerstone_2017": { "fbs": { - "Energy_manufacturing_national_nowcast_2017": "Energy_manufacturing_national_nowcast_2017_v1.0.0_8365fa4.parquet", - "Energy_highway_fuel_shares_national_2017": "Energy_highway_fuel_shares_national_2017_v1.0.0_8365fa4.parquet", - "Energy_industrial_distillate_national_2017": "Energy_industrial_distillate_national_2017_v1.0.0_8365fa4.parquet" + "Energy_manufacturing_national_nowcast_2017": "Energy_manufacturing_national_nowcast_2017_v1.0.0_fd271dc.parquet", + "Energy_highway_fuel_shares_national_2017": "Energy_highway_fuel_shares_national_2017_v1.0.0_fd271dc.parquet", + "Energy_industrial_distillate_national_2017": "Energy_industrial_distillate_national_2017_v1.0.0_fd271dc.parquet" }, "nowcast_mut": { "year": 2017, "stage": "after", - "vintage": "v1.0.0_8365fa4", + "vintage": "v1.0.0_fd271dc", "tables": ["Make", "Use", "Import", "Margins"] } }, "GHG_national_Cornerstone_2018": { "fbs": { - "Energy_manufacturing_national_nowcast_2018": "Energy_manufacturing_national_nowcast_2018_v1.0.0_8365fa4.parquet", - "Energy_highway_fuel_shares_national_2018": "Energy_highway_fuel_shares_national_2018_v1.0.0_8365fa4.parquet", - "Energy_industrial_distillate_national_2018": "Energy_industrial_distillate_national_2018_v1.0.0_8365fa4.parquet" + "Energy_manufacturing_national_nowcast_2018": "Energy_manufacturing_national_nowcast_2018_v1.0.0_fd271dc.parquet", + "Energy_highway_fuel_shares_national_2018": "Energy_highway_fuel_shares_national_2018_v1.0.0_fd271dc.parquet", + "Energy_industrial_distillate_national_2018": "Energy_industrial_distillate_national_2018_v1.0.0_fd271dc.parquet" }, "nowcast_mut": { "year": 2018, "stage": "after", - "vintage": "v1.0.0_8365fa4", + "vintage": "v1.0.0_fd271dc", "tables": ["Make", "Use", "Import", "Margins"] } }, "GHG_national_Cornerstone_2019": { "fbs": { - "Energy_manufacturing_national_nowcast_2019": "Energy_manufacturing_national_nowcast_2019_v1.0.0_8365fa4.parquet", - "Energy_highway_fuel_shares_national_2019": "Energy_highway_fuel_shares_national_2019_v1.0.0_8365fa4.parquet", - "Energy_industrial_distillate_national_2019": "Energy_industrial_distillate_national_2019_v1.0.0_8365fa4.parquet" + "Energy_manufacturing_national_nowcast_2019": "Energy_manufacturing_national_nowcast_2019_v1.0.0_fd271dc.parquet", + "Energy_highway_fuel_shares_national_2019": "Energy_highway_fuel_shares_national_2019_v1.0.0_fd271dc.parquet", + "Energy_industrial_distillate_national_2019": "Energy_industrial_distillate_national_2019_v1.0.0_fd271dc.parquet" }, "nowcast_mut": { "year": 2019, "stage": "after", - "vintage": "v1.0.0_8365fa4", + "vintage": "v1.0.0_fd271dc", "tables": ["Make", "Use", "Import", "Margins"] } }, "GHG_national_Cornerstone_2020": { "fbs": { - "Energy_manufacturing_national_nowcast_2020": "Energy_manufacturing_national_nowcast_2020_v1.0.0_8365fa4.parquet", - "Energy_highway_fuel_shares_national_2020": "Energy_highway_fuel_shares_national_2020_v1.0.0_8365fa4.parquet", - "Energy_industrial_distillate_national_2020": "Energy_industrial_distillate_national_2020_v1.0.0_8365fa4.parquet" + "Energy_manufacturing_national_nowcast_2020": "Energy_manufacturing_national_nowcast_2020_v1.0.0_fd271dc.parquet", + "Energy_highway_fuel_shares_national_2020": "Energy_highway_fuel_shares_national_2020_v1.0.0_fd271dc.parquet", + "Energy_industrial_distillate_national_2020": "Energy_industrial_distillate_national_2020_v1.0.0_fd271dc.parquet" }, "nowcast_mut": { "year": 2020, "stage": "after", - "vintage": "v1.0.0_8365fa4", + "vintage": "v1.0.0_fd271dc", "tables": ["Make", "Use", "Import", "Margins"] } }, "GHG_national_Cornerstone_2021": { "fbs": { - "Energy_manufacturing_national_nowcast_2021": "Energy_manufacturing_national_nowcast_2021_v1.0.0_8365fa4.parquet", - "Energy_highway_fuel_shares_national_2021": "Energy_highway_fuel_shares_national_2021_v1.0.0_8365fa4.parquet", - "Energy_industrial_distillate_national_2021": "Energy_industrial_distillate_national_2021_v1.0.0_8365fa4.parquet" + "Energy_manufacturing_national_nowcast_2021": "Energy_manufacturing_national_nowcast_2021_v1.0.0_fd271dc.parquet", + "Energy_highway_fuel_shares_national_2021": "Energy_highway_fuel_shares_national_2021_v1.0.0_fd271dc.parquet", + "Energy_industrial_distillate_national_2021": "Energy_industrial_distillate_national_2021_v1.0.0_fd271dc.parquet" }, "nowcast_mut": { "year": 2021, "stage": "after", - "vintage": "v1.0.0_8365fa4", + "vintage": "v1.0.0_fd271dc", "tables": ["Make", "Use", "Import", "Margins"] } }, "GHG_national_Cornerstone_2022": { "fbs": { - "Energy_manufacturing_national_nowcast_2022": "Energy_manufacturing_national_nowcast_2022_v1.0.0_8365fa4.parquet", - "Energy_highway_fuel_shares_national_2022": "Energy_highway_fuel_shares_national_2022_v1.0.0_8365fa4.parquet", - "Energy_industrial_distillate_national_2022": "Energy_industrial_distillate_national_2022_v1.0.0_8365fa4.parquet" + "Energy_manufacturing_national_nowcast_2022": "Energy_manufacturing_national_nowcast_2022_v1.0.0_fd271dc.parquet", + "Energy_highway_fuel_shares_national_2022": "Energy_highway_fuel_shares_national_2022_v1.0.0_fd271dc.parquet", + "Energy_industrial_distillate_national_2022": "Energy_industrial_distillate_national_2022_v1.0.0_fd271dc.parquet" }, "nowcast_mut": { "year": 2022, "stage": "after", - "vintage": "v1.0.0_8365fa4", + "vintage": "v1.0.0_fd271dc", "tables": ["Make", "Use", "Import", "Margins"] } }, "GHG_national_Cornerstone_2023": { "fbs": { - "Energy_manufacturing_national_nowcast_2023": "Energy_manufacturing_national_nowcast_2023_v1.0.0_8365fa4.parquet", - "Energy_highway_fuel_shares_national_2023": "Energy_highway_fuel_shares_national_2023_v1.0.0_8365fa4.parquet", - "Energy_industrial_distillate_national_2023": "Energy_industrial_distillate_national_2023_v1.0.0_8365fa4.parquet" + "Energy_manufacturing_national_nowcast_2023": "Energy_manufacturing_national_nowcast_2023_v1.0.0_fd271dc.parquet", + "Energy_highway_fuel_shares_national_2023": "Energy_highway_fuel_shares_national_2023_v1.0.0_fd271dc.parquet", + "Energy_industrial_distillate_national_2023": "Energy_industrial_distillate_national_2023_v1.0.0_fd271dc.parquet" }, "nowcast_mut": { "year": 2023, "stage": "after", - "vintage": "v1.0.0_8365fa4", + "vintage": "v1.0.0_fd271dc", "tables": ["Make", "Use", "Import", "Margins"] } }, "GHG_national_Cornerstone_2024": { "fbs": { - "Energy_manufacturing_national_nowcast_2024": "Energy_manufacturing_national_nowcast_2024_v1.0.0_8365fa4.parquet", - "Energy_highway_fuel_shares_national_2024": "Energy_highway_fuel_shares_national_2024_v1.0.0_8365fa4.parquet", - "Energy_industrial_distillate_national_2024": "Energy_industrial_distillate_national_2024_v1.0.0_8365fa4.parquet" + "Energy_manufacturing_national_nowcast_2024": "Energy_manufacturing_national_nowcast_2024_v1.0.0_fd271dc.parquet", + "Energy_highway_fuel_shares_national_2024": "Energy_highway_fuel_shares_national_2024_v1.0.0_fd271dc.parquet", + "Energy_industrial_distillate_national_2024": "Energy_industrial_distillate_national_2024_v1.0.0_fd271dc.parquet" }, "nowcast_mut": { "year": 2024, "stage": "after", - "vintage": "v1.0.0_8365fa4", + "vintage": "v1.0.0_fd271dc", "tables": ["Make", "Use", "Import", "Margins"] } } diff --git a/bedrock/analysis/nowcasting/utilities_expense_seed.py b/bedrock/analysis/nowcasting/utilities_expense_seed.py index 3e5318277..0464bb434 100644 --- a/bedrock/analysis/nowcasting/utilities_expense_seed.py +++ b/bedrock/analysis/nowcasting/utilities_expense_seed.py @@ -174,7 +174,7 @@ #: PUDL release and revises past years (``v2026.8.0`` to the November release #: moved 2024 fuel cost +0.09% and 2016-2024 resale revenue +0.02-0.05%), so #: the balanced SUT pin could not be rebuilt in CI. ``v2026.8.0`` is what -#: ``v1.0.0_8365fa4`` was built on; move it only with a rebuild and re-pin. +#: ``v1.0.0_fd271dc`` was built on; move it only with a rebuild and re-pin. PUDL = 'https://s3.us-west-2.amazonaws.com/pudl.catalyst.coop/v2026.8.0' #: EIA form 923, every fuel receipt at every reporting power plant, 2008-2024, diff --git a/bedrock/analysis/time_series_B_matrix/time_series_matrix_assessment.py b/bedrock/analysis/time_series_B_matrix/time_series_matrix_assessment.py index 69b04e458..4134f00e6 100644 --- a/bedrock/analysis/time_series_B_matrix/time_series_matrix_assessment.py +++ b/bedrock/analysis/time_series_B_matrix/time_series_matrix_assessment.py @@ -64,8 +64,8 @@ #: Constant-dollar year for real B/N (and default normalization year). DOLLAR_YEAR = 2017 -FBS_VINTAGE = 'v1.0.0_8365fa4' -MUT_VINTAGE = 'v1.0.0_8365fa4' +FBS_VINTAGE = 'v1.0.0_fd271dc' +MUT_VINTAGE = 'v1.0.0_fd271dc' #: Year-stem GHG FBS basename template (matches ``2026_usa_cornerstone_v1_0_{year}``). FBS_STEM = 'GHG_national_Cornerstone_{year}' diff --git a/bedrock/utils/config/__tests__/test_usa_config.py b/bedrock/utils/config/__tests__/test_usa_config.py index 61ec10182..0938ee3db 100644 --- a/bedrock/utils/config/__tests__/test_usa_config.py +++ b/bedrock/utils/config/__tests__/test_usa_config.py @@ -426,7 +426,7 @@ def test_v1_0_yearly_yamls_load(year: int) -> None: electricity flags its MUT was built with and the delivery sector. Named ``2026_usa_cornerstone_v1_0_{year}``. Each member pins - ``GHG_national_Cornerstone_{year}_v1.0.0_8365fa4``. The unsuffixed + ``GHG_national_Cornerstone_{year}_v1.0.0_fd271dc``. The unsuffixed ``2026_usa_cornerstone_v1_0`` (live ``CANONICAL_USA_CONFIG``) matches the 2024 series member. ``2025_usa_cornerstone_v0_6`` keeps the facilities-transportation 2024 pin for the v0.6 release / waterfall FINAL. @@ -444,9 +444,9 @@ def test_v1_0_yearly_yamls_load(year: int) -> None: assert not cfg.deflate_x_to_detail_io_year_for_B assert cfg.bea_price_index_vintage == '2026Q2' assert cfg.cornerstone_ghg_fbs_filename == ( - f'GHG_national_Cornerstone_{year}_v1.0.0_8365fa4.parquet' + f'GHG_national_Cornerstone_{year}_v1.0.0_fd271dc.parquet' ) - assert cfg.nowcast_mut_vintage == 'v1.0.0_8365fa4' + assert cfg.nowcast_mut_vintage == 'v1.0.0_fd271dc' electricity_flags = { 'electric_output_on_retail_revenue', 'electricity_accounting_residual', @@ -457,7 +457,7 @@ def test_v1_0_yearly_yamls_load(year: int) -> None: 'electricity_delivery_margin', } assert all(getattr(cfg, flag) for flag in electricity_flags) - # Fixes merged 2026-11-10 and 11-11, rebuilt in v1.0.0_8365fa4 (#1249). + # Fixes merged 2026-11-10 and 11-11, rebuilt in v1.0.0_fd271dc (#1249). rebuild_flags = { 'fill_withheld_aies_codes', 'hold_aies_outliers_on_bea', @@ -466,6 +466,7 @@ def test_v1_0_yearly_yamls_load(year: int) -> None: 'cap_margins_at_purchase', 'pin_refinery_secondaries_at_go_mix', 'air_margin_on_aies_level', + 'trade_margin_receivers_follow_supply', } assert all(getattr(cfg, flag) for flag in rebuild_flags) @@ -502,7 +503,7 @@ def test_v1_0_release_yaml_matches_2024_series_member() -> None: y2024 = _load_usa_config_from_file_name('2026_usa_cornerstone_v1_0_2024.yaml') assert base.model_dump() == y2024.model_dump() assert base.cornerstone_ghg_fbs_filename == ( - 'GHG_national_Cornerstone_2024_v1.0.0_8365fa4.parquet' + 'GHG_national_Cornerstone_2024_v1.0.0_fd271dc.parquet' ) set_global_usa_config('2026_usa_cornerstone_v1_0.yaml') assert _select_cornerstone_ghg_fbs_base_name() == 'GHG_national_Cornerstone_2024' diff --git a/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0.yaml b/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0.yaml index 972158b5f..4e5c6110d 100644 --- a/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0.yaml +++ b/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0.yaml @@ -2,7 +2,7 @@ # # Unsuffixed family release for calendar year 2024. Same resolved fields as # 2026_usa_cornerstone_v1_0_2024 (the series member). Detail MUT is the -# after-redefinition build named by nowcast_mut_vintage: v1.0.0_8365fa4, the +# after-redefinition build named by nowcast_mut_vintage: v1.0.0_fd271dc, the # 2017-2024 rebuild on the 2026 BEA annual update with electric output on EIA's # 2017 level and the 2026-11-10 fixes below (#1249). bea_price_index_vintage # 2026Q2 is the index those tables were built with. The GHG loader returns @@ -22,7 +22,7 @@ iot_before_or_after_redefinition: after # Data selection ##### usa_detail_io_source: nowcast -nowcast_mut_vintage: 'v1.0.0_8365fa4' +nowcast_mut_vintage: 'v1.0.0_fd271dc' usa_base_io_data_year: 2024 usa_ghg_data_year: 2024 bea_price_index_vintage: '2026Q2' @@ -30,7 +30,7 @@ bea_price_index_vintage: '2026Q2' ##### # Methodology selection ##### -cornerstone_ghg_fbs_filename: GHG_national_Cornerstone_2024_v1.0.0_8365fa4.parquet +cornerstone_ghg_fbs_filename: GHG_national_Cornerstone_2024_v1.0.0_fd271dc.parquet apply_io_year_adjustments: False implement_waste_disaggregation: True waste_weights_year: match_io @@ -47,7 +47,7 @@ hold_electric_gas_on_eia: True # applied after Step 7. electric_output_on_eia_level: True electricity_delivery_margin: True -# Fixes merged 2026-11-10, rebuilt together in v1.0.0_8365fa4 (#1249). +# Fixes merged 2026-11-10, rebuilt together in v1.0.0_fd271dc (#1249). # AIES output chain (#1231): withheld codes, 325190 on BEA, gas distribution. fill_withheld_aies_codes: True hold_aies_outliers_on_bea: True @@ -60,3 +60,6 @@ cap_margins_at_purchase: True pin_refinery_secondaries_at_go_mix: True # Air freight revenue at the AIES level from 2023 (#1251, #1274). air_margin_on_aies_level: True +# Spread each year's trade margin over the goods by their own supply, not by +# frozen 2017 shares (#1194, #1260). +trade_margin_receivers_follow_supply: True diff --git a/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2017.yaml b/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2017.yaml index 5fc034cb8..e16ee575c 100644 --- a/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2017.yaml +++ b/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2017.yaml @@ -1,9 +1,10 @@ # Cornerstone 2026 model - v1.0, calendar year 2017. # # Same methodology as 2026_usa_cornerstone_v1_0 for year 2017. -# nowcast_mut_vintage v1.0.0_8365fa4 is the 2017-2024 rebuild on the 2026 BEA +# nowcast_mut_vintage v1.0.0_fd271dc is the 2017-2024 rebuild on the 2026 BEA # annual update, with electric output on EIA's 2017 level and the 2026-11-10 -# fixes below (#1249). +# fixes below (#1249), the balance and export fixes of 11-12 (#1270, #1293) +# and the trade margin receivers (#1194). # bea_price_index_vintage 2026Q2 is the index those tables were built with. The # GHG loader returns GHG_national_Cornerstone_2017. # cornerstone_ghg_fbs_filename names the GCS object loaded for E. When @@ -21,7 +22,7 @@ iot_before_or_after_redefinition: after # Data selection ##### usa_detail_io_source: nowcast -nowcast_mut_vintage: 'v1.0.0_8365fa4' +nowcast_mut_vintage: 'v1.0.0_fd271dc' usa_base_io_data_year: 2017 usa_ghg_data_year: 2017 bea_price_index_vintage: '2026Q2' @@ -29,7 +30,7 @@ bea_price_index_vintage: '2026Q2' ##### # Methodology selection ##### -cornerstone_ghg_fbs_filename: GHG_national_Cornerstone_2017_v1.0.0_8365fa4.parquet +cornerstone_ghg_fbs_filename: GHG_national_Cornerstone_2017_v1.0.0_fd271dc.parquet apply_io_year_adjustments: False implement_waste_disaggregation: True waste_weights_year: match_io @@ -46,7 +47,7 @@ hold_electric_gas_on_eia: True # applied after Step 7. electric_output_on_eia_level: True electricity_delivery_margin: True -# Fixes merged 2026-11-10, rebuilt together in v1.0.0_8365fa4 (#1249). +# Fixes merged 2026-11-10, rebuilt together in v1.0.0_fd271dc (#1249). # AIES output chain (#1231): withheld codes, 325190 on BEA, gas distribution. fill_withheld_aies_codes: True hold_aies_outliers_on_bea: True @@ -59,3 +60,6 @@ cap_margins_at_purchase: True pin_refinery_secondaries_at_go_mix: True # Air freight revenue at the AIES level from 2023 (#1251, #1274). air_margin_on_aies_level: True +# Spread each year's trade margin over the goods by their own supply, not by +# frozen 2017 shares (#1194, #1260). +trade_margin_receivers_follow_supply: True diff --git a/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2018.yaml b/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2018.yaml index 2f0f9df68..da3586b28 100644 --- a/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2018.yaml +++ b/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2018.yaml @@ -1,9 +1,10 @@ # Cornerstone 2026 model - v1.0, calendar year 2018. # # Same methodology as 2026_usa_cornerstone_v1_0 for year 2018. -# nowcast_mut_vintage v1.0.0_8365fa4 is the 2017-2024 rebuild on the 2026 BEA +# nowcast_mut_vintage v1.0.0_fd271dc is the 2017-2024 rebuild on the 2026 BEA # annual update, with electric output on EIA's 2017 level and the 2026-11-10 -# fixes below (#1249). +# fixes below (#1249), the balance and export fixes of 11-12 (#1270, #1293) +# and the trade margin receivers (#1194). # bea_price_index_vintage 2026Q2 is the index those tables were built with. The # GHG loader returns GHG_national_Cornerstone_2018. # cornerstone_ghg_fbs_filename names the GCS object loaded for E. When @@ -21,7 +22,7 @@ iot_before_or_after_redefinition: after # Data selection ##### usa_detail_io_source: nowcast -nowcast_mut_vintage: 'v1.0.0_8365fa4' +nowcast_mut_vintage: 'v1.0.0_fd271dc' usa_base_io_data_year: 2018 usa_ghg_data_year: 2018 bea_price_index_vintage: '2026Q2' @@ -29,7 +30,7 @@ bea_price_index_vintage: '2026Q2' ##### # Methodology selection ##### -cornerstone_ghg_fbs_filename: GHG_national_Cornerstone_2018_v1.0.0_8365fa4.parquet +cornerstone_ghg_fbs_filename: GHG_national_Cornerstone_2018_v1.0.0_fd271dc.parquet apply_io_year_adjustments: False implement_waste_disaggregation: True waste_weights_year: match_io @@ -46,7 +47,7 @@ hold_electric_gas_on_eia: True # applied after Step 7. electric_output_on_eia_level: True electricity_delivery_margin: True -# Fixes merged 2026-11-10, rebuilt together in v1.0.0_8365fa4 (#1249). +# Fixes merged 2026-11-10, rebuilt together in v1.0.0_fd271dc (#1249). # AIES output chain (#1231): withheld codes, 325190 on BEA, gas distribution. fill_withheld_aies_codes: True hold_aies_outliers_on_bea: True @@ -59,3 +60,6 @@ cap_margins_at_purchase: True pin_refinery_secondaries_at_go_mix: True # Air freight revenue at the AIES level from 2023 (#1251, #1274). air_margin_on_aies_level: True +# Spread each year's trade margin over the goods by their own supply, not by +# frozen 2017 shares (#1194, #1260). +trade_margin_receivers_follow_supply: True diff --git a/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2019.yaml b/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2019.yaml index d93475ba9..f1d029b0c 100644 --- a/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2019.yaml +++ b/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2019.yaml @@ -1,9 +1,10 @@ # Cornerstone 2026 model - v1.0, calendar year 2019. # # Same methodology as 2026_usa_cornerstone_v1_0 for year 2019. -# nowcast_mut_vintage v1.0.0_8365fa4 is the 2017-2024 rebuild on the 2026 BEA +# nowcast_mut_vintage v1.0.0_fd271dc is the 2017-2024 rebuild on the 2026 BEA # annual update, with electric output on EIA's 2017 level and the 2026-11-10 -# fixes below (#1249). +# fixes below (#1249), the balance and export fixes of 11-12 (#1270, #1293) +# and the trade margin receivers (#1194). # bea_price_index_vintage 2026Q2 is the index those tables were built with. The # GHG loader returns GHG_national_Cornerstone_2019. # cornerstone_ghg_fbs_filename names the GCS object loaded for E. When @@ -21,7 +22,7 @@ iot_before_or_after_redefinition: after # Data selection ##### usa_detail_io_source: nowcast -nowcast_mut_vintage: 'v1.0.0_8365fa4' +nowcast_mut_vintage: 'v1.0.0_fd271dc' usa_base_io_data_year: 2019 usa_ghg_data_year: 2019 bea_price_index_vintage: '2026Q2' @@ -29,7 +30,7 @@ bea_price_index_vintage: '2026Q2' ##### # Methodology selection ##### -cornerstone_ghg_fbs_filename: GHG_national_Cornerstone_2019_v1.0.0_8365fa4.parquet +cornerstone_ghg_fbs_filename: GHG_national_Cornerstone_2019_v1.0.0_fd271dc.parquet apply_io_year_adjustments: False implement_waste_disaggregation: True waste_weights_year: match_io @@ -46,7 +47,7 @@ hold_electric_gas_on_eia: True # applied after Step 7. electric_output_on_eia_level: True electricity_delivery_margin: True -# Fixes merged 2026-11-10, rebuilt together in v1.0.0_8365fa4 (#1249). +# Fixes merged 2026-11-10, rebuilt together in v1.0.0_fd271dc (#1249). # AIES output chain (#1231): withheld codes, 325190 on BEA, gas distribution. fill_withheld_aies_codes: True hold_aies_outliers_on_bea: True @@ -59,3 +60,6 @@ cap_margins_at_purchase: True pin_refinery_secondaries_at_go_mix: True # Air freight revenue at the AIES level from 2023 (#1251, #1274). air_margin_on_aies_level: True +# Spread each year's trade margin over the goods by their own supply, not by +# frozen 2017 shares (#1194, #1260). +trade_margin_receivers_follow_supply: True diff --git a/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2020.yaml b/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2020.yaml index 12b51b1da..be628e59d 100644 --- a/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2020.yaml +++ b/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2020.yaml @@ -1,9 +1,10 @@ # Cornerstone 2026 model - v1.0, calendar year 2020. # # Same methodology as 2026_usa_cornerstone_v1_0 for year 2020. -# nowcast_mut_vintage v1.0.0_8365fa4 is the 2017-2024 rebuild on the 2026 BEA +# nowcast_mut_vintage v1.0.0_fd271dc is the 2017-2024 rebuild on the 2026 BEA # annual update, with electric output on EIA's 2017 level and the 2026-11-10 -# fixes below (#1249). +# fixes below (#1249), the balance and export fixes of 11-12 (#1270, #1293) +# and the trade margin receivers (#1194). # bea_price_index_vintage 2026Q2 is the index those tables were built with. The # GHG loader returns GHG_national_Cornerstone_2020. # cornerstone_ghg_fbs_filename names the GCS object loaded for E. When @@ -21,7 +22,7 @@ iot_before_or_after_redefinition: after # Data selection ##### usa_detail_io_source: nowcast -nowcast_mut_vintage: 'v1.0.0_8365fa4' +nowcast_mut_vintage: 'v1.0.0_fd271dc' usa_base_io_data_year: 2020 usa_ghg_data_year: 2020 bea_price_index_vintage: '2026Q2' @@ -29,7 +30,7 @@ bea_price_index_vintage: '2026Q2' ##### # Methodology selection ##### -cornerstone_ghg_fbs_filename: GHG_national_Cornerstone_2020_v1.0.0_8365fa4.parquet +cornerstone_ghg_fbs_filename: GHG_national_Cornerstone_2020_v1.0.0_fd271dc.parquet apply_io_year_adjustments: False implement_waste_disaggregation: True waste_weights_year: match_io @@ -46,7 +47,7 @@ hold_electric_gas_on_eia: True # applied after Step 7. electric_output_on_eia_level: True electricity_delivery_margin: True -# Fixes merged 2026-11-10, rebuilt together in v1.0.0_8365fa4 (#1249). +# Fixes merged 2026-11-10, rebuilt together in v1.0.0_fd271dc (#1249). # AIES output chain (#1231): withheld codes, 325190 on BEA, gas distribution. fill_withheld_aies_codes: True hold_aies_outliers_on_bea: True @@ -59,3 +60,6 @@ cap_margins_at_purchase: True pin_refinery_secondaries_at_go_mix: True # Air freight revenue at the AIES level from 2023 (#1251, #1274). air_margin_on_aies_level: True +# Spread each year's trade margin over the goods by their own supply, not by +# frozen 2017 shares (#1194, #1260). +trade_margin_receivers_follow_supply: True diff --git a/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2021.yaml b/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2021.yaml index f6004b24b..dd30a2378 100644 --- a/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2021.yaml +++ b/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2021.yaml @@ -1,9 +1,10 @@ # Cornerstone 2026 model - v1.0, calendar year 2021. # # Same methodology as 2026_usa_cornerstone_v1_0 for year 2021. -# nowcast_mut_vintage v1.0.0_8365fa4 is the 2017-2024 rebuild on the 2026 BEA +# nowcast_mut_vintage v1.0.0_fd271dc is the 2017-2024 rebuild on the 2026 BEA # annual update, with electric output on EIA's 2017 level and the 2026-11-10 -# fixes below (#1249). +# fixes below (#1249), the balance and export fixes of 11-12 (#1270, #1293) +# and the trade margin receivers (#1194). # bea_price_index_vintage 2026Q2 is the index those tables were built with. The # GHG loader returns GHG_national_Cornerstone_2021. # cornerstone_ghg_fbs_filename names the GCS object loaded for E. When @@ -21,7 +22,7 @@ iot_before_or_after_redefinition: after # Data selection ##### usa_detail_io_source: nowcast -nowcast_mut_vintage: 'v1.0.0_8365fa4' +nowcast_mut_vintage: 'v1.0.0_fd271dc' usa_base_io_data_year: 2021 usa_ghg_data_year: 2021 bea_price_index_vintage: '2026Q2' @@ -29,7 +30,7 @@ bea_price_index_vintage: '2026Q2' ##### # Methodology selection ##### -cornerstone_ghg_fbs_filename: GHG_national_Cornerstone_2021_v1.0.0_8365fa4.parquet +cornerstone_ghg_fbs_filename: GHG_national_Cornerstone_2021_v1.0.0_fd271dc.parquet apply_io_year_adjustments: False implement_waste_disaggregation: True waste_weights_year: match_io @@ -46,7 +47,7 @@ hold_electric_gas_on_eia: True # applied after Step 7. electric_output_on_eia_level: True electricity_delivery_margin: True -# Fixes merged 2026-11-10, rebuilt together in v1.0.0_8365fa4 (#1249). +# Fixes merged 2026-11-10, rebuilt together in v1.0.0_fd271dc (#1249). # AIES output chain (#1231): withheld codes, 325190 on BEA, gas distribution. fill_withheld_aies_codes: True hold_aies_outliers_on_bea: True @@ -59,3 +60,6 @@ cap_margins_at_purchase: True pin_refinery_secondaries_at_go_mix: True # Air freight revenue at the AIES level from 2023 (#1251, #1274). air_margin_on_aies_level: True +# Spread each year's trade margin over the goods by their own supply, not by +# frozen 2017 shares (#1194, #1260). +trade_margin_receivers_follow_supply: True diff --git a/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2022.yaml b/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2022.yaml index 8d94adec3..7a9b55899 100644 --- a/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2022.yaml +++ b/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2022.yaml @@ -1,9 +1,10 @@ # Cornerstone 2026 model - v1.0, calendar year 2022. # # Same methodology as 2026_usa_cornerstone_v1_0 for year 2022. -# nowcast_mut_vintage v1.0.0_8365fa4 is the 2017-2024 rebuild on the 2026 BEA +# nowcast_mut_vintage v1.0.0_fd271dc is the 2017-2024 rebuild on the 2026 BEA # annual update, with electric output on EIA's 2017 level and the 2026-11-10 -# fixes below (#1249). +# fixes below (#1249), the balance and export fixes of 11-12 (#1270, #1293) +# and the trade margin receivers (#1194). # bea_price_index_vintage 2026Q2 is the index those tables were built with. The # GHG loader returns GHG_national_Cornerstone_2022. # cornerstone_ghg_fbs_filename names the GCS object loaded for E. When @@ -21,7 +22,7 @@ iot_before_or_after_redefinition: after # Data selection ##### usa_detail_io_source: nowcast -nowcast_mut_vintage: 'v1.0.0_8365fa4' +nowcast_mut_vintage: 'v1.0.0_fd271dc' usa_base_io_data_year: 2022 usa_ghg_data_year: 2022 bea_price_index_vintage: '2026Q2' @@ -29,7 +30,7 @@ bea_price_index_vintage: '2026Q2' ##### # Methodology selection ##### -cornerstone_ghg_fbs_filename: GHG_national_Cornerstone_2022_v1.0.0_8365fa4.parquet +cornerstone_ghg_fbs_filename: GHG_national_Cornerstone_2022_v1.0.0_fd271dc.parquet apply_io_year_adjustments: False implement_waste_disaggregation: True waste_weights_year: match_io @@ -46,7 +47,7 @@ hold_electric_gas_on_eia: True # applied after Step 7. electric_output_on_eia_level: True electricity_delivery_margin: True -# Fixes merged 2026-11-10, rebuilt together in v1.0.0_8365fa4 (#1249). +# Fixes merged 2026-11-10, rebuilt together in v1.0.0_fd271dc (#1249). # AIES output chain (#1231): withheld codes, 325190 on BEA, gas distribution. fill_withheld_aies_codes: True hold_aies_outliers_on_bea: True @@ -59,3 +60,6 @@ cap_margins_at_purchase: True pin_refinery_secondaries_at_go_mix: True # Air freight revenue at the AIES level from 2023 (#1251, #1274). air_margin_on_aies_level: True +# Spread each year's trade margin over the goods by their own supply, not by +# frozen 2017 shares (#1194, #1260). +trade_margin_receivers_follow_supply: True diff --git a/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2023.yaml b/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2023.yaml index 6ed12d81e..9cf338449 100644 --- a/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2023.yaml +++ b/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2023.yaml @@ -1,9 +1,10 @@ # Cornerstone 2026 model - v1.0, calendar year 2023. # # Same methodology as 2026_usa_cornerstone_v1_0 for year 2023. -# nowcast_mut_vintage v1.0.0_8365fa4 is the 2017-2024 rebuild on the 2026 BEA +# nowcast_mut_vintage v1.0.0_fd271dc is the 2017-2024 rebuild on the 2026 BEA # annual update, with electric output on EIA's 2017 level and the 2026-11-10 -# fixes below (#1249). +# fixes below (#1249), the balance and export fixes of 11-12 (#1270, #1293) +# and the trade margin receivers (#1194). # bea_price_index_vintage 2026Q2 is the index those tables were built with. The # GHG loader returns GHG_national_Cornerstone_2023. # cornerstone_ghg_fbs_filename names the GCS object loaded for E. When @@ -21,7 +22,7 @@ iot_before_or_after_redefinition: after # Data selection ##### usa_detail_io_source: nowcast -nowcast_mut_vintage: 'v1.0.0_8365fa4' +nowcast_mut_vintage: 'v1.0.0_fd271dc' usa_base_io_data_year: 2023 usa_ghg_data_year: 2023 bea_price_index_vintage: '2026Q2' @@ -29,7 +30,7 @@ bea_price_index_vintage: '2026Q2' ##### # Methodology selection ##### -cornerstone_ghg_fbs_filename: GHG_national_Cornerstone_2023_v1.0.0_8365fa4.parquet +cornerstone_ghg_fbs_filename: GHG_national_Cornerstone_2023_v1.0.0_fd271dc.parquet apply_io_year_adjustments: False implement_waste_disaggregation: True waste_weights_year: match_io @@ -46,7 +47,7 @@ hold_electric_gas_on_eia: True # applied after Step 7. electric_output_on_eia_level: True electricity_delivery_margin: True -# Fixes merged 2026-11-10, rebuilt together in v1.0.0_8365fa4 (#1249). +# Fixes merged 2026-11-10, rebuilt together in v1.0.0_fd271dc (#1249). # AIES output chain (#1231): withheld codes, 325190 on BEA, gas distribution. fill_withheld_aies_codes: True hold_aies_outliers_on_bea: True @@ -59,3 +60,6 @@ cap_margins_at_purchase: True pin_refinery_secondaries_at_go_mix: True # Air freight revenue at the AIES level from 2023 (#1251, #1274). air_margin_on_aies_level: True +# Spread each year's trade margin over the goods by their own supply, not by +# frozen 2017 shares (#1194, #1260). +trade_margin_receivers_follow_supply: True diff --git a/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2024.yaml b/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2024.yaml index 0f8850589..7c08996ba 100644 --- a/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2024.yaml +++ b/bedrock/utils/config/configs/2026_usa_cornerstone_v1_0_2024.yaml @@ -1,9 +1,10 @@ # Cornerstone 2026 model - v1.0, calendar year 2024. # # Same methodology as 2026_usa_cornerstone_v1_0 for year 2024. -# nowcast_mut_vintage v1.0.0_8365fa4 is the 2017-2024 rebuild on the 2026 BEA +# nowcast_mut_vintage v1.0.0_fd271dc is the 2017-2024 rebuild on the 2026 BEA # annual update, with electric output on EIA's 2017 level and the 2026-11-10 -# fixes below (#1249). +# fixes below (#1249), the balance and export fixes of 11-12 (#1270, #1293) +# and the trade margin receivers (#1194). # bea_price_index_vintage 2026Q2 is the index those tables were built with. The # GHG loader returns GHG_national_Cornerstone_2024. # cornerstone_ghg_fbs_filename names the GCS object loaded for E. When @@ -21,7 +22,7 @@ iot_before_or_after_redefinition: after # Data selection ##### usa_detail_io_source: nowcast -nowcast_mut_vintage: 'v1.0.0_8365fa4' +nowcast_mut_vintage: 'v1.0.0_fd271dc' usa_base_io_data_year: 2024 usa_ghg_data_year: 2024 bea_price_index_vintage: '2026Q2' @@ -29,7 +30,7 @@ bea_price_index_vintage: '2026Q2' ##### # Methodology selection ##### -cornerstone_ghg_fbs_filename: GHG_national_Cornerstone_2024_v1.0.0_8365fa4.parquet +cornerstone_ghg_fbs_filename: GHG_national_Cornerstone_2024_v1.0.0_fd271dc.parquet apply_io_year_adjustments: False implement_waste_disaggregation: True waste_weights_year: match_io @@ -46,7 +47,7 @@ hold_electric_gas_on_eia: True # applied after Step 7. electric_output_on_eia_level: True electricity_delivery_margin: True -# Fixes merged 2026-11-10, rebuilt together in v1.0.0_8365fa4 (#1249). +# Fixes merged 2026-11-10, rebuilt together in v1.0.0_fd271dc (#1249). # AIES output chain (#1231): withheld codes, 325190 on BEA, gas distribution. fill_withheld_aies_codes: True hold_aies_outliers_on_bea: True @@ -59,3 +60,6 @@ cap_margins_at_purchase: True pin_refinery_secondaries_at_go_mix: True # Air freight revenue at the AIES level from 2023 (#1251, #1274). air_margin_on_aies_level: True +# Spread each year's trade margin over the goods by their own supply, not by +# frozen 2017 shares (#1194, #1260). +trade_margin_receivers_follow_supply: True diff --git a/bedrock/utils/snapshots/cornerstone_ghg_fbs_2024_pin.json b/bedrock/utils/snapshots/cornerstone_ghg_fbs_2024_pin.json index 3f8499fc0..e09f809ee 100644 --- a/bedrock/utils/snapshots/cornerstone_ghg_fbs_2024_pin.json +++ b/bedrock/utils/snapshots/cornerstone_ghg_fbs_2024_pin.json @@ -2,6 +2,6 @@ "method": "GHG_national_Cornerstone_2024", "usa_config": "2026_usa_cornerstone_v1_0", "gcs_sub_bucket": "transform/output_data", - "filename": "GHG_national_Cornerstone_2024_v1.0.0_8365fa4.parquet", - "sha256": "067cd99beb43b586e26135387d4bd273ad98812e8684a1e3e43e60f1aa88d4d1" + "filename": "GHG_national_Cornerstone_2024_v1.0.0_fd271dc.parquet", + "sha256": "f846719311e07765a06f7b0ce1cd6f0e09bc48caf51bd9ab3238d7a6de148b5d" } diff --git a/bedrock/utils/snapshots/nowcast_balanced_sut_2024_pin.json b/bedrock/utils/snapshots/nowcast_balanced_sut_2024_pin.json index 1bb9afdc1..7a2419fbf 100644 --- a/bedrock/utils/snapshots/nowcast_balanced_sut_2024_pin.json +++ b/bedrock/utils/snapshots/nowcast_balanced_sut_2024_pin.json @@ -4,12 +4,12 @@ "usa_config": "2026_usa_cornerstone_v1_0", "tables": { "use": { - "filename": "Balanced_Detail_Use_SUT_2024_v1.0.0_8365fa4.parquet", - "sha256": "db0dfdb2e23efa4511e1d54c57570ddfc0aa842a6f148cb753f487ce6ee5f889" + "filename": "Balanced_Detail_Use_SUT_2024_v1.0.0_fd271dc.parquet", + "sha256": "2a6130da528c889723a82261c029608927245afdac8d541e8bd71ee16c0d29e9" }, "supply": { - "filename": "Balanced_Detail_Supply_2024_v1.0.0_8365fa4.parquet", - "sha256": "68e283b2f1f76936cb825d467ac5c8e6fb919c10f26d6a95bc7f99ea9543460a" + "filename": "Balanced_Detail_Supply_2024_v1.0.0_fd271dc.parquet", + "sha256": "cc9d68deb93f96aae21d2da8776c743ce942c449d4d005d123cadce1aaa14abc" } } } diff --git a/bedrock/utils/validation/__tests__/test_eeio_diagnostics.py b/bedrock/utils/validation/__tests__/test_eeio_diagnostics.py index 7b52210a2..85cee4028 100644 --- a/bedrock/utils/validation/__tests__/test_eeio_diagnostics.py +++ b/bedrock/utils/validation/__tests__/test_eeio_diagnostics.py @@ -414,13 +414,6 @@ def test_compare_output_and_L_y( @pytest.mark.eeio_integration -@pytest.mark.xfail( - reason=( - 'Make and Use disagree on commodity output. On MUT v1.0.0_8365fa4 ' - '(2024) one sector fails: 334118 (+4.4%), whose imports exceed its ' - 'use. 2017-2023 pass.' - ), -) def test_domestic_L_y_from_use_final_demand_equals_q( canonical_usa_config: None, ) -> None: diff --git a/scripts/rebuild_nowcast_year.py b/scripts/rebuild_nowcast_year.py index afbb0e902..e8affd69d 100644 --- a/scripts/rebuild_nowcast_year.py +++ b/scripts/rebuild_nowcast_year.py @@ -54,6 +54,7 @@ 'cap_margins_at_purchase', 'pin_refinery_secondaries_at_go_mix', 'air_margin_on_aies_level', + 'trade_margin_receivers_follow_supply', ) AFTER_MUT = 'Nowcast_Detail_Use_AfterRedef' GHG_METHODS = (