Skip to content

PlotInput API Reference

geoloop.plotting.load_data.PlotInput

A class to handle the settings from the plotting configuration file and load the simulation dataset that requires plotting.

Attributes:

Name Type Description
base_dir str or Path object

Base directory for simulation results.

run_names list

Names of the simulation runs.

model_types list

Type of Geoloop model used in the simulations (i.e., ANALYTICAL, FINVOL).

run_types list

Type of simulation runs (i.e., target power (run_type=TIN) or target fluid temperatures (run_type=POWER)).

run_modes list

Modes of runs (i.e., single run (SR), Monte Carlo (MC)).

plot_names list

Names of simulation runs that is used in the legend of the plots. Optional.

plot_nPipes list

Index for pipes dimension (nPipes) to use in the data selection for plotting of the results.

plot_layer_k_ss list

Index for dimension layer_k_s to use in the data selection for plotting of the input parameters.

plot_layer_kgs list

Index for dimension layer_kg to use in the data selection for plotting of the input parameters.

plot_layer_Tgs list

Index for dimension layer_Tg to use in the data selection for plotting of the input parameters.

plot_nzs list

Index for dimension z to use in the data selection for plotting of the results.

plot_ntimes list

Index for dimension time to use in the data selection for plotting of the results.

plot_nzsegs list

Index for dimension zseg to use in the data selection for plotting of the results.

plot_times list

Timesteps in the simulation results for which the depth-profiles are plotted.

plot_temperature_field bool

Flag to plot temperature fields in case of plotting numerical simulation.

plot_time_depth bool

Flag to plot time-depth profiles.

plot_time_parameters list

Parameters to plot in a timeseries plot. Options: dploop, qloop, flowrate, T_fi, T_fo, T_bave, Q_b, COP, Delta_T. Where Delta_T = T_fo - T_fi and COP = Q_b/qloop

plot_depth_parameters list

Parameters to plot in the depth plots. Options: T_b, Tg, T_f, Delta_T

plot_crossplot_barplot bool

Flag to plot scatter crossplots and bar sensitivity plot in case of a Monte Carlo simulation.

newplot bool

Flag for new plot for every listed simulation in the config, or overlay the plots of the listed simulations.

crossplot_vars list

Data variables to plot on the y-axis of the cross plots in case of a Monte Carlo simulation.

from_config classmethod

from_config(config: PlotInputConfig) -> PlotInput

Create a PlotInput instance from a configuration dictionary.

Parameters:

Name Type Description Default
config PlotInputConfig

Configuration object containing parameters for plotting.

required

Returns:

Type Description
PlotInput

list_filenames

list_filenames() -> None

Construct filenames for loading the .h5 files with simulation results.

load_params_result_data

load_params_result_data() -> tuple

Load the .h5 file(s) for the simulations that are plotted.

Returns:

Type Description
Tuple[List[Dataset], List[Dataset]]

A tuple containing simulation input parameter dataset and simulation results dataset.

load_temperature_field_data

load_temperature_field_data() -> list[xr.DataArray]

Only compatible with results of numerical (FINVOL model) simulations, that explicitly saved the calculated temperature grid around the borehole. Load the .h5 file(s) with temperature grid data.

Returns:

Type Description
List[DataArray]

List of temperature field DataArrays.