def test_multimodel_run(test_scenarios, magicc7_is_available): debug_run = False res = run( climate_models_cfgs={ "FaIR": [ {}, { "q": np.array([0.3, 0.45]), "r0": 30.0, "lambda_global": 0.9 }, { "q": np.array([0.35, 0.4]), "r0": 25.0, "lambda_global": 1.1 }, ], "MAGICC7": [ { "core_climatesensitivity": 3, "rf_soxi_dir_wm2": -0.2, "out_temperature": 1, "out_forcing": 1, "out_dynamic_vars": [ "DAT_CO2_CONC", "DAT_AEROSOL_ERF", "DAT_HEATCONTENT_AGGREG_TOTAL", "DAT_HEATUPTK_AGGREG", ], "out_ascii_binary": "BINARY", "out_binary_format": 2, }, { "core_climatesensitivity": 2, "rf_soxi_dir_wm2": -0.1, "out_temperature": 1, "out_forcing": 1, "out_dynamic_vars": [ "DAT_CO2_CONC", "DAT_AEROSOL_ERF", "DAT_HEATCONTENT_AGGREG_TOTAL", "DAT_HEATUPTK_AGGREG", ], "out_ascii_binary": "BINARY", "out_binary_format": 2, }, { "core_climatesensitivity": 5, "rf_soxi_dir_wm2": -0.35, "out_temperature": 1, "out_forcing": 1, "out_dynamic_vars": [ "DAT_CO2_CONC", "DAT_AEROSOL_ERF", "DAT_HEATCONTENT_AGGREG_TOTAL", "DAT_HEATUPTK_AGGREG", ], "out_ascii_binary": "BINARY", "out_binary_format": 2, }, ], }, scenarios=test_scenarios.filter( scenario=["ssp126", "ssp245", "ssp370"]), output_variables=( "Surface Temperature", "Atmospheric Concentrations|CO2", "Heat Content|Ocean", "Heat Uptake|Ocean", "Effective Radiative Forcing", "Effective Radiative Forcing|Aerosols", "Effective Radiative Forcing|CO2", ), out_config=None, ) assert isinstance(res, ScmRun) climate_models = res.get_unique_meta("climate_model") assert any(["MAGICC" in m for m in climate_models]) assert any(["FaIR" in m for m in climate_models]) for climate_model in climate_models: res_cm = res.filter(climate_model=climate_model) assert set(res_cm.get_unique_meta("variable")) == set([ "Surface Temperature", "Effective Radiative Forcing", "Effective Radiative Forcing|Aerosols", "Effective Radiative Forcing|CO2", "Heat Content|Ocean", "Heat Uptake|Ocean", "Atmospheric Concentrations|CO2", ]) quantiles = calculate_quantiles(res, [0.05, 0.17, 0.5, 0.83, 0.95]) _check_res( 1.3603486, quantiles.filter( variable="Surface Temperature", region="World", year=2100, scenario="ssp126", quantile=0.05, ).values, not debug_run, rtol=RTOL, ) _check_res( 2.61950384, quantiles.filter( variable="Surface Temperature", region="World", year=2100, scenario="ssp126", quantile=0.95, ).values, not debug_run, rtol=RTOL, ) _check_res( 2.99063777, quantiles.filter( variable="Surface Temperature", region="World", year=2100, scenario="ssp370", quantile=0.05, ).values, not debug_run, rtol=RTOL, ) _check_res( 5.34821243, quantiles.filter( variable="Surface Temperature", region="World", year=2100, scenario="ssp370", quantile=0.95, ).values, not debug_run, rtol=RTOL, ) quantiles_cm = calculate_quantiles( res, [0.05, 0.17, 0.5, 0.83, 0.95], process_over_columns=("run_id", "ensemble_member"), ) _check_res( 1.27586919, quantiles_cm.filter( variable="Surface Temperature", region="World", year=2100, scenario="ssp126", quantile=0.05, climate_model="MAGICC*", ).values, not debug_run, rtol=RTOL, ) _check_res( 5.34663565, quantiles_cm.filter( variable="Surface Temperature", region="World", year=2100, scenario="ssp370", quantile=0.95, climate_model="MAGICC*", ).values, not debug_run, rtol=RTOL, ) _check_res( 1.80924238, quantiles_cm.filter( variable="Surface Temperature", region="World", year=2100, scenario="ssp126", quantile=0.05, climate_model="FaIR*", ).values, not debug_run, rtol=RTOL, ) _check_res( 4.76399179, quantiles_cm.filter( variable="Surface Temperature", region="World", year=2100, scenario="ssp370", quantile=0.95, climate_model="FaIR*", ).values, not debug_run, rtol=RTOL, ) if debug_run: assert False, "Turn off debug"
def test_run( self, test_scenarios, monkeypatch, nworkers, test_data_dir, update_expected_values, ): expected_output_file = os.path.join( test_data_dir, "expected-integration-output", "expected_fair1X_test_run_output.json", ) monkeypatch.setenv("FAIR_WORKER_NUMBER", "{}".format(nworkers)) res = run( climate_models_cfgs={ "FaIR": [ {}, { "q": np.array([0.3, 0.45]), "r0": 30.0, "lambda_global": 0.9 }, { "q": np.array([0.35, 0.4]), "r0": 25.0, "lambda_global": 1.1 }, ], }, scenarios=test_scenarios.filter( scenario=["ssp126", "ssp245", "ssp370"]), output_variables=( "Surface Air Temperature Change", "Atmospheric Concentrations|CO2", "Heat Content", "Effective Radiative Forcing", "Effective Radiative Forcing|Aerosols", "Effective Radiative Forcing|CO2", "CO2 Air to Land Flux", # should be ignored ), out_config=None, ) assert isinstance(res, ScmRun) assert res["run_id"].min() == 0 assert res["run_id"].max() == 8 assert res.get_unique_meta("climate_model", no_duplicates=True) == "FaIRv{}".format( FAIR.get_version()) assert set(res.get_unique_meta("variable")) == set([ "Surface Air Temperature Change", "Atmospheric Concentrations|CO2", "Heat Content", "Effective Radiative Forcing", "Effective Radiative Forcing|Aerosols", "Effective Radiative Forcing|CO2", ]) # check we can also calcluate quantiles assert "run_id" in res.meta quantiles = calculate_quantiles(res, [0, 0.05, 0.17, 0.5, 0.83, 0.95, 1]) assert "run_id" not in quantiles.meta self._check_output(res, expected_output_file, update_expected_values)
def test_run( self, test_scenarios, test_data_dir, update_expected_values, shuffle_column_order, ): expected_output_file = os.path.join( test_data_dir, "expected-integration-output", "expected_ciceroscm_test_run_output.json", ) if shuffle_column_order: tmp = test_scenarios.data cols = tmp.columns.tolist() tmp = tmp[cols[1:] + cols[:1]] test_scenarios = ScmRun(test_scenarios) res = run( scenarios=test_scenarios.filter( scenario=["ssp126", "ssp245", "ssp370"]), climate_models_cfgs={ "CICEROSCM": [ { "model_end": 2100, "Index": 30040, "lambda": 0.540, "akapa": 0.341, "cpi": 0.556, "W": 1.897, "rlamdo": 16.618, "beto": 3.225, "mixed": 107.277, "dirso2_forc": -0.457, "indso2_forc": -0.514, "bc_forc": 0.200, "oc_forc": -0.103, }, { "model_end": 2100, "Index": 1, "lambda": 0.3925, "akapa": 0.2421, "cpi": 0.3745, "W": 0.8172, "rlamdo": 16.4599, "beto": 4.4369, "mixed": 35.4192, "dirso2_forc": -0.3428, "indso2_forc": -0.3856, "bc_forc": 0.1507, "oc_forc": -0.0776, }, ] }, output_variables=( "Surface Air Temperature Change", "Surface Air Ocean Blended Temperature Change", "Heat Content|Ocean", "Effective Radiative Forcing", "Effective Radiative Forcing|Anthropogenic", "Effective Radiative Forcing|Aerosols", "Effective Radiative Forcing|Greenhouse Gases", "Heat Uptake", "Atmospheric Concentrations|CO2", "Atmospheric Concentrations|CH4", "Atmospheric Concentrations|N2O", "Emissions|CO2", "Emissions|CH4", "Emissions|N2O", ), out_config=None, ) assert isinstance(res, ScmRun) assert res["run_id"].min() == 1 assert res["run_id"].max() == 30040 assert res.get_unique_meta("climate_model", no_duplicates=True) == "CICERO-SCM" assert set(res.get_unique_meta("variable")) == set([ "Surface Air Temperature Change", "Surface Air Ocean Blended Temperature Change", "Heat Content|Ocean", "Effective Radiative Forcing", "Effective Radiative Forcing|Anthropogenic", "Effective Radiative Forcing|Aerosols", "Effective Radiative Forcing|Greenhouse Gases", "Heat Uptake", "Atmospheric Concentrations|CO2", "Atmospheric Concentrations|CH4", "Atmospheric Concentrations|N2O", "Emissions|CO2", "Emissions|N2O", "Emissions|CH4", ]) # check we can also calcluate quantiles assert "run_id" in res.meta quantiles = calculate_quantiles(res, [0, 0.05, 0.17, 0.5, 0.83, 0.95, 1]) assert "run_id" not in quantiles.meta assert (res.filter( variable="Atmospheric Concentrations|CO2").get_unique_meta( "unit", True) == "ppm") assert (res.filter( variable="Atmospheric Concentrations|CH4").get_unique_meta( "unit", True) == "ppb") assert (res.filter( variable="Atmospheric Concentrations|N2O").get_unique_meta( "unit", True) == "ppb") assert (res.filter(variable="Emissions|CO2").get_unique_meta( "unit", True) == "PgC / yr") assert (res.filter(variable="Emissions|CH4").get_unique_meta( "unit", True) == "TgCH4 / yr") assert (res.filter(variable="Emissions|N2O").get_unique_meta( "unit", True) == "TgN2ON / yr") # check that emissions were passed through correctly for (scen, variable, unit, exp_val) in ( ("ssp126", "Emissions|CO2", "PgC/yr", -2.3503), ("ssp370", "Emissions|CO2", "PgC/yr", 22.562), ("ssp126", "Emissions|CH4", "TgCH4/yr", 122.195), ("ssp370", "Emissions|CH4", "TgCH4/yr", 777.732), ("ssp126", "Emissions|N2O", "TgN2ON/yr", 5.318), ("ssp370", "Emissions|N2O", "TgN2ON/yr", 13.144), ): res_scen_2100_emms = res.filter(variable=variable, year=2100, scenario=scen).convert_unit(unit) if res_scen_2100_emms.empty: raise AssertionError("No {} data for {}".format( variable, scen)) npt.assert_allclose( res_scen_2100_emms.values, exp_val, rtol=1e-4, ) for (scen, variable, unit, exp_val14, exp_val16) in ( ("ssp126", "Emissions|CH4", "TgCH4/yr", 387.874, 379.956), ("ssp370", "Emissions|CH4", "TgCH4/yr", 387.874, 394.149), ("ssp126", "Emissions|N2O", "TgN2ON/yr", 6.911, 6.858), ("ssp370", "Emissions|N2O", "TgN2ON/yr", 6.911, 7.0477), ): res_scen_2014_emms = res.filter(variable=variable, year=2014, scenario=scen).convert_unit(unit) if res_scen_2014_emms.empty: raise AssertionError("No {} data for {}".format( variable, scen)) res_scen_2016_emms = res.filter(variable=variable, year=2016, scenario=scen).convert_unit(unit) if res_scen_2016_emms.empty: raise AssertionError("No {} data for {}".format( variable, scen)) npt.assert_allclose( res_scen_2014_emms.values, exp_val14, rtol=1e-4, ) npt.assert_allclose( res_scen_2016_emms.values, exp_val16, rtol=1e-4, ) for (scen, variable) in ( ("ssp126", "Effective Radiative Forcing|Aerosols"), ("ssp370", "Effective Radiative Forcing|Aerosols"), ): res_scen_2015_emms = res.filter(variable=variable, year=2015, scenario=scen) if res_scen_2015_emms.empty: raise AssertionError( "No CO2 emissions data for {}".format(scen)) assert not np.equal(res_scen_2015_emms.values, 0).all() ssp245_ghg_erf_2015 = res.filter( variable="Effective Radiative Forcing|Greenhouse Gases", year=2015, scenario="ssp245", run_id=1, ) ssp245_ghg_erf_2014 = res.filter( variable="Effective Radiative Forcing|Greenhouse Gases", year=2014, scenario="ssp245", run_id=1, ) # check that jump in GHG ERF isn't there assert (ssp245_ghg_erf_2015.values.squeeze() - ssp245_ghg_erf_2014.values.squeeze()) < 0.1 ssp245_ch4_conc_2015 = res.filter( variable="Atmospheric Concentrations|CH4", year=2015, scenario="ssp245", run_id=1, ) ssp245_ch4_conc_2014 = res.filter( variable="Atmospheric Concentrations|CH4", year=2014, scenario="ssp245", run_id=1, ) # ch # check that jump in GHG ERF isn't there assert (ssp245_ch4_conc_2014.values.squeeze() - ssp245_ch4_conc_2015.values.squeeze()) < 0.1 self._check_output(res, expected_output_file, update_expected_values)
def test_multimodel_run(test_scenarios, test_data_dir, update_expected_values): expected_output_file = os.path.join( test_data_dir, "expected-integration-output", "expected_run_multimodel_output.json", ) res = run( climate_models_cfgs={ "FaIR": [ {}, {"q": np.array([0.3, 0.45]), "r0": 30.0, "lambda_global": 0.9}, {"q": np.array([0.35, 0.4]), "r0": 25.0, "lambda_global": 1.1}, ], "MAGICC7": [ { "core_climatesensitivity": 3, "rf_soxi_dir_wm2": -0.2, "out_temperature": 1, "out_forcing": 1, "out_dynamic_vars": [ "DAT_CO2_CONC", "DAT_AEROSOL_ERF", "DAT_HEATCONTENT_AGGREG_TOTAL", "DAT_HEATUPTK_AGGREG", ], "out_ascii_binary": "BINARY", "out_binary_format": 2, }, { "core_climatesensitivity": 2, "rf_soxi_dir_wm2": -0.1, "out_temperature": 1, "out_forcing": 1, "out_dynamic_vars": [ "DAT_CO2_CONC", "DAT_AEROSOL_ERF", "DAT_HEATCONTENT_AGGREG_TOTAL", "DAT_HEATUPTK_AGGREG", ], "out_ascii_binary": "BINARY", "out_binary_format": 2, }, { "core_climatesensitivity": 5, "rf_soxi_dir_wm2": -0.35, "out_temperature": 1, "out_forcing": 1, "out_dynamic_vars": [ "DAT_CO2_CONC", "DAT_AEROSOL_ERF", "DAT_HEATCONTENT_AGGREG_TOTAL", "DAT_HEATUPTK_AGGREG", ], "out_ascii_binary": "BINARY", "out_binary_format": 2, }, ], }, scenarios=test_scenarios.filter(scenario=["ssp126", "ssp245", "ssp370"]), output_variables=( "Surface Air Temperature Change", "Atmospheric Concentrations|CO2", "Heat Content|Ocean", "Heat Uptake|Ocean", "Effective Radiative Forcing", "Effective Radiative Forcing|Aerosols", "Effective Radiative Forcing|CO2", ), out_config=None, ) assert isinstance(res, ScmRun) climate_models = res.get_unique_meta("climate_model") assert any(["MAGICC" in m for m in climate_models]) assert any(["FaIR" in m for m in climate_models]) for climate_model in climate_models: res_cm = res.filter(climate_model=climate_model) assert set(res_cm.get_unique_meta("variable")) == set( [ "Surface Air Temperature Change", "Effective Radiative Forcing", "Effective Radiative Forcing|Aerosols", "Effective Radiative Forcing|CO2", "Heat Content|Ocean", "Heat Uptake|Ocean", "Atmospheric Concentrations|CO2", ] ) # check we can also calcluate quantiles assert "run_id" in res.meta quantiles = calculate_quantiles(res, [0, 0.05, 0.17, 0.5, 0.83, 0.95, 1]) assert "run_id" not in quantiles.meta openscm_runner.testing._check_output( res, expected_output_file, rtol=RTOL, update=update_expected_values )
def test_fair_run(test_scenarios): res = run( climate_models_cfgs={ "FaIR": [ {}, { "q": np.array([0.3, 0.45]), "r0": 30.0, "lambda_global": 0.9 }, { "q": np.array([0.35, 0.4]), "r0": 25.0, "lambda_global": 1.1 }, ], }, scenarios=test_scenarios.filter( scenario=["ssp126", "ssp245", "ssp370"]), output_variables=( "Surface Temperature", "Atmospheric Concentrations|CO2", "Heat Content", "Effective Radiative Forcing", "Effective Radiative Forcing|Aerosols", "Effective Radiative Forcing|CO2", "CO2 Air to Land Flux", # should be ignored ), out_config=None, ) assert isinstance(res, ScmRun) assert res["run_id"].min() == 0 assert res["run_id"].max() == 8 assert res.get_unique_meta("climate_model", no_duplicates=True) == "FaIRv{}".format( FAIR.get_version()) assert set(res.get_unique_meta("variable")) == set([ "Surface Temperature", "Atmospheric Concentrations|CO2", "Heat Content", "Effective Radiative Forcing", "Effective Radiative Forcing|Aerosols", "Effective Radiative Forcing|CO2", ]) npt.assert_allclose( 2.2099132544445927, res.filter( variable="Surface Temperature", region="World", year=2100, scenario="ssp126", ).values.max(), rtol=RTOL, ) npt.assert_allclose( 1.7945341435607594, res.filter( variable="Surface Temperature", region="World", year=2100, scenario="ssp126", ).values.min(), rtol=RTOL, ) npt.assert_allclose( 4.824878345585957, res.filter( variable="Surface Temperature", region="World", year=2100, scenario="ssp370", ).values.max(), rtol=RTOL, ) npt.assert_allclose( 4.07184261082167, res.filter( variable="Surface Temperature", region="World", year=2100, scenario="ssp370", ).values.min(), rtol=RTOL, ) # check we can also calcluate quantiles quantiles = calculate_quantiles(res, [0.05, 0.17, 0.5, 0.83, 0.95]) npt.assert_allclose( 1.80924238, quantiles.filter( variable="Surface Temperature", region="World", year=2100, scenario="ssp126", quantile=0.05, ).values, rtol=RTOL, ) npt.assert_allclose( 2.18308358, quantiles.filter( variable="Surface Temperature", region="World", year=2100, scenario="ssp126", quantile=0.95, ).values, rtol=RTOL, ) npt.assert_allclose( 4.08625963, quantiles.filter( variable="Surface Temperature", region="World", year=2100, scenario="ssp370", quantile=0.05, ).values, rtol=RTOL, ) npt.assert_allclose( 4.76399179, quantiles.filter( variable="Surface Temperature", region="World", year=2100, scenario="ssp370", quantile=0.95, ).values, rtol=RTOL, )
def test_run( self, test_scenarios, test_data_dir, update_expected_values, ): expected_output_file = os.path.join( test_data_dir, "expected-integration-output", "expected_magicc7_test_run_output.json", ) res = run( climate_models_cfgs={ "MAGICC7": [ { "core_climatesensitivity": 3, "rf_soxi_dir_wm2": -0.2, "out_temperature": 1, "out_forcing": 1, "out_dynamic_vars": [ "DAT_AEROSOL_ERF", "DAT_HEATCONTENT_AGGREG_TOTAL", "DAT_CO2_AIR2LAND_FLUX", ], "out_ascii_binary": "BINARY", "out_binary_format": 2, }, { "core_climatesensitivity": 2, "rf_soxi_dir_wm2": -0.1, "out_temperature": 1, "out_forcing": 1, "out_ascii_binary": "BINARY", "out_binary_format": 2, }, { "core_climatesensitivity": 5, "rf_soxi_dir_wm2": -0.35, "out_temperature": 1, "out_forcing": 1, "out_ascii_binary": "BINARY", "out_binary_format": 2, }, ], }, scenarios=test_scenarios.filter( scenario=["ssp126", "ssp245", "ssp370"]), output_variables=( "Surface Air Temperature Change", "Effective Radiative Forcing", "Effective Radiative Forcing|Aerosols", "Effective Radiative Forcing|CO2", "Heat Content|Ocean", "Net Atmosphere to Land Flux|CO2", ), ) assert isinstance(res, ScmRun) assert res["run_id"].min() == 0 assert res["run_id"].max() == 8 assert res.get_unique_meta("climate_model", no_duplicates=True) == "MAGICC{}".format( MAGICC7.get_version()) assert set(res.get_unique_meta("variable")) == set([ "Surface Air Temperature Change", "Effective Radiative Forcing", "Effective Radiative Forcing|Aerosols", "Effective Radiative Forcing|CO2", "Heat Content|Ocean", "Net Atmosphere to Land Flux|CO2", ]) # check we can also calcluate quantiles assert "run_id" in res.meta quantiles = calculate_quantiles(res, [0, 0.05, 0.17, 0.5, 0.83, 0.95, 1]) assert "run_id" not in quantiles.meta self._check_output(res, expected_output_file, update_expected_values)
def test_magicc7_run(test_scenarios, magicc7_is_available): debug_run = False res = run( climate_models_cfgs={ "MAGICC7": [ { "core_climatesensitivity": 3, "rf_soxi_dir_wm2": -0.2, "out_temperature": 1, "out_forcing": 1, "out_dynamic_vars": [ "DAT_AEROSOL_ERF", "DAT_HEATCONTENT_AGGREG_TOTAL", "DAT_CO2_AIR2LAND_FLUX", ], "out_ascii_binary": "BINARY", "out_binary_format": 2, }, { "core_climatesensitivity": 2, "rf_soxi_dir_wm2": -0.1, "out_temperature": 1, "out_forcing": 1, "out_ascii_binary": "BINARY", "out_binary_format": 2, }, { "core_climatesensitivity": 5, "rf_soxi_dir_wm2": -0.35, "out_temperature": 1, "out_forcing": 1, "out_ascii_binary": "BINARY", "out_binary_format": 2, }, ], }, scenarios=test_scenarios.filter( scenario=["ssp126", "ssp245", "ssp370"]), output_variables=( "Surface Temperature", "Effective Radiative Forcing", "Effective Radiative Forcing|Aerosols", "Effective Radiative Forcing|CO2", "Heat Content|Ocean", "Net Atmosphere to Land Flux|CO2", ), ) assert isinstance(res, ScmRun) assert res["run_id"].min() == 0 assert res["run_id"].max() == 8 assert res.get_unique_meta("climate_model", no_duplicates=True) == "MAGICC{}".format( MAGICC7.get_version()) assert set(res.get_unique_meta("variable")) == set([ "Surface Temperature", "Effective Radiative Forcing", "Effective Radiative Forcing|Aerosols", "Effective Radiative Forcing|CO2", "Heat Content|Ocean", "Net Atmosphere to Land Flux|CO2", ]) # check ocean heat content unit conversion comes through correctly _check_res( 1824.05, res.filter( unit="ZJ", variable="Heat Content|Ocean", region="World", year=2100, scenario="ssp126", ).values.max(), not debug_run, rtol=RTOL, ) _check_res( 0.472378, res.filter( unit="GtC / yr", variable="Net Atmosphere to Land Flux|CO2", region="World", year=2100, scenario="ssp126", ).values.max(), not debug_run, rtol=RTOL, ) _check_res( 2.756034, res.filter(variable="Surface Temperature", region="World", year=2100, scenario="ssp126").values.max(), not debug_run, rtol=RTOL, ) _check_res( 1.2195495, res.filter(variable="Surface Temperature", region="World", year=2100, scenario="ssp126").values.min(), not debug_run, rtol=RTOL, ) _check_res( 5.5226571, res.filter(variable="Surface Temperature", region="World", year=2100, scenario="ssp370").values.max(), not debug_run, rtol=RTOL, ) _check_res( 2.733369581, res.filter(variable="Surface Temperature", region="World", year=2100, scenario="ssp370").values.min(), not debug_run, rtol=RTOL, ) # check we can also calcluate quantiles quantiles = calculate_quantiles(res, [0.05, 0.17, 0.5, 0.83, 0.95]) _check_res( 1.27586919, quantiles.filter( variable="Surface Temperature", region="World", year=2100, scenario="ssp126", quantile=0.05, ).values, not debug_run, rtol=RTOL, ) _check_res( 2.6587052, quantiles.filter( variable="Surface Temperature", region="World", year=2100, scenario="ssp126", quantile=0.95, ).values, not debug_run, rtol=RTOL, ) _check_res( 2.83627686, quantiles.filter( variable="Surface Temperature", region="World", year=2100, scenario="ssp370", quantile=0.05, ).values, not debug_run, rtol=RTOL, ) _check_res( 5.34663565, quantiles.filter( variable="Surface Temperature", region="World", year=2100, scenario="ssp370", quantile=0.95, ).values, not debug_run, rtol=RTOL, ) if debug_run: assert False, "Turn off debug"