88from scipy .ndimage import maximum_filter
99
1010from geophires_docs import _PROJECT_ROOT
11+ from geophires_docs import _get_full_production_temperature_profile
1112from geophires_docs import _get_logger
13+ from geophires_x_client import GeophiresXResult
14+ from geophires_x_client import ImmutableGeophiresInputParameters
1215
1316_log = _get_logger (__name__ )
1417
@@ -230,7 +233,7 @@ def _get_steady_state_mask(df_prod: pd.DataFrame, steady_state_start_years: floa
230233def _generate_production_temperature_graph_from_fervo_graph_data_csv_and_project_red_geophires_result_data (
231234 production_csv_path : Path ,
232235 model_csv_path : Path ,
233- steady_state_csv_path : Path ,
236+ # steady_state_csv_path: Path, # unused...
234237 output_path : Path ,
235238 steady_state_start_years : float = _STEADY_STATE_START_YEARS ,
236239 # TODO/WIP pass GEOPHIRES production profile data
@@ -271,7 +274,7 @@ def _generate_production_temperature_graph_from_fervo_graph_data_csv_and_project
271274 alpha = 0.5 ,
272275 label = 'Measured '
273276 # f'Flowing '
274- 'Temperature (Excluded Operational Periods)' ,
277+ 'Temperature (Excluded Operational Periods)' , # TODO better wording/phrasing
275278 # f', n={len(df_excluded)}',
276279 )
277280
@@ -287,9 +290,7 @@ def _generate_production_temperature_graph_from_fervo_graph_data_csv_and_project
287290 ax .set_xlabel ('Time (Years)' , fontsize = 12 )
288291 ax .set_ylabel ('Temperature (°C)' , fontsize = 12 )
289292 ax .set_title (
290- 'Project Red Temperature: Measured vs. Fervo-Modeled'
291- # ' vs. GEOPHIRES-Modeled' # WIP/TODO
292- '' ,
293+ 'Project Red Temperature: Measured vs. Fervo-Modeled' ' vs. GEOPHIRES-Modeled' '' ,
293294 fontsize = 13 ,
294295 )
295296
@@ -305,11 +306,13 @@ def _generate_production_temperature_graph_from_fervo_graph_data_csv_and_project
305306 plt .close (fig )
306307
307308
309+ def _get_file_path (file_name ) -> Path :
310+ return Path (__file__ ).parent / file_name
311+
312+
308313if __name__ == '__main__' :
309- IMAGE_PATH = Path (__file__ ).parent / 'fervo-project-red-2026_figure-5_measured-flowing-temperature.png'
310- PRODUCTION_IMAGE_PATH = (
311- Path (__file__ ).parent / 'fervo_project_red-2026_graph-data-extraction_production-series-edited.png'
312- )
314+ IMAGE_PATH = _get_file_path ('fervo-project-red-2026_figure-5_measured-flowing-temperature.png' )
315+ PRODUCTION_IMAGE_PATH = _get_file_path ('fervo_project_red-2026_graph-data-extraction_production-series-edited.png' )
313316
314317 _BUILD_DIR .mkdir (parents = True , exist_ok = True )
315318 production_csv_path = _BUILD_DIR / _PRODUCTION_CSV_FILENAME
@@ -343,7 +346,18 @@ def _generate_production_temperature_graph_from_fervo_graph_data_csv_and_project
343346 df_steady_state .to_csv (steady_state_csv_path , index = False )
344347 _log .info (f'Wrote variance analysis CSV: { steady_state_csv_path } ' )
345348
349+ project_red_geophires_result_data = _get_full_production_temperature_profile (
350+ ImmutableGeophiresInputParameters (
351+ from_file_path = _get_file_path ('../../tests/examples/Fervo_Project_Red-2026.txt' )
352+ ),
353+ GeophiresXResult (_get_file_path ('../../tests/examples/Fervo_Project_Red-2026.out' )),
354+ )
355+
346356 _generate_production_temperature_graph_from_fervo_graph_data_csv_and_project_red_geophires_result_data (
347- production_csv_path , model_csv_path , steady_state_csv_path , regenerated_graph_path
357+ production_csv_path ,
358+ model_csv_path ,
359+ # steady_state_csv_path, # unused...
360+ regenerated_graph_path ,
361+ # TODO/WIP pass project_red_geophires_result_data as series with interpolation matching csvs
348362 )
349363 _log .info (f'Wrote regenerated graph: { regenerated_graph_path } ' )
0 commit comments