diff --git a/GPCROP/GPCROP.py b/GPCROP/GPCROP.py
index b66472d580ec2c14ceebf79b815261597c70248b..b40caf24f43e92bfb746002d5ec901e7b30f475c 100755
--- a/GPCROP/GPCROP.py
+++ b/GPCROP/GPCROP.py
@@ -80,7 +80,6 @@ else: #read_shelvefile=0
     yes_remob          = int(sys.argv[18]) #0 (no remobilization) or 1
     flag_uncert_soilP  = int(sys.argv[19]) #make sense only if many simulations. not used if prescribe_gridcond
     file_uncert_GPCROPparam = sys.argv[20] #'GPCROPinputfile_for_GPCROPuncertainty.txt'
-    #linetoread_GPCROPparam     = 9
     
     #3 cases:
     #case 1: flag_grid==1 and grid_index_init !=(grid_index_end-1): read successive index in lat_grid_1D and lon_grid_1D. Used for global simulations splitted within many short simulations
@@ -686,7 +685,7 @@ for yr in np.arange(yri_simul,yri_simul+1): #pour l instant qu'une seule annee.
         #####################################################################
 
         #a given parameter has the same value elsewhere for a given nmonte_chosen
-                
+        
         path_rel=path_script
         fic_txt_tor = open(path_rel+'/'+file_uncert_GPCROPparam, 'r')
         content = fic_txt_tor.readlines()
diff --git a/GPCROP/__pycache__/myfunctionsSIM.cpython-36.pyc b/GPCROP/__pycache__/myfunctionsSIM.cpython-36.pyc
deleted file mode 100644
index 9949e7e3d8b7d55d90b0d795a82fdb56196f9920..0000000000000000000000000000000000000000
Binary files a/GPCROP/__pycache__/myfunctionsSIM.cpython-36.pyc and /dev/null differ
diff --git a/GPCROP/launch_GPCROP_scaleonsite.sh b/GPCROP/launch_GPCROP_scaleonsite.sh
index 2b60d11ad9058420bc1e723ea790268173b64531..3bee4655eef93f6f7637e98c9436b76b1dc22142 100755
--- a/GPCROP/launch_GPCROP_scaleonsite.sh
+++ b/GPCROP/launch_GPCROP_scaleonsite.sh
@@ -22,12 +22,12 @@ max_grid=1 #14765 #14765 #previously: 17386 #excluded. 17386 for nmonte=0. max_g
 #for one gridcell simulation -and lat/lon defined in python script), use ini_nbgrid=0, sizepack_nbgrid=1 and max_grid=1
 optimroutine=1 #1 except if want to switch off optim routine (for tests only)
 Pfeedback=1 #P feedbacks on the growth. has an effect only if optimroutine==1
-optimRSR=1 #RSR is optimized. has an effect only if optimroutine==1
-optimconc=1 #conc is optimized. has an effect only if optimroutine==1
+optimRSR=x #RSR is optimized. has an effect only if optimroutine==1
+optimconc=x #conc is optimized. has an effect only if optimroutine==1
 yes_remob=1 #remob is activated
 #scalesite=0.5 #scaling factor multiplied by Pilab and Pisec as sensitivity test
-flag_uncert_soilP=1 #make sense only if many simulations and if prescribe_gridcond==0
-file_uncert_GPCROPparam="GPCROPinputfile_for_GPCROPuncertainty_Tartasprescribed.txt"
+flag_uncert_soilP=0 #make sense only if many simulations and if prescribe_gridcond==0
+file_uncert_GPCROPparam="GPCROPinputfile_for_GPCROPuncertainty_Tartasprescribed_LAILIN_nmonteline.txt"
 
 ###########
 #end flags#
@@ -88,64 +88,74 @@ while [ $nmonte_chosen_init -lt $nmonte_chosen_end ];do
     i=8;var="nmonte_chosen_init"; eval old_line$i=$var"=x"; eval new_line$i=$(echo $var=${!var})
     i=9;var="nmonte_chosen_endtopass"; eval old_line$i=$var"=x"; eval new_line$i=$(echo $var=${!var})
 
-    deb_grid=$ini_nbgrid
-    pack_grid=0
-    while (( deb_grid < max_grid ));do
-	
-	#compute prefix which is the number of 0 to put in front of pack_grid for the name of the different files
-	#len_name_pack_grid=${#pack_grid}
-	#nb0_repeat=$((len_max_pack-len_name_pack_grid))
-	#prefix=$(yes '0' | head -$nb0_repeat | paste -s -d '' -)
-	
-	#compute fin_grid
-	fin_grid=$(( deb_grid + sizepack_nbgrid ))
-	if (( fin_grid > max_grid ));then
-	    fin_grid=$(( max_grid ))
-	fi
-
-	i=10;var="deb_grid"; eval old_line$i=$var"=x"; eval new_line$i=$(echo $var=${!var})
-	i=11;var="fin_grid"; eval old_line$i=$var"=x"; eval new_line$i=$(echo $var=${!var})
-	i=12;var="max_grid"; eval old_line$i=$var"=x"; eval new_line$i=$(echo $var=${!var})
-	#
-	i=13;var="optimroutine"; eval old_line$i=$var"=x"; eval new_line$i=$(echo $var=${!var})
-	i=14;var="Pfeedback"; eval old_line$i=$var"=x"; eval new_line$i=$(echo $var=${!var})
-	i=15;var="optimRSR"; eval old_line$i=$var"=x"; eval new_line$i=$(echo $var=${!var})
-	i=16;var="optimconc"; eval old_line$i=$var"=x"; eval new_line$i=$(echo $var=${!var})
-	i=17;var="yes_remob"; eval old_line$i=$var"=x"; eval new_line$i=$(echo $var=${!var})
-	i=18;var="flag_uncert_soilP"; eval old_line$i=$var"=x"; eval new_line$i=$(echo $var=${!var})
-	i=19;var="file_uncert_GPCROPparam"; eval old_line$i=$var"=x"; eval new_line$i=$(echo $var=${!var})
-	
-	for scalesite in 1.0;do #0.05 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 2.0 3.0;do
-	
-	    i=20;var="scalesite"; eval old_line$i=$var"=x"; eval new_line$i=$(echo $var=${!var})
+
+    for optimRSR in 0 1;do
+
+	for optimconc in 0 1;do
 	    
-	    #modif .sh file
-	    cp sbatch_GPCROP_scaleonsite_init.sh sbatch_GPCROP_scaleonsite_modif_"$deb_grid"_"$fin_grid".sh
-	    for linechange in $(seq 0 1 $i);do #nb of lines to change in sbatch_SIM_init.sh. last $i used
-		eval new_line_r=\$"new_line${linechange}"
-		eval old_line_r=\$"old_line${linechange}"
-		sed -i -e 's@'"$old_line_r"'@'"$new_line_r"'@g' sbatch_GPCROP_scaleonsite_modif_"$deb_grid"_"$fin_grid".sh
-	    done
-	
-	    #launch .sh file
-	    if [[ $server -eq 0 ]];then
-		chmod +x sbatch_GPCROP_scaleonsite_modif_"$deb_grid"_"$fin_grid".sh
-		echo $deb_grid, $fin_grid
-		taskset -c 2 ./sbatch_GPCROP_scaleonsite_modif_"$deb_grid"_"$fin_grid".sh #launch on proc 2
-	    else
-		echo "sbatch of GPCROP_optim"
-		sbatch --nodes=1 --cpus-per-task=1 --exclude=muse241,muse098,muse146,muse189,muse108,muse135,muse239,muse099,muse113,muse114,muse115,muse116 -J GP$deb_grid_$fin_grid -o GPCROP_"$treatment"_"$deb_grid"_"$fin_grid".out sbatch_GPCROP_scaleonsite_modif_"$deb_grid"_"$fin_grid".sh
-		sleep 1
-	    fi
+	    
+	    deb_grid=$ini_nbgrid
+	    pack_grid=0
+	    while (( deb_grid < max_grid ));do
+		
+		#compute prefix which is the number of 0 to put in front of pack_grid for the name of the different files
+		#len_name_pack_grid=${#pack_grid}
+		#nb0_repeat=$((len_max_pack-len_name_pack_grid))
+		#prefix=$(yes '0' | head -$nb0_repeat | paste -s -d '' -)
+		
+		#compute fin_grid
+		fin_grid=$(( deb_grid + sizepack_nbgrid ))
+		if (( fin_grid > max_grid ));then
+		    fin_grid=$(( max_grid ))
+		fi
 	
-	done #end scalesite
+		i=10;var="deb_grid"; eval old_line$i=$var"=x"; eval new_line$i=$(echo $var=${!var})
+		i=11;var="fin_grid"; eval old_line$i=$var"=x"; eval new_line$i=$(echo $var=${!var})
+		i=12;var="max_grid"; eval old_line$i=$var"=x"; eval new_line$i=$(echo $var=${!var})
+		#
+		i=13;var="optimroutine"; eval old_line$i=$var"=x"; eval new_line$i=$(echo $var=${!var})
+		i=14;var="Pfeedback"; eval old_line$i=$var"=x"; eval new_line$i=$(echo $var=${!var})
+		i=15;var="optimRSR"; eval old_line$i=$var"=x"; eval new_line$i=$(echo $var=${!var})
+		i=16;var="optimconc"; eval old_line$i=$var"=x"; eval new_line$i=$(echo $var=${!var})
+		i=17;var="yes_remob"; eval old_line$i=$var"=x"; eval new_line$i=$(echo $var=${!var})
+		i=18;var="flag_uncert_soilP"; eval old_line$i=$var"=x"; eval new_line$i=$(echo $var=${!var})
+		i=19;var="file_uncert_GPCROPparam"; eval old_line$i=$var"=x"; eval new_line$i=$(echo $var=${!var})
+		
+		for scalesite in 0.05 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 2.0 3.0;do
+		    
+		    i=20;var="scalesite"; eval old_line$i=$var"=x"; eval new_line$i=$(echo $var=${!var})
+		    
+		    #modif .sh file
+		    cp sbatch_GPCROP_scaleonsite_init.sh sbatch_GPCROP_scaleonsite_modif_"$deb_grid"_"$fin_grid".sh
+		    for linechange in $(seq 0 1 $i);do #nb of lines to change in sbatch_SIM_init.sh. last $i used
+			eval new_line_r=\$"new_line${linechange}"
+			eval old_line_r=\$"old_line${linechange}"
+			sed -i -e 's@'"$old_line_r"'@'"$new_line_r"'@g' sbatch_GPCROP_scaleonsite_modif_"$deb_grid"_"$fin_grid".sh
+		    done
+		
+		    #launch .sh file
+		    if [[ $server -eq 0 ]];then
+			chmod +x sbatch_GPCROP_scaleonsite_modif_"$deb_grid"_"$fin_grid".sh
+			echo $deb_grid, $fin_grid
+			taskset -c 2 ./sbatch_GPCROP_scaleonsite_modif_"$deb_grid"_"$fin_grid".sh #launch on proc 2
+		    else
+			echo "sbatch of GPCROP_optim"
+			sbatch --nodes=1 --cpus-per-task=1 --exclude=muse241,muse098,muse146,muse189,muse108,muse135,muse239,muse099,muse113,muse114,muse115,muse116 -J GP$deb_grid_$fin_grid -o GPCROP_"$treatment"_"$deb_grid"_"$fin_grid".out sbatch_GPCROP_scaleonsite_modif_"$deb_grid"_"$fin_grid".sh
+			sleep 1
+		    fi
+		
+		done #end scalesite
+		
+		#update deb_grid
+		deb_grid=$(( fin_grid ))
+		pack_grid=$(( pack_grid + 1 ))
+	    done
 	
-	#update deb_grid
-	deb_grid=$(( fin_grid ))
-	pack_grid=$(( pack_grid + 1 ))
-    done
 
+	done
+    done
     
+	    
     if [[ $flag_grid -eq 1 ]];then
 	let nmonte_chosen_init=$nmonte_chosen_end
     elif [[ $flag_grid -eq 0 ]]; then #global simulation: launch each global simulation for nmonte with a specific sbatch
diff --git a/GPCROP/myfunctionsSIM.pyc b/GPCROP/myfunctionsSIM.pyc
deleted file mode 100644
index aa9c17b8ab0c921ee62e54177f1f92476cfcbd57..0000000000000000000000000000000000000000
Binary files a/GPCROP/myfunctionsSIM.pyc and /dev/null differ
diff --git a/GPCROP/plot_multi_simul_on_site_wodata.py b/GPCROP/plot_multi_simul_on_site_wodata.py
index ba6b999ef07cfb71e68cad94756782f96a0f707a..135af17e7b6953db9cf73decb3754bd7725e2255 100755
--- a/GPCROP/plot_multi_simul_on_site_wodata.py
+++ b/GPCROP/plot_multi_simul_on_site_wodata.py
@@ -41,21 +41,23 @@ dic_corres_treatdata_treatvar={};dic_corres_treatdata_treatvar["P0"]="P0";dic_co
 yri_simul          = 1996
 nmonte_read_init   = 0
 nmonte_read_end    = 301
-LAIrelation="LIN"
-config             = 2
+LAIrelation        = "LIN"
+config             = 2 
+dir_output_to_read = "/output_selectparam_3val_Tartas_prescribed"
+filter_on_plot     = 1 #look at the criteria within add_filter_Tartas_simul.py
 
-#define list of variables
-list_Psoilpools = ["Pilab","Polab","Posta","Pipri","Pisec","Pxocc","Pxtot","Pisol"]
-list_SIMvar_tow        = ["LAI_data","nleaf_data"]
-list_biomass_tow       = ["root_data","shootwograin_data","grain_data","shoot_data","shootwosene_data"] #
-list_biomassP_tow      = ["rootP_data","shootwograinP_data","grainP_data","reserveP_data"]
-list_Pdemandsupply_tow = ["Psupply_day", "Pdemand_day","Puptake_day"] 
-list_Psoilpools_tow    = [x+"_hour_mng_keep" for x in list_Psoilpools] 
-list_fluxes_tow        = [x+"_hour_keep" for x in ["fPdynm_ipri_ilab","fPdynm_ilab_isol","fPdynm_isec_ilab","fPdynm_otot_ilab","fPloss_ilab_out"]]
-list_Pconc_tow         = ["conc_root_data","conc_grain_data","concstar_shootwograin_data","conc_shootwograin_data","RSR","success_optim_data"]
-list_Pindic_tow        = ["RSR","success_optim_data"]
-#
-list_list = ['SIMvar','biomass','biomassP','Pconc','Pdemandsupply','Psoilpools','fluxes','Pconc',"Pindic"]
+##define list of variables
+#list_Psoilpools        = ["Pilab","Polab","Posta","Pipri","Pisec","Pxocc","Pxtot","Pisol"]
+#list_SIMvar_tow        = ["LAI_data","nleaf_data"]
+#list_biomass_tow       = ["root_data","shootwograin_data","grain_data","shoot_data","shootwosene_data"] #
+#list_biomassP_tow      = ["rootP_data","shootwograinP_data","grainP_data","reserveP_data"]
+#list_Pdemandsupply_tow = ["Psupply_day", "Pdemand_day","Puptake_day"] 
+#list_Psoilpools_tow    = [x+"_hour_mng_keep" for x in list_Psoilpools] 
+#list_fluxes_tow        = [x+"_hour_keep" for x in ["fPdynm_ipri_ilab","fPdynm_ilab_isol","fPdynm_isec_ilab","fPdynm_otot_ilab","fPloss_ilab_out"]]
+#list_Pconc_tow         = ["conc_root_data","conc_grain_data","concstar_shootwograin_data","conc_shootwograin_data","RSR","success_optim_data"]
+#list_Pindic_tow        = ["RSR","success_optim_data"]
+##
+list_list = ['SIMvar','biomass','biomassP','Pconc','Pdemandsupply','Psoilpools','fluxes',"Pindic"]
 
 #dic_name_simul = {};
 #dic_name_simul["10111_"]="nointeract";dic_name_simul["11001_"]="nonoptim";dic_name_simul["11111_"]="optim"
@@ -75,32 +77,27 @@ dic_conversion["Pindic"]        = 1.0 #conversion from gP/gDM to gP/kgDM
 len_spinup=50
 end_dayfocus=600
 
-#read output files
-for namesimul in dic_name_simul.keys():
-    for treat in ["P0"]:#["P0","P1.5","P3"]:
-        fic=path_rel+path_output+"/output_selectparam_3val_Tartas_prescribed/SIM+GPASOIL_"+namesimul+""+str(yri_simul)+"_config"+str(config)+"_nmonte"+str(nmonte_read_init)+"_"+str(nmonte_read_end)+"_grid0_1_treatment"+treat+"_LAI"+LAIrelation+".nc"
-        fich= Dataset(fic,'r',format='NETCDF4')
-        for list in list_list:
-            exec("list_to_read = list_"+list+"_tow")
-            for var in list_to_read:
-                exec(""+var+"_simul_"+dic_name_simul[namesimul]+"_"+dic_corres_treatdata_treatvar[treat]+"_avg = dic_conversion[list]*ma.average(fich.variables[var][:,len_spinup:end_dayfocus,0],axis=0)")
-                exec(""+var+"_simul_"+dic_name_simul[namesimul]+"_"+dic_corres_treatdata_treatvar[treat]+"_std = dic_conversion[list]*ma.std(fich.variables[var][:,len_spinup:end_dayfocus,0],axis=0)")
-        #add var (with proper std computation)
-        #1) shootP
-        dic_conversion_nb = 1.0
-        exec("shootP_data_simul_"+dic_name_simul[namesimul]+"_"+dic_corres_treatdata_treatvar[treat]+"_avg = dic_conversion_nb * ma.average(fich.variables['shootwograinP_data'][:,len_spinup:end_dayfocus,0] + fich.variables['grainP_data'][:,len_spinup:end_dayfocus,0],axis=0)")
-        exec("shootP_data_simul_"+dic_name_simul[namesimul]+"_"+dic_corres_treatdata_treatvar[treat]+"_std = dic_conversion_nb * ma.std(fich.variables['shootwograinP_data'][:,len_spinup:end_dayfocus,0] + fich.variables['grainP_data'][:,len_spinup:end_dayfocus,0],axis=0)")
-        #2) RSRwosene
-        dic_conversion_nb = 1.0
-        exec("RSRwosene_simul_"+dic_name_simul[namesimul]+"_"+dic_corres_treatdata_treatvar[treat]+"_avg = dic_conversion_nb * ma.average(fich.variables['root_data'][:,len_spinup:end_dayfocus,0] / fich.variables['shootwosene_data'][:,len_spinup:end_dayfocus,0],axis=0)")
-        exec("RSRwosene_simul_"+dic_name_simul[namesimul]+"_"+dic_corres_treatdata_treatvar[treat]+"_std = dic_conversion_nb * ma.std(fich.variables['root_data'][:,len_spinup:end_dayfocus,0] / fich.variables['shootwosene_data'][:,len_spinup:end_dayfocus,0],axis=0)")
-        #
-        fich.close()
+####################
+#read GPCROP output#
+####################
+list_treat=["P0"]
+path_rel="./" 
+script=path_rel+"/path.txt";exec(open(script).read())
+script=path_rel+path_script+"read_Tartas_simul.py";exec(open(script).read())
+
+
+###########################
+#add a filter before plots#
+###########################
+
+list_suffixe_select=[""] 
+
+path_rel="./" 
+script=path_rel+"/path.txt";exec(open(script).read())
+script=path_rel+path_script+"add_filter_Tartas_simul.py";exec(open(script).read())
+
+
 
-#update the lists if necessary
-#list_Pconc_tow = ["conc_root_data","conc_grain_data","conc_shootwograin_data"]
-     
-day_simul=np.arange(0,end_dayfocus-len_spinup)
 
 #############
 #plot itself#
@@ -166,7 +163,7 @@ exec("line"+str(line)+"_ax2_label='[-]'")
 exec("line"+str(line)+"_list_color=list_color")
 #
 line=6
-exec("list_var_line"+str(line)+"_ax1=['conc_root_data','conc_grain_data','concstar_shootwograin_data','conc_shootwograin_data']")
+exec("list_var_line"+str(line)+"_ax1=['conc_root_data','conc_grain_data','conc_shootwograin_data','concdelta_shootwograin_data']")
 exec("list_var_line"+str(line)+"_ax2=[]")
 exec("line"+str(line)+"_ax1_bound=[0,0.008]")
 exec("line"+str(line)+"_ax2_bound=[]")
@@ -175,10 +172,10 @@ exec("line"+str(line)+"_ax2_label=''")
 exec("line"+str(line)+"_list_color=list_color")
 
 
-
 #compute xlim
-var='Pilab_hour_mng_keep';exec("var=var+'_simul_'+dic_name_simul[dic_name_simul.keys()[0]]+'_P0_avg'")
-exec("forxlim=ma.where(ma.getmaskarray("+var+"),0,np.arange(len("+var+")))")
+#var='Pilab_hour_mng_keep';exec("var=var+'_simul_'+dic_name_simul[dic_name_simul.keys()[0]]+'_P0_avg'")
+var='Pilab_hour_mng_keep';exec("var=ma.average("+var+"_simul_"+dic_name_simul[dic_name_simul.keys()[0]]+"_P0,axis=0)")
+forxlim=ma.where(ma.getmaskarray(var),0,np.arange(len(var)))
 forxlim=ma.masked_where(forxlim==0,forxlim)
 
 dic_name_simul_title={};
@@ -211,8 +208,8 @@ dic_var_legend['RSRwosene']='root:shoot ratio wo senesc.'
 dic_var_legend['success_optim_data']='optimization success'
 dic_var_legend['conc_root_data']='$conc_{root}$'
 dic_var_legend['conc_grain_data']='$conc_{grain}$'
-dic_var_legend['concstar_shootwograin_data']='$conc_{swog}$'
-dic_var_legend['conc_shootwograin_data']='$conc_{\Delta swog}$'
+dic_var_legend['conc_shootwograin_data']='$conc_{swog}$'
+dic_var_legend['concdelta_shootwograin_data']='$conc_{\Delta swog}$'
 
 
 panel=1
@@ -229,8 +226,8 @@ for line in np.arange(1,line+1):
 	index_var=0
 	for var in list_var_ax1:
 	    varplot=var+"_simul_"+dic_name_simul[namesimul]+"_P0"
-	    exec("ax1.plot(day_simul,"+varplot+"_avg,label=dic_var_legend[var],c=line"+str(line)+"_list_color[index_var])") #,c=dic_treat_color[treat],ls=list_dash[index_var]
-	    exec("ax1.fill_between(day_simul,"+varplot+"_avg-"+varplot+"_std,"+varplot+"_avg+"+varplot+"_std,color='lightgrey',alpha=0.3)")
+	    exec("ax1.plot(day_simul,ma.average("+varplot+",axis=0),label=dic_var_legend[var],c=line"+str(line)+"_list_color[index_var])") #,c=dic_treat_color[treat],ls=list_dash[index_var]
+	    exec("ax1.fill_between(day_simul,ma.average("+varplot+",axis=0)-ma.std("+varplot+",axis=0),ma.average("+varplot+",axis=0)+ma.std("+varplot+",axis=0),color='lightgrey',alpha=0.3)")
 	    index_var=index_var+1
 	exec("plt.ylabel(line"+str(line)+"_ax1_label)")
 	if index_panel_line==0:
@@ -245,8 +242,8 @@ for line in np.arange(1,line+1):
 	    for var in list_var_ax2:
 	        varplot=var+"_simul_"+dic_name_simul[namesimul]+"_P0"
                 print(varplot)
-	        exec("ax2.plot(day_simul,"+varplot+"_avg,label=dic_var_legend[var],c=line"+str(line)+"_list_color[index_var])") #,c=dic_treat_color[treat],ls=list_dash[index_var]
-	        exec("ax2.fill_between(day_simul,"+varplot+"_avg-"+varplot+"_std,"+varplot+"_avg+"+varplot+"_std,color='lightgrey',alpha=0.3)")
+	        exec("ax2.plot(day_simul,ma.average("+varplot+",axis=0),label=dic_var_legend[var],c=line"+str(line)+"_list_color[index_var])") #,c=dic_treat_color[treat],ls=list_dash[index_var]
+	        exec("ax2.fill_between(day_simul,ma.average("+varplot+",axis=0)-ma.std("+varplot+",axis=0),ma.average("+varplot+",axis=0)+ma.std("+varplot+",axis=0),color='lightgrey',alpha=0.3)")
 	        index_var=index_var+1
             exec("plt.ylabel(line"+str(line)+"_ax2_label)")
 	    if index_panel_line==nb_line-1:
diff --git a/GPCROP/plot_scaleonsite_test.py b/GPCROP/plot_scaleonsite_test.py
index 08ccc501d5a89f47c1b3595bc36647a398c97790..1405c136073c38ab97c1588bddd50b71178b0994 100644
--- a/GPCROP/plot_scaleonsite_test.py
+++ b/GPCROP/plot_scaleonsite_test.py
@@ -26,8 +26,11 @@ from itertools import product
 path_rel="./"        
 script=path_rel+"/path.txt";exec(open(script).read())
 
-
+treatment="P3"
 scaling_factor_list=[0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 2.0, 3.0]
+alpha_PUE=0.5
+lagstop=10
+
 
 combi_optimRSR_optimconc = [(0,0),(1,0),(0,1),(1,1)] #[(0,0),(1,0),(0,1),(1,1)]
 
@@ -38,7 +41,7 @@ for combi in combi_optimRSR_optimconc:
     for var in list_var:
         exec(""+var+"_"+str(optimRSR)+"_"+str(optimconc)+"=[]")
     for scaling_factor_test in scaling_factor_list:
-        fic_txt_tor = open(path_rel+path_output+'/out_test_scaleonsite/out_test_'+str(optimRSR)+'_'+str(optimconc)+'_'+str(scaling_factor_test)+'.txt', 'r')
+        fic_txt_tor = open(path_rel+path_output+'/out_test_scaleonsite/out_test_'+str(optimRSR)+'_'+str(optimconc)+'_'+str(scaling_factor_test)+'_'+treatment+'_alphaPUE'+str(alpha_PUE)+'_lagstop'+str(lagstop)+'.txt', 'r')
         content = fic_txt_tor.readline()
         index_list_var=0
         for var in list_var:
@@ -58,14 +61,20 @@ for combi in combi_optimRSR_optimconc:
 ylim_biom_shoot=[0,200]
 ylim_biom_tot=[0,250]
 ylim_RSR=[0.10,0.7]
-ylim_conc=[0.2,3.0]
-ylim_concstar=[0.2,1.2]
+ylim_conc=[0.2,4.1]
+ylim_concstar=[0.2,4.1]
 ylim_Psupply=[0.0,0.02]
 ylim_Pdemand=[0.0,0.02]
 
-conc_range=[0.0005617977528089888*1000/2.,0.0011235955056179776*1000*2.]
-concstar_range=[0.0005617977528089888*1000,0.0011235955056179776*1000]
-RSR_range=[0.14,0.6]
+conc_min = 0.5e-3
+conc_def = 0.002 #to be read from GPCROPinputfile
+conc_range=[conc_min*1000/2.,conc_def*1000*2.]
+concstar_range=[conc_min*1000,conc_def*1000]
+RSR_range=[0.16,0.68]
+
+dic_var_label={};dic_var_label["biom_shoot"]="biom$_{shoot}$";dic_var_label["biom_root"]="biom$_{root}$";dic_var_label["biom_tot"]="biom$_{tot}$";dic_var_label["RSR"]="RSR";dic_var_label["concstar"]="conc$_{swog}$";dic_var_label["conc"]="$conc_{\Delta swog}$"
+
+dic_combi_label={};dic_combi_label[(0,0)]="optimized: none";dic_combi_label[(1,0)]="optimized: RSR";dic_combi_label[(0,1)]="optimized: conc$_{swog}$";dic_combi_label[(1,1)]="optimized: RSR and conc$_{swog}$"
 
 index_subplot=1
 for var in list_var: #line within var LOOP ON LINE FIRST
@@ -77,18 +86,19 @@ for var in list_var: #line within var LOOP ON LINE FIRST
             if var=="RSR":
                 legend=['RSR_default','RSRmax']
             elif var=="conc":
-                legend=['conc_min','conc_default']
+                legend=['$conc_{\Delta swog,min}$','$conc_{\Delta swog,def}$']
             elif var=="concstar":
-                legend=['concstar_min','concstar_default']
+                legend=['$conc_{swog,min}$','$conc_{swog,def}$']
             exec("plt.plot([scaling_factor_list[0],scaling_factor_list[len(scaling_factor_list)-1]],["+var+"_range[0],"+var+"_range[0]],label=legend[0])")
             exec("plt.plot([scaling_factor_list[0],scaling_factor_list[len(scaling_factor_list)-1]],["+var+"_range[1],"+var+"_range[1]],label=legend[1])")
             if combi==combi_optimRSR_optimconc[0]:
                 plt.legend()
         if var==list_var[0]:
-            plt.title(combi)
+            plt.title(dic_combi_label[combi])
         #exec("plt.scatter(scaling_factor_list,"+var+"_"+str(optimRSR)+"_"+str(optimconc)+")")
         exec("plt.plot(scaling_factor_list,"+var+"_"+str(optimRSR)+"_"+str(optimconc)+",marker='o',color='k')")
         if combi==combi_optimRSR_optimconc[0]:
-            plt.ylabel(var)
+            plt.ylabel(dic_var_label[var])
+        plt.xlabel('scaling factor')
         index_subplot=index_subplot+1
 plt.show()
diff --git a/SIM_vsMueller_2023/ReadPlotOPTIM_new_v2modules_resampling.py b/SIM_vsMueller_2023/ReadPlotOPTIM_new_v2modules_resampling.py
index 888adcdc96a8ace6dac956ae6fe574dec4b0417e..5a3111fdcd7a0dc1b03eed740e9424be30c9dc1e 100644
--- a/SIM_vsMueller_2023/ReadPlotOPTIM_new_v2modules_resampling.py
+++ b/SIM_vsMueller_2023/ReadPlotOPTIM_new_v2modules_resampling.py
@@ -37,7 +37,7 @@ threshold          = float(sys.argv[5])
 
 LAIrelationship = "LIN"
 #size_sample=72 #size of the final file. At global scale, the size is imposed by the number of GPCROP parameters I want to test (i.e. the nb of lines in GPCROPinputfile_for_GPCROPuncertainty_global.txt)
-size_sample=250
+size_sample=250 #size of the final file. Test on Tartas for more param values tested (following Sobol analysis)
 
 #leveloptimkeep=leveloptim
 
diff --git a/SIM_vsMueller_2023/__pycache__/myfoncGGCMI.cpython-36.pyc b/SIM_vsMueller_2023/__pycache__/myfoncGGCMI.cpython-36.pyc
deleted file mode 100644
index 0bc8bc65c8857cfec01e9f54ad89f42b44a01c0a..0000000000000000000000000000000000000000
Binary files a/SIM_vsMueller_2023/__pycache__/myfoncGGCMI.cpython-36.pyc and /dev/null differ
diff --git a/SIM_vsMueller_2023/myfoncGGCMI.pyc b/SIM_vsMueller_2023/myfoncGGCMI.pyc
deleted file mode 100644
index a9b8a30423ee8ebb592b5199857569dadb812b2a..0000000000000000000000000000000000000000
Binary files a/SIM_vsMueller_2023/myfoncGGCMI.pyc and /dev/null differ