Loading pythermogis/cli.py +8 −10 Original line number Diff line number Diff line Loading @@ -39,8 +39,7 @@ def simulate_doublet( 0.5, help="The net-to-gross of the aquifer, units: [0-1]" ), porosity: float = typer.Option( 0.5, help="The porosity of the aquifer, between 0-1 (1 = 100%), " "units: [0-1]" 0.5, help="The porosity of the aquifer, between 0-1 (1 = 100%), units: [0-1]" ), permeability: float = typer.Option( 150, help="The permeability of the aquifer, units: [mD]" Loading Loading @@ -116,8 +115,7 @@ def potential( 0.5, help="The net-to-gross of the aquifer, units: [0-1]" ), porosity: float = typer.Option( 0.5, help="The porosity of the aquifer, between 0-1 (1 = 100%), " "units: [0-1]" 0.5, help="The porosity of the aquifer, between 0-1 (1 = 100%), units: [0-1]" ), depth: float = typer.Option( 500, help="The depth of the aquifer, +ive downwards, units: [m]" Loading pythermogis/doublet.py +1 −1 Original line number Diff line number Diff line Loading @@ -189,7 +189,7 @@ def validate_input_deterministic(reservoir_properties: xr.Dataset): "Both reservoir permeability and transmissivity provided; however the " "doublet simulation will use only the provided transmissivity and ignore" " permeability (transmissivity = permeability * thickness)", stacklevel=2 stacklevel=2, ) # check that certain variables are always >0 Loading tests/test_benchmarks.py +11 −8 Original line number Diff line number Diff line Loading @@ -2,14 +2,13 @@ from unittest import TestCase import numpy as np import pytest from jpype import JClass import xarray as xr from pythermogis.jvm import start_jvm from pythermogis.mock import create_logger_mock from doublet import calculate_doublet_performance_stochastic from jpype import JClass from properties import instantiate_thermogis_parameters from pythermogis.jvm import start_jvm from pythermogis.mock import create_logger_mock class ThermoGISDoubletBenchmark(TestCase): Loading Loading @@ -412,7 +411,8 @@ class PythermoGISDoubletBenchmark(TestCase): # Act results = calculate_doublet_performance_stochastic( input_data, utc_properties=utc_properties, input_data, utc_properties=utc_properties, ) # Assert Loading Loading @@ -456,7 +456,8 @@ class PythermoGISDoubletBenchmark(TestCase): # Act results = calculate_doublet_performance_stochastic( input_data, utc_properties=utc_properties, input_data, utc_properties=utc_properties, ) # Assert Loading Loading @@ -501,7 +502,8 @@ class PythermoGISDoubletBenchmark(TestCase): # Act results = calculate_doublet_performance_stochastic( input_data, utc_properties=utc_properties, input_data, utc_properties=utc_properties, ) # Assert Loading Loading @@ -545,7 +547,8 @@ class PythermoGISDoubletBenchmark(TestCase): # Act results = calculate_doublet_performance_stochastic( input_data, utc_properties=utc_properties, input_data, utc_properties=utc_properties, ) power_hpelec = results.heat_pump_power / (results.cophp - 1) power_ratio = results.power / (results.power + power_hpelec) Loading tests/test_dask.py +2 −4 Original line number Diff line number Diff line import timeit from pathlib import Path import pytest import numpy as np import matplotlib.pyplot as plt import numpy as np import pytest import xarray as xr from pythermogis.dask import auto_chunk_dataset Loading Loading @@ -106,7 +105,6 @@ def test_1d_dataarray(): assert _max_chunk_size(result) <= 100 def test_dask_parralelization(): output_data_path = ( Path(__file__).parent.parent / "resources" / "test_output" / "parallelization" Loading tests/test_doc_examples.py +2 −4 Original line number Diff line number Diff line Loading @@ -280,9 +280,7 @@ def test_example_7(): input_data_path = ( Path(__file__).parent / "resources" / "test_input" / "example_data" ) output_data_path = ( Path(__file__).parent / "resources" / "test_output" / "example7" ) output_data_path = Path(__file__).parent / "resources" / "test_output" / "example7" output_data_path.mkdir(parents=True, exist_ok=True) # read in reservoir property maps Loading Loading
pythermogis/cli.py +8 −10 Original line number Diff line number Diff line Loading @@ -39,8 +39,7 @@ def simulate_doublet( 0.5, help="The net-to-gross of the aquifer, units: [0-1]" ), porosity: float = typer.Option( 0.5, help="The porosity of the aquifer, between 0-1 (1 = 100%), " "units: [0-1]" 0.5, help="The porosity of the aquifer, between 0-1 (1 = 100%), units: [0-1]" ), permeability: float = typer.Option( 150, help="The permeability of the aquifer, units: [mD]" Loading Loading @@ -116,8 +115,7 @@ def potential( 0.5, help="The net-to-gross of the aquifer, units: [0-1]" ), porosity: float = typer.Option( 0.5, help="The porosity of the aquifer, between 0-1 (1 = 100%), " "units: [0-1]" 0.5, help="The porosity of the aquifer, between 0-1 (1 = 100%), units: [0-1]" ), depth: float = typer.Option( 500, help="The depth of the aquifer, +ive downwards, units: [m]" Loading
pythermogis/doublet.py +1 −1 Original line number Diff line number Diff line Loading @@ -189,7 +189,7 @@ def validate_input_deterministic(reservoir_properties: xr.Dataset): "Both reservoir permeability and transmissivity provided; however the " "doublet simulation will use only the provided transmissivity and ignore" " permeability (transmissivity = permeability * thickness)", stacklevel=2 stacklevel=2, ) # check that certain variables are always >0 Loading
tests/test_benchmarks.py +11 −8 Original line number Diff line number Diff line Loading @@ -2,14 +2,13 @@ from unittest import TestCase import numpy as np import pytest from jpype import JClass import xarray as xr from pythermogis.jvm import start_jvm from pythermogis.mock import create_logger_mock from doublet import calculate_doublet_performance_stochastic from jpype import JClass from properties import instantiate_thermogis_parameters from pythermogis.jvm import start_jvm from pythermogis.mock import create_logger_mock class ThermoGISDoubletBenchmark(TestCase): Loading Loading @@ -412,7 +411,8 @@ class PythermoGISDoubletBenchmark(TestCase): # Act results = calculate_doublet_performance_stochastic( input_data, utc_properties=utc_properties, input_data, utc_properties=utc_properties, ) # Assert Loading Loading @@ -456,7 +456,8 @@ class PythermoGISDoubletBenchmark(TestCase): # Act results = calculate_doublet_performance_stochastic( input_data, utc_properties=utc_properties, input_data, utc_properties=utc_properties, ) # Assert Loading Loading @@ -501,7 +502,8 @@ class PythermoGISDoubletBenchmark(TestCase): # Act results = calculate_doublet_performance_stochastic( input_data, utc_properties=utc_properties, input_data, utc_properties=utc_properties, ) # Assert Loading Loading @@ -545,7 +547,8 @@ class PythermoGISDoubletBenchmark(TestCase): # Act results = calculate_doublet_performance_stochastic( input_data, utc_properties=utc_properties, input_data, utc_properties=utc_properties, ) power_hpelec = results.heat_pump_power / (results.cophp - 1) power_ratio = results.power / (results.power + power_hpelec) Loading
tests/test_dask.py +2 −4 Original line number Diff line number Diff line import timeit from pathlib import Path import pytest import numpy as np import matplotlib.pyplot as plt import numpy as np import pytest import xarray as xr from pythermogis.dask import auto_chunk_dataset Loading Loading @@ -106,7 +105,6 @@ def test_1d_dataarray(): assert _max_chunk_size(result) <= 100 def test_dask_parralelization(): output_data_path = ( Path(__file__).parent.parent / "resources" / "test_output" / "parallelization" Loading
tests/test_doc_examples.py +2 −4 Original line number Diff line number Diff line Loading @@ -280,9 +280,7 @@ def test_example_7(): input_data_path = ( Path(__file__).parent / "resources" / "test_input" / "example_data" ) output_data_path = ( Path(__file__).parent / "resources" / "test_output" / "example7" ) output_data_path = Path(__file__).parent / "resources" / "test_output" / "example7" output_data_path.mkdir(parents=True, exist_ok=True) # read in reservoir property maps Loading