biopsichas / cliwf

Climate workflow
1 stars 0 forks source link

cha_day_all #7

Closed michstrauch closed 6 months ago

michstrauch commented 6 months ago

Dear @biopsichas ,
I am currently having problems to clone, pull and push things to github. Quick and dirty solution is to send you the modified/additional code I find useful to be integrated.

After line 250 in climate_workflow.R, please copy the following code. This relates to the threshold specification which is getting lost otherwise (and non-meaningful hard-coded values would be used).

Thank you!

# threshold for low flow
# the number of days below this threshold will later be calculated
# default value is the 5th percentile of rcp26 for the baseline period (average across all rcms)
# feel free to use another threshold value!!

threshold_lowQ <- mean(ind_cha_dayII(r_dir, rch, 'Q_p05', ensemble=F)[seq(2,17,3),8])  #adjust channel

# threshold for high flow
# the number of days beyond this threshold will later be calculated
# default value is the 95th percentile of rcp26 for the baseline period (average across all rcms)
# feel free to use another threshold value!!

threshold_highQ <- ind_cha_dayII(r_dir, rch, 'Q_p95', ensemble=F)[seq(2,17,3),4]  #adjust channel

# thresholds for nitrogen concentration (mg N/l) and phosphorus concentration (mg P/l)
# the number of days beyond these thresholds will later be calculated
# default value are the respective median values of reported threshold values 
# for very small siliceous rivers in lowland across Europe 
# (https://www.sciencedirect.com/science/article/pii/S0048969719338380)
# please check if this is appropriate for your case study (e.g. type of river)
# feel free to use other threshold values!!

threshold_N=2.3
threshold_P=0.082 

# threshold for sediment concentration (mg N/l) 
# the number of days beyond this threshold will later be calculated
# default value is 50 mg/l (missing reference), 
# if you know a reference please let me know (michael.strauch@ufz.de)
# feel free to use another threshold value!!

threshold_Sed=50

###  collect indicators related to the daily dynamics Water, N, P, Sed
cha_day_all <- ind_cha_dayII(r_dir, rch, 'all') #adjust channel
biopsichas commented 6 months ago

All integrated and updated