TNO Intern

Commit 9b0d1062 authored by Hen Brett's avatar Hen Brett 🐔
Browse files

Updating the example data and fixing the docstrings

parent 5ef5914d
Loading
Loading
Loading
Loading
+50 −16
Original line number Diff line number Diff line
@@ -15,22 +15,56 @@ def calculate_doublet_performance(input_data: xr.Dataset,
                                  p_values: List[float] = [50.0],
                                  ) -> xr.Dataset:
    """
    Perform a ThermoGIS Doublet performance simulation. This will occur across all dimensions of the input_data (ie. input data can have a single value for each required variable, or it can be 1Dimensional or a 2Dimensional grid)

    :param input_data:
        A xr.Dataset (input_data) with the required variables: "thickness_mean", "thickness_sd", "porosity", "ntg", "depth", "ln_permeability_mean", "ln_permeability_sd", Performance will be calculated across all dimensions.
        Optional Extra parameters: "temperature", "mask".
        If no temperature values are provided, temperature will be calculated using a gradient specified by the input_params dictionary and the depth variable.
        If mask values are provided, then any non-nan values in the mask variable will be set to zero across all variables in the returned output_data object.
    :param utc_properties:
    :param rng_seed:
    :param p_values:
        A list of p_values for the doublet calculation to perform over; if no p_values are provided then the default value of P50 is used.
    :return output_data:
        A xr.Dataset (input_data) with the resulting variables from the doublet calculation:
        "power", "heat_pump_power", "capex", "opex", "utc", "npv", "hprod", "cop", "cophp", "pres", "flow_rate", "welld"

        The output will have the same dimensions as the input_data class, with the additional p_value dimension
    Perform a ThermoGIS 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 `input_params`. If a mask is provided, any non-NaN
    values will result in zeroing the output values at those locations.

    Parameters
    ----------
    input_data : xr.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 `input_params`.
        - "mask" : If provided, all non-NaN values will result in setting corresponding output values to zero.

    utc_properties : dict
        A dictionary of UTC (Underground Thermal Capacity) properties used for simulation.

    rng_seed : int
        Random seed used for stochastic components of the simulation.

    p_values : list of float, optional
        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.

    Returns
    -------
    output_data : xr.Dataset
        An xarray Dataset with the same spatial dimensions as `input_data`, plus an added `p_value` dimension.
        Contains the following output variables:
        - "power"
        - "heat_pump_power"
        - "capex"
        - "opex"
        - "utc"
        - "npv"
        - "hprod"
        - "cop"
        - "cophp"
        - "pres"
        - "flow_rate"
        - "welld"
    """

    # Check that all essential variables are provided
+659 −0

File added.

Preview size limit exceeded, changes collapsed.

−33.7 KiB

File deleted.

−126 KiB

File deleted.

−126 KiB

File deleted.

Loading