f_name = "Eastern_WA_SF_" + str(SF_year) + "_70cloud_" + indeks + ".csv"

a_df = pd.read_csv(data_dir + f_name, low_memory=False)

##################################################################
##################################################################
####
####  plots has to be exact. So, we need
####  to filter out NASS, and filter by last survey date
####
##################################################################
##################################################################

a_df = a_df[a_df['county'] == given_county]  # Filter given_county
a_df = rc.filter_out_NASS(a_df)  # Toss NASS
a_df = rc.filter_by_lastSurvey(a_df,
                               year=SF_year)  # filter by last survey date
a_df['SF_year'] = SF_year

if irrigated_only == True:
    a_df = rc.filter_out_nonIrrigated(a_df)
    output_Irr = "irrigated_only"
else:
    output_Irr = "non_irrigated_only"
    a_df = rc.filter_out_Irrigated(a_df)

##################################################################
if jumps == "yes":
    output_dir = "/data/hydro/users/Hossein/remote_sensing/02_Eastern_WA_plots_tbls/" + \
                 "2Yr_plt_70cloud_notRegular_wJump/" + given_county + "_" + str(SF_year) + "_raw_" + output_Irr + "_" + indeks + "/"
else:
    output_dir = "/data/hydro/users/Hossein/remote_sensing/02_Eastern_WA_plots_tbls/" + \
        last_part_name = "NassOut_NotCorrectYear"

if filter_NASS == False:
    if filter_lastSurDate == True:
        print("3")
        last_part_name = "NassIn_CorrectYears"
    elif filter_lastSurDate == False:
        print("4")
        last_part_name = "NassIn_NotCorrectYears"

print(last_part_name)
print("filter_NASS is " + str(filter_NASS))
print("filter_lastSurDate is " + str(filter_lastSurDate))

if (filter_NASS == True):
    a_df = rc.filter_by_lastSurvey(dt_df_surv=a_df, year=2018)
    print(
        "After filtering by last survey date, a_df is of dimension {fileShape}."
        .format(fileShape=a_df.shape))

if (filter_lastSurDate == True):
    a_df = rc.filter_out_NASS(dt_df_NASS=a_df)
    print("After filtering out NASS, a_df is of dimension {fileShape}.".format(
        fileShape=a_df.shape))
######################
output_dir = data_dir + "/savitzky/Grant_Irrigated_EVI_2018_" + last_part_name + \
             "/delta" + str(delt) + "_Sav_win" + str(Sav_win_size) + "_Order"  + str(sav_order) + "/"

plot_dir_base = output_dir
print("plot_dir_base is " + plot_dir_base)