API Reference¶
calculate_doublet_performance_stochastic(reservoir_properties, utc_properties=None, rng_seed=None, p_values=[50.0], chunk_size=None, print_execution_duration=False, mask_value=0.0)
¶
Perform a ThermoGIS Stochastic Doublet performance simulation.
This function computes doublet performance metrics across all dimensions of the input dataset. The input can be scalar, 1D, or 2D gridded data.
If no temperature values are provided, they are estimated from a gradient defined in utc_properties.
If a mask is provided, any non-NaN values in the mask datarray will result in zeroing the output values at those locations.
The ThermoGIS methodology works by simulating doublet performance across percentiles of transmissivity, which in turn is calculated using probability distributions of thickness and permeability. The output results will always contain the dimension p_value; although by default only a P50 simulation is done.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
reservoir_properties
|
Dataset
|
An xarray Dataset containing the required input variables: - thickness_mean - thickness_sd - porosity - ntg - depth - ln_permeability_mean - ln_permeability_sd Optional variables:
- temperature : If not provided, temperature is estimated using the depth and a temperature gradient from |
required |
utc_properties
|
JClass
|
A Java class specifying the properties of the doublet being simulated |
None
|
rng_seed
|
int
|
Random seed used for stochastic components of the simulation. |
None
|
p_values
|
list of float
|
List of probability values (e.g., [0.1, 0.5, 0.9]) for the performance evaluation. If not provided, the default value of P50 (0.5) is used. |
[50.0]
|
chunk_size
|
int
|
None by default, if set to an integer then chunking of the reservoir properties occurs. The chunk size is used to split up the number of simulations into "chunks" which can be processed in parallel using the dask framework. Chunk size involves trade-offs: smaller chunks = more parallelism, but more overhead, while larger chunks = less overhead, but can lead to memory pressure. The optimal chunk size is dependent on the hardware being used to run the simulation. The user should test to find the optimal chunk size. |
None
|
print_execution_duration
|
bool
|
False by default, If set to True print the time in seconds it took to simulate across all reservoir properties |
False
|
mask_value
|
float
|
0.0 by default, Any cell that results in a failed simulation or corresponds to a non-nan value in the mask parameter will be assigned the mask value |
0.0
|
Returns:
| Name | Type | Description |
|---|---|---|
output_data |
Dataset
|
An xarray Dataset with the same spatial dimensions as |
Source code in src/pythermogis/doublet_simulation/stochastic_doublet.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | |
validate_input_data(input_data)
¶
Ensure that the input_data Dataset contains the minimum required variables. Otherwise raise an informative error.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_data
|
Dataset
|
Input dataset that must contain the required ThermoGIS variables. |
required |
Returns:
| Type | Description |
|---|---|
None
|
|
Source code in src/pythermogis/doublet_simulation/stochastic_doublet.py
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | |