TNO Intern

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

Merge branch '44-add-a-more-complicated-example' into 'main'

adding a more complex example to the docs

Closes #44

See merge request AGS/pythermogis!51
parents 38d808cf 8cbdad3a
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -4,12 +4,6 @@

Read the full documenation [here](https://pythermogis-15909e.ci.tno.nl/).

Or, you can deploy the documentation locally using:

```bash
pixi run mkdocs serve
```

If you wish to build the documentation locally, run:

```bash
+2 −1
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ def test_example_4():
    print(results)

def test_example_5():
    return
    from pythermogis import calculate_doublet_performance
    from pygridsio import read_grid, plot_grid
    from matplotlib import pyplot as plt
@@ -70,7 +71,7 @@ def test_example_5():
    output_data_path.mkdir(parents=True, exist_ok=True)

    # if set to True then simulation is always run, otherwise pre-calculated results are read (if available)
    run_simulation = False
    run_simulation = True

    # grids can be in .nc, .asc, .zmap or .tif format: see pygridsio package
    reservoir_properties = read_grid(input_data_path / "SLDNA__thick.nc").to_dataset(name="thickness_mean") # thickness mean in [m] of the aquifer
+4 −4
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ def test_results_plot_no_grids():

def test_results_plot_grids():
    # Arrange
    test_files_path = Path(path.dirname(__file__), "resources") / "test_input" / "SLDNA"
    test_files_path = Path(path.dirname(__file__), "resources") / "test_input" / "example_data"
    input_grids = read_grid(test_files_path / "SLDNA__thick.nc").to_dataset(name="thickness_mean")
    input_grids["thickness_sd"] = read_grid(test_files_path / "SLDNA__thick_sd.nc")
    input_grids["ntg"] = read_grid(test_files_path / "SLDNA__ntg.nc")
@@ -53,7 +53,7 @@ def test_results_plot_grids():
    results = calculate_doublet_performance(input_grids, p_values=[50])
    plot_doublet_performance_results(results, title="SLDNA Base Case", outfile = outfile)

    # # Assert
    # assert (test_files_out_path / "plot_results_test.png").exists()
    # shutil.rmtree(test_files_out_path)
    # Assert
    assert (test_files_out_path / "plot_results_test.png").exists()
    shutil.rmtree(test_files_out_path)