From 5606ae844f671a6417d08c7e918b39b0b21ee4d6 Mon Sep 17 00:00:00 2001 From: softwareengineerprogrammer <4056124+softwareengineerprogrammer@users.noreply.github.com> Date: Mon, 2 Sep 2024 10:41:36 -0700 Subject: [PATCH 1/7] HIP-RA-X README references --- src/hip_ra_x/README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/hip_ra_x/README.md b/src/hip_ra_x/README.md index 588b5414..d0862e85 100644 --- a/src/hip_ra_x/README.md +++ b/src/hip_ra_x/README.md @@ -1,3 +1,9 @@ -# HIP-RA-X +# HIP-RA: Heat In Place - Resource Assessment + +See: +1. [Heat in Place calculation: Muffler, P., and Raffaele Cataldi. "Methods for regional assessment of geothermal resources." Geothermics 7.2-4 (1978): 53-89.](https://github.com/NREL/GEOPHIRES-X/blob/95e21226faee12128b9ad5d5b12bbd662d02949b/References/Muffler-Cataldi_1978_%20HIP-RA.pdf) +1. [Garg, S.K. and J. Combs. 2011. A Reexamination of the USGS Volumetric "Heat in Place" Method. Stanford University, 36th Workshop on Geothermal Reservoir Engineering; SGP-TR-191, 5 pp.](https://github.com/NREL/GEOPHIRES-X/blob/95e21226faee12128b9ad5d5b12bbd662d02949b/References/Garg-Combs_2011_HIP-RA-Reexamination.pdf) + +## HIP-RA-X HIP-RA-X is the successor version to HIP-RA. From 600bb7d5369cc6cb10f0720076cbd387bb276cbe Mon Sep 17 00:00:00 2001 From: softwareengineerprogrammer <4056124+softwareengineerprogrammer@users.noreply.github.com> Date: Mon, 2 Sep 2024 10:54:10 -0700 Subject: [PATCH 2/7] Generate updated geophires-request.json --- src/geophires_x_schema_generator/geophires-request.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/geophires_x_schema_generator/geophires-request.json b/src/geophires_x_schema_generator/geophires-request.json index de1ff81f..fb1e4cc8 100644 --- a/src/geophires_x_schema_generator/geophires-request.json +++ b/src/geophires_x_schema_generator/geophires-request.json @@ -1103,7 +1103,7 @@ "maximum": 200.0 }, "Economic Model": { - "description": "Specify the economic model to calculate the levelized cost of energy.1: Fixed Charge Rate (FCR); 2: Standard Levelized Cost; 3: BICYCLE; 4: Simple (CLGS)", + "description": "Specify the economic model to calculate the levelized cost of energy. 1: Fixed Charge Rate (FCR); 2: Standard Levelized Cost; 3: BICYCLE; 4: Simple (CLGS)", "type": "integer", "units": null, "category": "Economics", @@ -1824,7 +1824,7 @@ "maximum": 50000 }, "CO2 produced by Natural Gas": { - "description": "CO2 intensity of buring natural gas (how much CO2 is produced per kWh of heat produced (0.407855 lbs/kWh))", + "description": "CO2 intensity of burning natural gas (how much CO2 is produced per kWh of heat produced (0.070324961 lbs/kWh; https://www.epa.gov/energy/greenhouse-gases-equivalencies-calculator-calculations-and-references))", "type": "number", "units": "lbs/kWh", "category": "Economics", From 4791285ca247f67b4a79374e8de99b7ba396db86 Mon Sep 17 00:00:00 2001 From: softwareengineerprogrammer <4056124+softwareengineerprogrammer@users.noreply.github.com> Date: Mon, 2 Sep 2024 11:06:31 -0700 Subject: [PATCH 3/7] Generate HIP-RA-X JSON schema --- src/geophires_x_schema_generator/.gitignore | 5 +- src/geophires_x_schema_generator/__init__.py | 37 ++-- .../hip-ra-x-request.json | 173 ++++++++++++++++++ src/geophires_x_schema_generator/main.py | 25 +-- 4 files changed, 217 insertions(+), 23 deletions(-) create mode 100644 src/geophires_x_schema_generator/hip-ra-x-request.json diff --git a/src/geophires_x_schema_generator/.gitignore b/src/geophires_x_schema_generator/.gitignore index c30948cb..a1de5eca 100644 --- a/src/geophires_x_schema_generator/.gitignore +++ b/src/geophires_x_schema_generator/.gitignore @@ -1 +1,4 @@ -parameters.rst +*parameters.rst +all_messages_conf.log +!geophires-request.json +!hip-ra-x-request.json diff --git a/src/geophires_x_schema_generator/__init__.py b/src/geophires_x_schema_generator/__init__.py index c0868395..0f965f22 100644 --- a/src/geophires_x_schema_generator/__init__.py +++ b/src/geophires_x_schema_generator/__init__.py @@ -24,6 +24,7 @@ from geophires_x.SUTRAReservoir import SUTRAReservoir from geophires_x.SUTRAWellBores import SUTRAWellBores from geophires_x.TDPReservoir import TDPReservoir +from hip_ra_x.hip_ra_x import HIP_RA_X class GeophiresXSchemaGenerator: @@ -41,17 +42,9 @@ def _get_dummy_model(self): sys.argv = stash_sys_argv os.chdir(stash_cwd) - def get_parameters_json(self) -> Tuple[str, str]: + def get_parameter_sources(self) -> list[Tuple[Any, str]]: dummy_model = self._get_dummy_model() - - def with_category(param_dict: dict, category: str): - def _with_cat(p: Parameter, cat: str): - p.parameter_category = cat - return p - - return {k: _with_cat(v, category) for k, v in param_dict.items()} - - parameter_sources = [ + return [ (dummy_model.reserv, 'Reservoir'), (TDPReservoir(dummy_model), 'Reservoir'), (LHSReservoir(dummy_model), 'Reservoir'), @@ -72,6 +65,19 @@ def _with_cat(p: Parameter, cat: str): (EconomicsAddOns(dummy_model), 'Economics'), ] + def get_schema_title(self) -> str: + return 'GEOPHIRES' + + def get_parameters_json(self) -> Tuple[str, str]: + + def with_category(param_dict: dict, category: str): + def _with_cat(p: Parameter, cat: str): + p.parameter_category = cat + return p + + return {k: _with_cat(v, category) for k, v in param_dict.items()} + + parameter_sources = self.get_parameter_sources() output_params = {} input_params = {} for param_source in parameter_sources: @@ -112,7 +118,7 @@ def generate_json_schema(self) -> dict: 'definitions': {}, '$schema': 'http://json-schema.org/draft-04/schema#', 'type': 'object', - 'title': 'GEOPHIRES Schema', + 'title': f'{self.get_schema_title()} Schema', 'required': required, 'properties': properties, } @@ -230,3 +236,12 @@ def _get_min_and_max(param: dict, default_val='') -> Tuple: max_val = max(param['AllowableRange']) return (min_val, max_val) + + +class HipRaXSchemaGenerator(GeophiresXSchemaGenerator): + def get_parameter_sources(self) -> list[Tuple[Any, str]]: + dummy_model = HIP_RA_X() + return [(dummy_model, 'Default')] + + def get_schema_title(self) -> str: + return 'HIP-RA-X' diff --git a/src/geophires_x_schema_generator/hip-ra-x-request.json b/src/geophires_x_schema_generator/hip-ra-x-request.json new file mode 100644 index 00000000..626aab5f --- /dev/null +++ b/src/geophires_x_schema_generator/hip-ra-x-request.json @@ -0,0 +1,173 @@ +{ + "definitions": {}, + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "title": "HIP-RA-X Schema", + "required": [ + "Reservoir Temperature", + "Rejection Temperature", + "Reservoir Porosity", + "Reservoir Area", + "Reservoir Thickness", + "Reservoir Life Cycle", + "Rock Heat Capacity", + "Fluid Specific Heat Capacity", + "Density Of Reservoir Fluid", + "Density Of Reservoir Rock" + ], + "properties": { + "Reservoir Temperature": { + "description": "Reservoir Temperature [150 dec-C]", + "type": "number", + "units": "degC", + "category": "Default", + "default": 0.0, + "minimum": 50, + "maximum": 1000 + }, + "Rejection Temperature": { + "description": "Rejection Temperature [25 dec-C]", + "type": "number", + "units": "degC", + "category": "Default", + "default": 0.0, + "minimum": 0.1, + "maximum": 200 + }, + "Reservoir Porosity": { + "description": "Reservoir Porosity [18%]", + "type": "number", + "units": "%", + "category": "Default", + "default": 0.0, + "minimum": 0.0, + "maximum": 100.0 + }, + "Reservoir Area": { + "description": "Reservoir Area [81 km2]", + "type": "number", + "units": "km**2", + "category": "Default", + "default": 0.0, + "minimum": 0.0, + "maximum": 10000.0 + }, + "Reservoir Thickness": { + "description": "Reservoir Thickness [0.286 km]", + "type": "number", + "units": "kilometer", + "category": "Default", + "default": 0.0, + "minimum": 0.0, + "maximum": 10000.0 + }, + "Reservoir Life Cycle": { + "description": "Reservoir Life Cycle [30 years]", + "type": "integer", + "units": "yr", + "category": "Default", + "default": null, + "minimum": 1, + "maximum": 100 + }, + "Rock Heat Capacity": { + "description": "Rock Heat Capacity [2.84E+12 kJ/km3C]", + "type": "number", + "units": "kJ/km**3C", + "category": "Default", + "default": 0.0, + "minimum": 0.0, + "maximum": 100000000000000.0 + }, + "Fluid Specific Heat Capacity": { + "description": "Specific Heat Capacity Of Water [4.18 kJ/kgC]", + "type": "number", + "units": "kJ/kgC", + "category": "Default", + "default": 0.0, + "minimum": 3.0, + "maximum": 10.0 + }, + "Density Of Reservoir Fluid": { + "description": "Density Of Water [1.0E+12 kg/km3]", + "type": "number", + "units": "kg/km**3", + "category": "Default", + "default": 0.0, + "minimum": 100000000000.0, + "maximum": 10000000000000.0 + }, + "Density Of Reservoir Rock": { + "description": "Density Of Rock [2.55E+12 kg/km3]", + "type": "number", + "units": "kg/km**3", + "category": "Default", + "default": 0.0, + "minimum": 100000000000.0, + "maximum": 10000000000000.0 + }, + "Rock Recoverable Heat": { + "description": "percent of heat that is recoverable from the rock in the reservoir 0.66 for high-T reservoirs, 0.43 for low-T reservoirs (Garg and Combs (2011)", + "type": "number", + "units": "", + "category": "Default", + "default": 0.0, + "minimum": 0.0, + "maximum": 1.0 + }, + "Fluid Recoverable Heat": { + "description": "percent of heat that is recoverable from the fluid in the reservoir 0.66 for high-T reservoirs, 0.43 for low-T reservoirs (Garg and Combs (2011)", + "type": "number", + "units": "", + "category": "Default", + "default": 0.0, + "minimum": 0.0, + "maximum": 1.0 + }, + "Recoverable Fluid Factor": { + "description": "percent of fluid that is recoverable from the reservoir (0.5 = 50%)", + "type": "number", + "units": "", + "category": "Default", + "default": 0.0, + "minimum": 0.0, + "maximum": 1.0 + }, + "Reservoir Depth": { + "description": "depth to top of reservoir (km). Calculated based on an assumed gradient and the reservoir temperature if no value given", + "type": "number", + "units": "kilometer", + "category": "Default", + "default": 0.0, + "minimum": 0.001, + "maximum": 15.0 + }, + "Reservoir Pressure": { + "description": "pressure of the of reservoir (in mPa). Calculated assuming hydrostatic pressure and reservoir depth & water density if no value given", + "type": "number", + "units": "mPa", + "category": "Default", + "default": 0.0, + "minimum": 0.0, + "maximum": 10000.0 + }, + "Recoverable Heat from Rock": { + "description": "percent of fluid that is recoverable from the reservoir (0.75 = 75%)", + "type": "number", + "units": "", + "category": "Default", + "default": 0.0, + "minimum": 0.0, + "maximum": 1.0 + }, + "HTML Output File": { + "description": "Provide a HTML output name if you want to have HTML output (no output if not provided)", + "type": "string", + "units": null, + "category": "Default", + "default": null, + "minimum": null, + "maximum": null + } + } +} diff --git a/src/geophires_x_schema_generator/main.py b/src/geophires_x_schema_generator/main.py index d02b039f..7dfeea9a 100644 --- a/src/geophires_x_schema_generator/main.py +++ b/src/geophires_x_schema_generator/main.py @@ -3,6 +3,7 @@ from pathlib import Path from geophires_x_schema_generator import GeophiresXSchemaGenerator +from geophires_x_schema_generator import HipRaXSchemaGenerator if __name__ == '__main__': parser = argparse.ArgumentParser() @@ -20,18 +21,20 @@ build_dir.mkdir(exist_ok=True) - build_path = Path(build_dir, 'geophires-request.json') + def build(json_file_name: str, generator: GeophiresXSchemaGenerator, rst_file_name: str): + build_path = Path(build_dir, json_file_name) + schema_json = generator.generate_json_schema() - generator = GeophiresXSchemaGenerator() + with open(build_path, 'w') as f: + f.write(json.dumps(schema_json, indent=2)) + print(f'Wrote JSON schema file to {build_path}.') - schema_json = generator.generate_json_schema() + rst = generator.generate_parameters_reference_rst() - with open(build_path, 'w') as f: - f.write(json.dumps(schema_json, indent=2)) - print(f'Wrote schema file to {build_path}.') + build_path_rst = Path(build_dir, rst_file_name) + with open(build_path_rst, 'w') as f: + f.write(rst) + print(f'Wrote RST file to {build_path_rst}.') - rst = generator.generate_parameters_reference_rst() - - build_path_rst = Path(build_dir, 'parameters.rst') - with open(build_path_rst, 'w') as f: - f.write(rst) + build('geophires-request.json', GeophiresXSchemaGenerator(), 'parameters.rst') + build('hip-ra-x-request.json', HipRaXSchemaGenerator(), 'hip_ra_x_parameters.rst') From 27a1c8a83c8c765978b2648e1ef6de2cbbfb33aa Mon Sep 17 00:00:00 2001 From: softwareengineerprogrammer <4056124+softwareengineerprogrammer@users.noreply.github.com> Date: Mon, 2 Sep 2024 11:26:25 -0700 Subject: [PATCH 4/7] Use null category instead of potentially confusing 'Default' for HIP-RA-X params. Include HIP-RA-X parameters in sphinx docs --- .gitignore | 3 ++ docs/index.rst | 1 + src/geophires_x_schema_generator/__init__.py | 13 +++---- .../geophires-request.json | 2 +- .../hip-ra-x-request.json | 34 +++++++++---------- 5 files changed, 29 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index 51095ee9..78f3fa8f 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ requirements.txt .DS_Store *.lock *.json +all_messages_conf.log # C extensions *.so @@ -81,6 +82,8 @@ docs/reference/geophires-request.json docs/reference/parameters.rst docs/geophires-request.json docs/parameters.rst +docs/hip-ra-x-request.json +docs/hip_ra_x_parameters.rst _site/ /docs/geophires_x.rstx /docs/temperature.txt diff --git a/docs/index.rst b/docs/index.rst index 157002af..a48bbd68 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -8,6 +8,7 @@ Contents overview parameters How-to-extend-GEOPHIRES-X + hip_ra_x_parameters Monte-Carlo-User-Guide .. reference/index diff --git a/src/geophires_x_schema_generator/__init__.py b/src/geophires_x_schema_generator/__init__.py index 0f965f22..59293508 100644 --- a/src/geophires_x_schema_generator/__init__.py +++ b/src/geophires_x_schema_generator/__init__.py @@ -66,7 +66,7 @@ def get_parameter_sources(self) -> list[Tuple[Any, str]]: ] def get_schema_title(self) -> str: - return 'GEOPHIRES' + return 'GEOPHIRES-X' def get_parameters_json(self) -> Tuple[str, str]: @@ -138,10 +138,11 @@ def generate_parameters_reference_rst(self) -> str: input_params_by_category[category][input_param_name] = input_param def get_input_params_table(category_params, category_name) -> str: + category_display = category_name if category_name is not None else '' input_rst = f""" -{category_name} -{'-' * len(category_name)} - .. list-table:: {category_name} Parameters +{category_display} +{'-' * len(category_display)} + .. list-table:: {category_display}{' ' if len(category_display) > 0 else ''}Parameters :header-rows: 1 * - Name @@ -176,7 +177,7 @@ def get_input_params_table(category_params, category_name) -> str: output_rst = self.get_output_params_table_rst(output_params_json) - rst = f"""Parameters + rst = f"""{self.get_schema_title()} Parameters ========== .. contents:: @@ -241,7 +242,7 @@ def _get_min_and_max(param: dict, default_val='') -> Tuple: class HipRaXSchemaGenerator(GeophiresXSchemaGenerator): def get_parameter_sources(self) -> list[Tuple[Any, str]]: dummy_model = HIP_RA_X() - return [(dummy_model, 'Default')] + return [(dummy_model, None)] def get_schema_title(self) -> str: return 'HIP-RA-X' diff --git a/src/geophires_x_schema_generator/geophires-request.json b/src/geophires_x_schema_generator/geophires-request.json index fb1e4cc8..107a043e 100644 --- a/src/geophires_x_schema_generator/geophires-request.json +++ b/src/geophires_x_schema_generator/geophires-request.json @@ -2,7 +2,7 @@ "definitions": {}, "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", - "title": "GEOPHIRES Schema", + "title": "GEOPHIRES-X Schema", "required": [ "Reservoir Model", "Reservoir Depth", diff --git a/src/geophires_x_schema_generator/hip-ra-x-request.json b/src/geophires_x_schema_generator/hip-ra-x-request.json index 626aab5f..0319dbe3 100644 --- a/src/geophires_x_schema_generator/hip-ra-x-request.json +++ b/src/geophires_x_schema_generator/hip-ra-x-request.json @@ -20,7 +20,7 @@ "description": "Reservoir Temperature [150 dec-C]", "type": "number", "units": "degC", - "category": "Default", + "category": null, "default": 0.0, "minimum": 50, "maximum": 1000 @@ -29,7 +29,7 @@ "description": "Rejection Temperature [25 dec-C]", "type": "number", "units": "degC", - "category": "Default", + "category": null, "default": 0.0, "minimum": 0.1, "maximum": 200 @@ -38,7 +38,7 @@ "description": "Reservoir Porosity [18%]", "type": "number", "units": "%", - "category": "Default", + "category": null, "default": 0.0, "minimum": 0.0, "maximum": 100.0 @@ -47,7 +47,7 @@ "description": "Reservoir Area [81 km2]", "type": "number", "units": "km**2", - "category": "Default", + "category": null, "default": 0.0, "minimum": 0.0, "maximum": 10000.0 @@ -56,7 +56,7 @@ "description": "Reservoir Thickness [0.286 km]", "type": "number", "units": "kilometer", - "category": "Default", + "category": null, "default": 0.0, "minimum": 0.0, "maximum": 10000.0 @@ -65,7 +65,7 @@ "description": "Reservoir Life Cycle [30 years]", "type": "integer", "units": "yr", - "category": "Default", + "category": null, "default": null, "minimum": 1, "maximum": 100 @@ -74,7 +74,7 @@ "description": "Rock Heat Capacity [2.84E+12 kJ/km3C]", "type": "number", "units": "kJ/km**3C", - "category": "Default", + "category": null, "default": 0.0, "minimum": 0.0, "maximum": 100000000000000.0 @@ -83,7 +83,7 @@ "description": "Specific Heat Capacity Of Water [4.18 kJ/kgC]", "type": "number", "units": "kJ/kgC", - "category": "Default", + "category": null, "default": 0.0, "minimum": 3.0, "maximum": 10.0 @@ -92,7 +92,7 @@ "description": "Density Of Water [1.0E+12 kg/km3]", "type": "number", "units": "kg/km**3", - "category": "Default", + "category": null, "default": 0.0, "minimum": 100000000000.0, "maximum": 10000000000000.0 @@ -101,7 +101,7 @@ "description": "Density Of Rock [2.55E+12 kg/km3]", "type": "number", "units": "kg/km**3", - "category": "Default", + "category": null, "default": 0.0, "minimum": 100000000000.0, "maximum": 10000000000000.0 @@ -110,7 +110,7 @@ "description": "percent of heat that is recoverable from the rock in the reservoir 0.66 for high-T reservoirs, 0.43 for low-T reservoirs (Garg and Combs (2011)", "type": "number", "units": "", - "category": "Default", + "category": null, "default": 0.0, "minimum": 0.0, "maximum": 1.0 @@ -119,7 +119,7 @@ "description": "percent of heat that is recoverable from the fluid in the reservoir 0.66 for high-T reservoirs, 0.43 for low-T reservoirs (Garg and Combs (2011)", "type": "number", "units": "", - "category": "Default", + "category": null, "default": 0.0, "minimum": 0.0, "maximum": 1.0 @@ -128,7 +128,7 @@ "description": "percent of fluid that is recoverable from the reservoir (0.5 = 50%)", "type": "number", "units": "", - "category": "Default", + "category": null, "default": 0.0, "minimum": 0.0, "maximum": 1.0 @@ -137,7 +137,7 @@ "description": "depth to top of reservoir (km). Calculated based on an assumed gradient and the reservoir temperature if no value given", "type": "number", "units": "kilometer", - "category": "Default", + "category": null, "default": 0.0, "minimum": 0.001, "maximum": 15.0 @@ -146,7 +146,7 @@ "description": "pressure of the of reservoir (in mPa). Calculated assuming hydrostatic pressure and reservoir depth & water density if no value given", "type": "number", "units": "mPa", - "category": "Default", + "category": null, "default": 0.0, "minimum": 0.0, "maximum": 10000.0 @@ -155,7 +155,7 @@ "description": "percent of fluid that is recoverable from the reservoir (0.75 = 75%)", "type": "number", "units": "", - "category": "Default", + "category": null, "default": 0.0, "minimum": 0.0, "maximum": 1.0 @@ -164,7 +164,7 @@ "description": "Provide a HTML output name if you want to have HTML output (no output if not provided)", "type": "string", "units": null, - "category": "Default", + "category": null, "default": null, "minimum": null, "maximum": null From 0bdc3e1ebf90ae9487caf879bc6ebdfd4820596f Mon Sep 17 00:00:00 2001 From: softwareengineerprogrammer <4056124+softwareengineerprogrammer@users.noreply.github.com> Date: Mon, 2 Sep 2024 11:34:50 -0700 Subject: [PATCH 5/7] HIP-RA-X params reference links in READMEs --- README.rst | 8 ++++++++ src/hip_ra_x/README.md | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/README.rst b/README.rst index d4ea51bf..10bfa656 100644 --- a/README.rst +++ b/README.rst @@ -349,6 +349,14 @@ Extending GEOPHIRES-X - `Extension example: SUTRA `__ + +HIP-RA: Heat in Place - Resource Assessment +------------------------------------------- + +* `HIP-RA-X README `__ +* `HIP-RA-X Parameters Reference `__ +.. TODO switch over to https://nrel.github.io/GEOPHIRES-X/hip_ra_x_parameters.html once merged + Monte Carlo ----------- diff --git a/src/hip_ra_x/README.md b/src/hip_ra_x/README.md index d0862e85..b160f269 100644 --- a/src/hip_ra_x/README.md +++ b/src/hip_ra_x/README.md @@ -7,3 +7,7 @@ See: ## HIP-RA-X HIP-RA-X is the successor version to HIP-RA. + +## Parameters + +[Parameters Reference](https://softwareengineerprogrammer.github.io/GEOPHIRES-X/hip_ra_x_parameters.html) From 1f0d8179f6a10b59e55ae614dfbb91afd12c92cb Mon Sep 17 00:00:00 2001 From: softwareengineerprogrammer <4056124+softwareengineerprogrammer@users.noreply.github.com> Date: Mon, 2 Sep 2024 11:41:32 -0700 Subject: [PATCH 6/7] Fix multi-line tooltip texts --- .../hip-ra-x-request.json | 8 +++---- src/hip_ra_x/hip_ra_x.py | 24 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/geophires_x_schema_generator/hip-ra-x-request.json b/src/geophires_x_schema_generator/hip-ra-x-request.json index 0319dbe3..da71ed20 100644 --- a/src/geophires_x_schema_generator/hip-ra-x-request.json +++ b/src/geophires_x_schema_generator/hip-ra-x-request.json @@ -107,7 +107,7 @@ "maximum": 10000000000000.0 }, "Rock Recoverable Heat": { - "description": "percent of heat that is recoverable from the rock in the reservoir 0.66 for high-T reservoirs, 0.43 for low-T reservoirs (Garg and Combs (2011)", + "description": "percent of heat that is recoverable from the rock in the reservoir 0.66 for high-T reservoirs, 0.43 for low-T reservoirs (Garg and Combs (2011)", "type": "number", "units": "", "category": null, @@ -116,7 +116,7 @@ "maximum": 1.0 }, "Fluid Recoverable Heat": { - "description": "percent of heat that is recoverable from the fluid in the reservoir 0.66 for high-T reservoirs, 0.43 for low-T reservoirs (Garg and Combs (2011)", + "description": "percent of heat that is recoverable from the fluid in the reservoir 0.66 for high-T reservoirs, 0.43 for low-T reservoirs (Garg and Combs (2011)", "type": "number", "units": "", "category": null, @@ -134,7 +134,7 @@ "maximum": 1.0 }, "Reservoir Depth": { - "description": "depth to top of reservoir (km). Calculated based on an assumed gradient and the reservoir temperature if no value given", + "description": "depth to top of reservoir (km). Calculated based on an assumed gradient and the reservoir temperature if no value given", "type": "number", "units": "kilometer", "category": null, @@ -143,7 +143,7 @@ "maximum": 15.0 }, "Reservoir Pressure": { - "description": "pressure of the of reservoir (in mPa). Calculated assuming hydrostatic pressure and reservoir depth & water density if no value given", + "description": "pressure of the of reservoir (in mPa). Calculated assuming hydrostatic pressure and reservoir depth & water density if no value given", "type": "number", "units": "mPa", "category": null, diff --git a/src/hip_ra_x/hip_ra_x.py b/src/hip_ra_x/hip_ra_x.py index 810b9f5b..fd77d837 100644 --- a/src/hip_ra_x/hip_ra_x.py +++ b/src/hip_ra_x/hip_ra_x.py @@ -260,10 +260,10 @@ def parameter_dict_entry(param: Parameter) -> Parameter: PreferredUnits=PercentUnit.TENTH, CurrentUnits=PercentUnit.TENTH, Required=False, - ErrMessage='assume 0.66 for high-T reservoirs (>150C), 0.43 for low-T reservoirs \ - (>90, Garg and Combs (2011)', - ToolTipText='percent of heat that is recoverable from the rock in the reservoir 0.66 for high-T reservoirs,\ - 0.43 for low-T reservoirs (Garg and Combs (2011)', + ErrMessage='assume 0.66 for high-T reservoirs (>150C), 0.43 for low-T reservoirs ' + '(>90, Garg and Combs (2011)', + ToolTipText='percent of heat that is recoverable from the rock in the reservoir 0.66 for high-T reservoirs, ' + '0.43 for low-T reservoirs (Garg and Combs (2011)', ) ) self.fluid_recoverable_heat: Parameter = parameter_dict_entry( @@ -276,10 +276,10 @@ def parameter_dict_entry(param: Parameter) -> Parameter: PreferredUnits=PercentUnit.TENTH, CurrentUnits=PercentUnit.TENTH, Required=False, - ErrMessage='assume 0.66 for high-T reservoirs (>150C), 0.43 for low-T reservoirs \ - (>90, Garg and Combs (2011)', - ToolTipText='percent of heat that is recoverable from the fluid in the reservoir 0.66 for high-T reservoirs,\ - 0.43 for low-T reservoirs (Garg and Combs (2011)', + ErrMessage='assume 0.66 for high-T reservoirs (>150C), 0.43 for low-T reservoirs ' + '(>90, Garg and Combs (2011)', + ToolTipText='percent of heat that is recoverable from the fluid in the reservoir 0.66 for high-T reservoirs, ' + '0.43 for low-T reservoirs (Garg and Combs (2011)', ) ) self.recoverable_fluid_factor: Parameter = parameter_dict_entry( @@ -308,8 +308,8 @@ def parameter_dict_entry(param: Parameter) -> Parameter: Required=False, Provided=False, ErrMessage='calculate based on an assumed gradient of 30 C/km and the reservoir temperature', - ToolTipText='depth to top of reservoir (km). Calculated based on an assumed gradient \ - and the reservoir temperature if no value given', + ToolTipText='depth to top of reservoir (km). Calculated based on an assumed gradient ' + 'and the reservoir temperature if no value given', ) ) self.reservoir_pressure: Parameter = parameter_dict_entry( @@ -324,8 +324,8 @@ def parameter_dict_entry(param: Parameter) -> Parameter: Required=False, Provided=False, ErrMessage='calculate assuming hydrostatic pressure and the reservoir depth & water density', - ToolTipText='pressure of the of reservoir (in mPa). Calculated assuming hydrostatic pressure and \ - reservoir depth & water density if no value given', + ToolTipText='pressure of the of reservoir (in mPa). Calculated assuming hydrostatic pressure and ' + 'reservoir depth & water density if no value given', ) ) self.recoverable_rock_heat: Parameter = parameter_dict_entry( From c0c1b5d365f97612736013bd6c824bc20d231879 Mon Sep 17 00:00:00 2001 From: softwareengineerprogrammer <4056124+softwareengineerprogrammer@users.noreply.github.com> Date: Mon, 2 Sep 2024 12:12:46 -0700 Subject: [PATCH 7/7] Fix HIP-RA degC references in tooltip text --- src/geophires_x_schema_generator/hip-ra-x-request.json | 4 ++-- src/hip_ra_x/hip_ra_x.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/geophires_x_schema_generator/hip-ra-x-request.json b/src/geophires_x_schema_generator/hip-ra-x-request.json index da71ed20..a22da93d 100644 --- a/src/geophires_x_schema_generator/hip-ra-x-request.json +++ b/src/geophires_x_schema_generator/hip-ra-x-request.json @@ -17,7 +17,7 @@ ], "properties": { "Reservoir Temperature": { - "description": "Reservoir Temperature [150 dec-C]", + "description": "Reservoir Temperature [150 degC]", "type": "number", "units": "degC", "category": null, @@ -26,7 +26,7 @@ "maximum": 1000 }, "Rejection Temperature": { - "description": "Rejection Temperature [25 dec-C]", + "description": "Rejection Temperature [25 degC]", "type": "number", "units": "degC", "category": null, diff --git a/src/hip_ra_x/hip_ra_x.py b/src/hip_ra_x/hip_ra_x.py index fd77d837..fc40c02c 100644 --- a/src/hip_ra_x/hip_ra_x.py +++ b/src/hip_ra_x/hip_ra_x.py @@ -119,8 +119,8 @@ def parameter_dict_entry(param: Parameter) -> Parameter: PreferredUnits=TemperatureUnit.CELSIUS, CurrentUnits=TemperatureUnit.CELSIUS, Required=True, - ErrMessage='assume default reservoir temperature (150 deg-C)', - ToolTipText='Reservoir Temperature [150 dec-C]', + ErrMessage='assume default reservoir temperature (150 degC)', + ToolTipText='Reservoir Temperature [150 degC]', ) ) self.rejection_temperature: Parameter = parameter_dict_entry( @@ -133,8 +133,8 @@ def parameter_dict_entry(param: Parameter) -> Parameter: PreferredUnits=TemperatureUnit.CELSIUS, CurrentUnits=TemperatureUnit.CELSIUS, Required=True, - ErrMessage='assume default rejection temperature (25 deg-C)', - ToolTipText='Rejection Temperature [25 dec-C]', + ErrMessage='assume default rejection temperature (25 degC)', + ToolTipText='Rejection Temperature [25 degC]', ) ) self.reservoir_porosity: Parameter = parameter_dict_entry(