TNO Intern

Commit 1bc1c0bf authored by Hen Brett's avatar Hen Brett 🐔
Browse files

adding a test for the mask value

parent 56dc15db
Loading
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
import numpy as np

from pythermogis import calculate_doublet_performance
import xarray as xr

@@ -15,6 +17,22 @@ def test_deterministic_doublet():
    results2 = calculate_doublet_performance(reservoir_properties)
    xr.testing.assert_equal(results1, results2)

def test_deterministic_doublet_mask_value():

    reservoir_properties = xr.Dataset({
        "thickness": 10,
        "porosity": 0.5,
        "ntg": 0.5,
        "depth": 2000,
        "permeability": 200,
        "mask": 0.0,
    })

    results = calculate_doublet_performance(reservoir_properties, mask_value=-9999.0)

    assert results.power.data == -9999.0


def test_deterministic_doublet_temperature_provided():

    reservoir_properties = xr.Dataset({