TNO Intern

Commit 450cd113 authored by Hen Brett's avatar Hen Brett 🐔
Browse files

Merge branch '35-use-the-new-jar-file-which-can-process-viscosity-modes' into 'main'

Resolve "use the new jar file which can process viscosity modes"

Closes #35

See merge request AGS/pythermogis!36
parents e99219f8 15d487c4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -64,7 +64,8 @@ This package requires a Java 17 VM (we recommend using [Amazon Corretto 17](http
- `JAVA_HOME`: Path to the Java 17 installation
  *(e.g., on Windows: `C:\Program Files\Amazon Corretto\jdk17.0.0_0`)*

- `THERMOGIS_JAR`: Path to the ThermoGIS `.jar` file
- `THERMOGIS_JAR`: Path to the ThermoGIS `.jar` file; __including__ the name of the jar file
  *(e.g. `/path/to/the/thermogis-1.7.0-shaded.jar`)*

---

−88.3 KiB
Loading image diff...
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ class PyThermoGIS(TestCase):
        #
        #   Plotting
        #
        plot = True
        plot = False
        if plot:
            # Plot the transmissivity as a function of pvalue for both the python and Java implementation
            fig, axes = plt.subplots(1, 4, figsize=(20, 10))
+7 −2
Original line number Diff line number Diff line
from os import path
from pathlib import Path
from unittest import TestCase
import xarray as xr

from pythermogis import *

@@ -25,6 +23,13 @@ class UTCBuilder(TestCase):
        # If test reaches here, then parsing of xml's worked, check that the scenarios actually run on a set of test data:
        [self.run_scenario(utc_property) for utc_property in utc_properties]

    def test_set_useKestinViscosity(self):
        """
        An earlier version of the ThermoGIS java code didn't allow the setting of the viscosity mode by parsing the properties; this has been added from v1.7 (of the Java code) onwards
        """

        utc_properties =  instantiate_utc_properties_builder().setUseKestinViscosity(True).build()
        self.run_scenario(utc_properties)

    def run_scenario(self, utc_properties):
        input_data = xr.Dataset({