diff --git a/processing/analyse.R b/processing/analyse.R index 8bcffaf3d112cb932334a09c798aa040492b8289..7718eb5fe9e87bcdb74b2f39a92da2c97c590aa0 100644 --- a/processing/analyse.R +++ b/processing/analyse.R @@ -871,4 +871,4 @@ add_critique = function (df_critique, Code, author, level, start_date, variable, return (df_critique) } -# df_critique = add_critique(df_critique, Code='', author='', level=, start_date='', end_date='', variable='', type='', comment='') +# df_critique = add_critique(df_critique, resdir=resdir, Code='', author='louis', level=, start_date=, end_date=NA, variable='', type='', comment='') diff --git a/script.R b/script.R index ab347504bd58212fdf07e2825d0be3de6de4d82c..75c35ab4d5de3ccadf0fd90a4f4d7e9e837357e0 100644 --- a/script.R +++ b/script.R @@ -55,21 +55,21 @@ filedir = # Name of the file that will be analysed from the BH directory # (if 'all', all the file of the directory will be chosen) filename = - "" + # "" # "all" - # c( + c( # "S2235610_HYDRO_QJM.txt", # "P1712910_HYDRO_QJM.txt", # "P0885010_HYDRO_QJM.txt", # "O5055010_HYDRO_QJM.txt", # "O0384010_HYDRO_QJM.txt", # "S4214010_HYDRO_QJM.txt", - # "Q7002910_HYDRO_QJM.txt" + "Q7002910_HYDRO_QJM.txt" # "Q0214010_HYDRO_QJM.txt" # "O3035210_HYDRO_QJM.txt", # "O0554010_HYDRO_QJM.txt", # "O1584610_HYDRO_QJM.txt" - # ) + ) ## AGENCE EAU ADOUR GARONNE SELECTION @@ -273,56 +273,56 @@ df_meta = get_hydrograph(df_data, df_meta, period=mean_period[[1]])$meta df_sqrt = compute_sqrt(df_data) ### 3.2. Trend analysis ______________________________________________ -# # QA trend -# res = get_QAtrend(df_data, df_meta, -# period=trend_period, -# alpha=alpha, -# yearLac_day=yearLac_day) -# df_QAdata = res$data -# df_QAmod = res$mod -# res_QAtrend = res$analyse - -# # QMNA tend -# res = get_QMNAtrend(df_data, df_meta, -# period=trend_period, -# alpha=alpha, -# sampleSpan=sampleSpan, -# yearLac_day=yearLac_day) -# df_QMNAdata = res$data -# df_QMNAmod = res$mod -# res_QMNAtrend = res$analyse - -# # VCN10 trend -# res = get_VCN10trend(df_data, df_meta, -# period=trend_period, -# alpha=alpha, -# sampleSpan=sampleSpan, -# yearLac_day=yearLac_day) -# df_VCN10data = res$data -# df_VCN10mod = res$mod -# res_VCN10trend = res$analyse - -# # Start date for low water trend -# res = get_tDEBtrend(df_data, df_meta, -# period=trend_period, -# alpha=alpha, -# sampleSpan=sampleSpan, -# thresold_type='VCN10', -# select_longest=TRUE, -# yearLac_day=yearLac_day) -# df_tDEBdata = res$data -# df_tDEBmod = res$mod -# res_tDEBtrend = res$analyse - -# # Center date for low water trend -# res = get_tCENtrend(df_data, df_meta, -# period=trend_period, -# alpha=alpha, -# sampleSpan=sampleSpan, -# yearLac_day=yearLac_day) -# df_tCENdata = res$data -# df_tCENmod = res$mod -# res_tCENtrend = res$analyse +# QA trend +res = get_QAtrend(df_data, df_meta, + period=trend_period, + alpha=alpha, + yearLac_day=yearLac_day) +df_QAdata = res$data +df_QAmod = res$mod +res_QAtrend = res$analyse + +# QMNA tend +res = get_QMNAtrend(df_data, df_meta, + period=trend_period, + alpha=alpha, + sampleSpan=sampleSpan, + yearLac_day=yearLac_day) +df_QMNAdata = res$data +df_QMNAmod = res$mod +res_QMNAtrend = res$analyse + +# VCN10 trend +res = get_VCN10trend(df_data, df_meta, + period=trend_period, + alpha=alpha, + sampleSpan=sampleSpan, + yearLac_day=yearLac_day) +df_VCN10data = res$data +df_VCN10mod = res$mod +res_VCN10trend = res$analyse + +# Start date for low water trend +res = get_tDEBtrend(df_data, df_meta, + period=trend_period, + alpha=alpha, + sampleSpan=sampleSpan, + thresold_type='VCN10', + select_longest=TRUE, + yearLac_day=yearLac_day) +df_tDEBdata = res$data +df_tDEBmod = res$mod +res_tDEBtrend = res$analyse + +# Center date for low water trend +res = get_tCENtrend(df_data, df_meta, + period=trend_period, + alpha=alpha, + sampleSpan=sampleSpan, + yearLac_day=yearLac_day) +df_tCENdata = res$data +df_tCENmod = res$mod +res_tCENtrend = res$analyse ### 3.3. Break analysis ______________________________________________ # df_break = get_break(res_QAtrend$data, df_meta)