def METHOD_NAME(cube_filenames:list, path_gunw:str, wavelength, out_dir:str, update_gunw:bool):
    """ Calculate ref/sec phase delay
    Requires:
        list with filename of delay cube for ref and sec date (netcdf)
        path to the gunw file
        wavelength (units: m)
        output directory (where to store the delays)
    """
    os.makedirs(out_dir, exist_ok=True)
    ds_slc = compute_delays_slc(cube_filenames, wavelength)
    da     = ds_slc[f'reference_{TROPO_NAMES[0]}'] # for metadata
    model  = ds_slc.model
    # write the interferometric delay to disk
    ref, sec = os.path.basename(path_gunw).split('-')[6].split('_')
    mid_time = os.path.basename(path_gunw).split('-')[7]
    dst      = os.path.join(out_dir, f'{model}_interferometric_{ref}-{sec}_{mid_time}.nc')
    ds_slc.to_netcdf(dst)
    logger.info ('Wrote slc delays to: %s', dst)
    ## optionally update netcdf with the slc delay
    update_gunw_slc(path_gunw, ds_slc)
    ## temp
    update_gunw_version(path_gunw)