TNO Intern

Commit 6ca6c141 authored by Hen Brett's avatar Hen Brett 🐔
Browse files

adding some comments on the check

parent 9788cdd8
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -138,6 +138,8 @@ class PyThermoGIS(TestCase):
    def assert_output_and_benchmark_is_close(self, benchmark_path, output_grids, p_value, scenario):
        xr.testing.assert_allclose(output_grids[f"permeability"], read_grid(benchmark_path / f"simplified__k_P{p_value}{scenario}.nc"), atol=0.00000001)
        xr.testing.assert_allclose(output_grids[f"thickness"], read_grid(benchmark_path / f"simplified__h_P{p_value}{scenario}.nc"), atol=0.00000001)
        # The large differences in the output grids come from the fact that the way we calculate the Transmissivity P-values in both this python implementation and the java code is not deterministic;
        # we use a sampling method which is imprecise, and without the same random number generator + seed, will not produce exactly the same values between the python and java code
        xr.testing.assert_allclose(output_grids[f"transmissivity_with_ntg"], read_grid(benchmark_path / f"simplified__kh_P{p_value}{scenario}.nc"), atol=4)
        xr.testing.assert_allclose(output_grids.power, read_grid(benchmark_path / f"simplified__power_P{p_value}{scenario}.nc"), atol=1.0)
        xr.testing.assert_allclose(output_grids.utc, read_grid(benchmark_path / f"simplified__utc_P{p_value}{scenario}.nc"), atol=0.1)