def load_df_max_TREFHT(member, start_date, end_date):
    path = '/glade/scratch/zhonghua/CESM-LE-members-csv/'
    print('***************Start loading member', member, '***************')
    t0 = time.time()
    df = pd.read_csv(((((((path + member) + '_') + start_date) + '_') + end_date) + '.csv'))
    elapsed_time = (time.time() - t0)
    print('It takes elapsed_time', elapsed_time, 'to read csv')
    print('***************Start convert lat/lon to string***************')
    t1 = time.time()
    df[['lat', 'lon']] = df[['lat', 'lon']].round(4).astype(str)
    elapsed_time = (time.time() - t1)
    print('It takes elapsed_time', elapsed_time, 'to convert lat/lon to string')
    print('***************Start One Hot Encoding***************')
    t2 = time.time()
    df['time'] = pd.to_datetime(df['time'], errors='coerce')
    months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'June', 'July', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec']
    month_to_months = dict(zip(range(1, 13), months))
    df = pd.concat([df, pd.get_dummies(df['time'].dt.month.map(month_to_months).astype('category'))], axis=1)
    elapsed_time = (time.time() - t2)
    print('It takes elapsed_time', elapsed_time, 'to finish the one hot encoding')
    return df
def load_df_max_TREFHT(member, start_date, end_date):
    path = '/glade/scratch/zhonghua/CESM-LE-members-csv/'
    print('***************Start loading member', member, '***************')
    t0 = time.time()
    df = pd.read_csv(((((((path + member) + '_') + start_date) + '_') + end_date) + '.csv'))
    elapsed_time = (time.time() - t0)
    print('It takes elapsed_time', elapsed_time, 'to read csv')
    print('***************Start convert lat/lon to string***************')
    t1 = time.time()
    df[['lat', 'lon']] = df[['lat', 'lon']].round(4).astype(str)
    elapsed_time = (time.time() - t1)
    print('It takes elapsed_time', elapsed_time, 'to convert lat/lon to string')
    print('***************Start One Hot Encoding***************')
    t2 = time.time()
    df['time'] = pd.to_datetime(df['time'], errors='coerce')
    months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'June', 'July', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec']
    month_to_months = dict(zip(range(1, 13), months))
    df = pd.concat([df, pd.get_dummies(df['time'].dt.month.map(month_to_months).astype('category'))], axis=1)
    elapsed_time = (time.time() - t2)
    print('It takes elapsed_time', elapsed_time, 'to finish the one hot encoding')
    return df