def METHOD_NAME(self, data: np.ndarray, is_temperature: bool) -> Cube:
    """Puts the data array into a CF-compliant cube"""
    attributes = {}
    if self.model_id_attr:
        attributes[self.model_id_attr] = self.temperature.attributes[
            self.model_id_attr
        ]
    if is_temperature:
        name = "air_temperature_at_condensation_level"
        units = "K"
    else:
        name = "air_pressure_at_condensation_level"
        units = "Pa"
    cube = create_new_diagnostic_cube(
        name,
        units,
        self.temperature,
        mandatory_attributes=generate_mandatory_attributes(
            [self.temperature, self.pressure, self.humidity]
        ),
        optional_attributes=attributes,
        data=data,
    )
    # The template cube may have had a height coord describing it as screen-level.
    # This needs removing:
    try:
        cube.remove_coord("height")
    except CoordinateNotFoundError:
        pass
    return cube