TNO Intern

Commit a0b3ebaa authored by Hen Brett's avatar Hen Brett 🐔
Browse files

fixing the doc strings

parent ebf66b7d
Loading
Loading
Loading
Loading
+47 −16
Original line number Diff line number Diff line
@@ -15,22 +15,53 @@ 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 performs the simulation across all dimensions of the input data. The input data can consist of single values, 1D arrays, or 2D grids.

    Parameters
    ----------
    input_data : xr.Dataset
        A 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 computed using the gradient from `input_params` and the "depth" variable.
        - "mask" : If provided, any non-NaN values in the "mask" variable will be used to set the corresponding output values to zero.

    utc_properties : dict
        Dictionary of UTC properties used for the simulation.

    rng_seed : int
        Random seed for reproducibility.

    p_values : list of float, optional
        List of p-values for the doublet calculation. If not provided, defaults to using the P50 value.

    Returns
    -------
    output_data : xr.Dataset
        Dataset containing the results of the doublet performance calculation, with the following variables:
        - "power"
        - "heat_pump_power"
        - "capex"
        - "opex"
        - "utc"
        - "npv"
        - "hprod"
        - "cop"
        - "cophp"
        - "pres"
        - "flow_rate"
        - "welld"

        The output retains the dimensions of `input_data`, with an added "p_value" dimension.
    """

    # Check that all essential variables are provided