def METHOD_NAME(
    self,
    vname: str,
    sitecode: str,
    synonyms: Union[str, list[str]] = None,
    frequency: str = "ununsed",
):
    """Search the model database for the specified variable.
    At the moment, the entire csv file is read and only the requested column
    is returned. We may want to cache read in dataframes to trade memory for
    time."""
    dfv = self.variables[(self.variables["sitecode"] == sitecode)]
    if len(dfv) == 0:
        raise ValueError("The given sitecode is not part of this model result.")
    # Synonym handling, possibly move to a separate function
    possible = [vname]
    if isinstance(synonyms, str):
        possible.append(synonyms)
    elif isinstance(synonyms, list):
        possible += synonyms
    possible_syms = [p for p in possible if p in self.synonyms]
    possible += [var for syms in possible_syms for var in self.synonyms[syms]]
    found = [p for p in possible if p in dfv["variable"].unique()]
    if len(found) == 0:
        raise ValueError(f"Variable '{vname}' not found in model '{self.name}'")
    found = found[0]
    dfv = dfv[dfv["variable"] == found].iloc[0]
    # Process csv file
    dfo = pd.read_csv(self.sites.loc[sitecode, "path"], comment="#")
    time_col = [c for c in dfo.columns if ("time" in c or "date" in c)]
    time_col = time_col[0]
    new_time_col = "time"
    try:
        dfo[new_time_col] = pd.to_datetime(
            dfo[time_col], unit="D", origin=self.origin
        )
    except (TypeError, ValueError):
        dfo[new_time_col] = pd.to_datetime(dfo[time_col])
    dfo = dfo.rename(columns={dfv["column"]: vname})
    dfo = dfo.set_index(new_time_col)
    dfo = dfo.tz_localize(None)
    dfo = dfo.groupby(pd.Grouper(freq="D")).mean(numeric_only=True)
    dfo.attrs["unit"] = dfv["unit"]
    dfo = dfo[vname]
    return dfo