Closed rogerlew closed 4 months ago
f(from Anurag)
Hi Roger - could we use this function to remove outliers for snotel data. I think taking interquartile data should work fine. After data is removed then it could be filled as usual from either daymet or gridmet (not sure which one you used):
# Function to remove outliers def remove_outliers(df, column): Q1 = df[column].quantile(0.25) Q3 = df[column].quantile(0.75) IQR = Q3 - Q1 lower_bound = Q1 - 1.5 * IQR upper_bound = Q3 + 1.5 * IQR return df[(df[column] >= lower_bound) & (df[column] <= upper_bound)] # Remove outliers from TMAX and TMIN df_clean = remove_outliers(df, 'TMAX') df_clean = remove_outliers(df_clean, 'TMIN')
snotelf tmax and tmin were reversed in the prn
New fixed snotel files are {snotel_id}_snotelf2.cli
.prn
.cli
f(from Anurag)
Hi Roger - could we use this function to remove outliers for snotel data. I think taking interquartile data should work fine. After data is removed then it could be filled as usual from either daymet or gridmet (not sure which one you used):