|
@@ -32,7 +32,7 @@ def get_data(args):
|
|
return df
|
|
return df
|
|
|
|
|
|
|
|
|
|
-def predict_result_adjustment(df, args):
|
|
|
|
|
|
+def predict_result_adjustment(df, args, col_radiation="radiation"):
|
|
"""
|
|
"""
|
|
光伏/风电 数据后处理 主要操作
|
|
光伏/风电 数据后处理 主要操作
|
|
1. 光伏 (夜间 置零 + 平滑)
|
|
1. 光伏 (夜间 置零 + 平滑)
|
|
@@ -59,12 +59,12 @@ def predict_result_adjustment(df, args):
|
|
'mongodb_read_table': args['mongodb_nwp_table'],
|
|
'mongodb_read_table': args['mongodb_nwp_table'],
|
|
'col_time': col_time
|
|
'col_time': col_time
|
|
}
|
|
}
|
|
- col_radiation = args['radiation']
|
|
|
|
|
|
+ col_radiation = args['col_radiation']
|
|
nwp = get_data(nwp_param)
|
|
nwp = get_data(nwp_param)
|
|
|
|
|
|
df_cp = df_cp.join(nwp[col_radiation])
|
|
df_cp = df_cp.join(nwp[col_radiation])
|
|
df_cp.loc[nwp[col_radiation] == 0, 'power_forecast'] = 0
|
|
df_cp.loc[nwp[col_radiation] == 0, 'power_forecast'] = 0
|
|
- df_cp.drop(columns=['radiation'], inplace=True)
|
|
|
|
|
|
+ df_cp.drop(columns=[col_radiation], inplace=True)
|
|
logger.info("solar processed")
|
|
logger.info("solar processed")
|
|
df_cp['power_forecast'] = round(df_cp['power_forecast'], 2)
|
|
df_cp['power_forecast'] = round(df_cp['power_forecast'], 2)
|
|
df_cp.reset_index(inplace=True)
|
|
df_cp.reset_index(inplace=True)
|