def get_modkey(df, var_name):
    """
    Select model variable name from his file based on variable name selected in file (lng_name).

    Parameters
    ----------
    df : dataframe
        model hisfile.
    var_name : str
        variable name that should be extracted.

    Returns
    -------
    key : str
        key used in model output.

    """
    # salinity and temperature dot not have a long name
    # most other DWAQ relevant parameters do
    # otherwise add here in the list
    if (var_name in ['salinity', 'temperature']): 
        key = var_name
    else:
        key = [x for x, y in zip(df['nc_varkeys'], df['long_name']) if y == var_name][0] 
    return key