Open jkikstra opened 1 year ago
Nicely described @jkikstra. I think the fix proposed sounds good, but wanted to ask a clarifying question to help make communication easier moving forward.
Should we call the test file ar6_minimum_emissions.csv
? I thought for AR6, the minimum emissions also included CH4 and N2O and the checks would fail if all that was there? Should we just call the test file minimum_emissions.csv
and when we do the next release bump the major version to make clear that scenarios which would have failed AR6 will now pass?
Desired behaviour The current code should allow for a scenario to be run with only
Emissions|CO2|Energy and Industrial Processes
or even onlyEmissions|CO2
.Issue If running based on an emissions file where all scenarios only have one of these variables (only
"Emissions|CO2*"
), then we get the following error (I usedrun-example-fair.ipynb
to produce this error, with changed input dataEMISSIONS_INPUT_FILE = "ar6_minimum_emissions.csv"
) :...
Proposed minimum solution Add if-statement(s) where necessary, like:
if not df.filter(variable=f"{prefix}Emissions|CO2*", keep=False).timeseries()
Proposed ideal solution Add a test that takes in a minimum emissions file like ar6_minimum_emissions.csv, and that checks either: i. whether all checks are passed OR ii. that a complete infilled emissions set is provided based on this input.