gcages.cmip7_scenariomip.harmonisation#
Harmonisation helpers for the CMIP7 ScenarioMIP workflow
Functions:
| Name | Description |
|---|---|
create_cmip7_scenariomip_global_harmoniser |
Create an Aneris harmoniser configured for CMIP7 ScenarioMIP global emissions. |
load_aneris_overrides_file |
Load aneris overrides for CMIP7 ScenarioMIP harmonisation. |
load_cmip7_scenariomip_historical_emissions |
Load historical emissions for CMIP7 ScenarioMIP harmonisation. |
create_cmip7_scenariomip_global_harmoniser #
create_cmip7_scenariomip_global_harmoniser(
cmip7_scenariomip_global_historical_emissions_file: Path,
aneris_global_overrides_file: Path,
run_checks: bool = True,
progress: bool = True,
n_processes: int | None = cpu_count(),
) -> AnerisHarmoniser
Create an Aneris harmoniser configured for CMIP7 ScenarioMIP global emissions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cmip7_scenariomip_global_historical_emissions_file
|
Path
|
File containing CMIP7 ScenarioMIP historical emissions. |
required |
aneris_global_overrides_file
|
Path
|
File containing aneris overrides for the global workflow. |
required |
run_checks
|
bool
|
Should checks of input and output data be performed? |
True
|
progress
|
bool
|
Should progress bars be shown? |
True
|
n_processes
|
int | None
|
Number of processes to use for parallel processing. |
cpu_count()
|
Returns:
| Type | Description |
|---|---|
AnerisHarmoniser
|
Harmoniser that will behave in line with CMIP7 ScenarioMIP's global workflow |
Source code in src/gcages/cmip7_scenariomip/harmonisation.py
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | |
load_aneris_overrides_file #
Load aneris overrides for CMIP7 ScenarioMIP harmonisation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filepath
|
Path
|
Path from which to load the file |
required |
Returns:
| Type | Description |
|---|---|
Series[str]
|
Aneris overrides |
Source code in src/gcages/cmip7_scenariomip/harmonisation.py
load_cmip7_scenariomip_historical_emissions #
load_cmip7_scenariomip_historical_emissions(
filepath: Path, check_hash: bool = False
) -> DataFrame
Load historical emissions for CMIP7 ScenarioMIP harmonisation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filepath
|
Path
|
Path from which to load the file |
required |
check_hash
|
bool
|
Check file hash |
False
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
Historical emissions |
Raises:
| Type | Description |
|---|---|
AssertionError
|
We expect to be reading the file from https://zenodo.org/records/17845154/files/global-workflow-history_202511261223_202511040855_202512032146_202512021030_7e32405ade790677a6022ff498395bff00d9792d_202511040855_202512071232_202511040855_202511040855_0002_0002.csv?download=1 |