diff --git a/pydropsonde/helper/quality.py b/pydropsonde/helper/quality.py index 98f2d563..766a8ccf 100644 --- a/pydropsonde/helper/quality.py +++ b/pydropsonde/helper/quality.py @@ -82,6 +82,24 @@ def profile_extent( alt_dim="gpsalt", extent_ratio=0.1, ): + """ + Calculate the profile extent quality control flag and details for a given variable. + + This function calculates the altitude of the first measurement for a given variable and checks + that this is above a given ratio. + Adds the qc flag to the object. + + Parameters: + self (object): The object containing the necessary attributes and methods. + variable (str): The name of the variable being processed. + ds (xarray.Dataset): The dataset containing the variable data. + alt_dim (str): The dimension name of the altitude coordinate. + extent_ratio (float): The ratio of the drop altitude to the maximum altitude + within which the profile is considered valid. + + Returns: + None + """ variables = self.qc_vars for variable in variables: drop_alt = ds.attrs["aircraft_msl_altitude_(m)"]