def METHOD_NAME(inps):
    # check input reference date
    if not inps.refDate:
        print('No reference date input, skip this step.')
        return None
    # string in digit
    elif inps.refDate.isdigit():
        pass
    else:
        if os.path.isfile(inps.refDate):
            print('read reference date from file: ' + inps.refDate)
            if inps.refDate.endswith('.h5'):
                # HDF5 file
                atr = readfile.read_attribute(inps.refDate)
                inps.refDate = atr['REF_DATE']
            else:
                # txt file
                inps.refDate = ptime.read_date_txt(inps.refDate)[0]
        else:
            print(f'input file {inps.refDate} does not exist, skip this step')
            return None
    inps.refDate = ptime.yyyymmdd(inps.refDate)
    print(f'input reference date: {inps.refDate}')
    # check available dates
    date_list = timeseries(inps.timeseries_file[0]).get_date_list()
    if inps.refDate not in date_list:
        msg = f'input reference date: {inps.refDate} is not found.'
        msg += f'\nAll available dates:\n{date_list}'
        raise Exception(msg)
    return inps.refDate