Development of reference bulk density routine (Files referenced are appended at end for reference) Proctor density data is not available for high organic matter soils. High OM soils data is published (Thomas Keller, Inge Håkansson. 2010. Estimation of reference bulk density from soil particle size distribution and soil organic matter content. Geoderma 154:398–406.) but is for a reference bulk density (pressed for 7 days at high water content under 200 kPa pressure) Standard soil analysis practice is to not measure sand, silt and clay for OM content above 35% due to the questionable accuracy of the values depending on the measurement technique. Therefore the fitted equation (reported by Keller and Håkansson) does not work for >35% OM where no mineral portion was reported. As a first attempt, the points with OM >30% were placed in the file 'omdata.txt', a point for 100% OM added (average BD from the 4 highest OM data points) and fit to the equation using gnuplot: Note: Data points are in %. Values in WEPS are in fraction. Values converted to fraction in equations and fitted and tested accordingly. ---BEGIN fit-om.plt--- # first guess values a=0.36 b=100.0 c=0.25 # equation for BD as a function of high OM content f(x) = a+1/(b*(x-c)*(x-c)+1) fit f(x) 'omdata.txt' using ($2/100):1 via a,b,c # result of the fit a = 0.35262 b = 211.036 c = 0.236408 plot f(x), 'omdata.txt' using ($2/100):1 with points pause -1 q1=1.308 q2=1.19 q3=1.03 q4=1.8 q5=0.8 q6=6.2 q7=5.9 # comparison of equations with data, plotted against OM content fraction plot 'refdata.txt' using ($5/100):(q1+q2*$2/100+q3*$4/100-q4*$2/100*$2/100-q5*$4/100*$4/100-q6*$3/100*$5/100-q7*$4/100*$5/100) \ , 'refdata.txt' using ($5/100):1 \ , f(x) with lines \ , 'omdata.txt' using ($2/100):1 with points pause -1 # composite equation values compared against data values, one to one line plotted plot x \ , 'refdata.txt' using 1:($5<30 ? (q1+q2*$2/100+q3*$4/100-q4*$2/100*$2/100-q5*$4/100*$4/100-q6*$3/100*$5/100-q7*$4/100*$5/100) : a+1/(b*($5/100-c)*($5/100-c)+1)) \ , 'omdata.txt' using 1:(a+1/(b*($2/100-c)*($2/100-c)+1)) pause -1 ---END fit-om.plt--- Based on the above fit, the composite equation was implemented in util/lib_misc/soilden_mod.f95 function setbdref, and the 'testdata.txt' file was generated for the 12 soil texture classes. Using this composite function breaks down for intermediate organic matter content values. The function fit my the authors does poorly for OM values between 15% and 30% as illustrated with this data set with varied texture and OM content. The file testdata.txt was created by programmingthe composite function above in fortran, and creating a range of OM content for each of the 12 standard texture classes. The plot illustrates the difficulty created by this method, esp. for the Sand texture. ---BEGIN test-om.plt--- pflg = 2 set xlabel 'OM' set ylabel 'Reference Bulk Density (Mg/m^3)' set title 'Sand' plot 'testdata.txt' index 0 using 5:4:1 with labels pause pflg set title 'Loamy Sand' plot 'testdata.txt' index 1 using 5:4:1 with labels pause pflg set title 'Sandy Loam' plot 'testdata.txt' index 2 using 5:4:1 with labels pause pflg set title 'Loam' plot 'testdata.txt' index 3 using 5:4:1 with labels pause pflg set title 'Silt Loam' plot 'testdata.txt' index 4 using 5:4:1 with labels pause pflg set title 'Sandy Clay Loam' plot 'testdata.txt' index 5 using 5:4:1 with labels pause pflg set title 'Clay Loam' plot 'testdata.txt' index 6 using 5:4:1 with labels pause pflg set title 'Silty Clay Loam' plot 'testdata.txt' index 7 using 5:4:1 with labels pause pflg set title 'Sandy Clay' plot 'testdata.txt' index 8 using 5:4:1 with labels pause pflg set title 'Silty Clay' plot 'testdata.txt' index 9 using 5:4:1 with labels pause pflg set title 'Clay' plot 'testdata.txt' index 10 using 5:4:1 with labels pause pflg ---END test-om.plt--- Based on the plots above, it was decided to use the settled bulk density of Rawls (as implemented in WEPS) as a normalizing value. The reference bulk density can be modeled based on the difference (diff), the ratio (ratio) or the ratio of the difference (drat). test_soil_density is programmed with each of these functions and 'refdata.txt' processed resulting in odat_diff.txt, odat_ratio.txt and odat_drat.txt, including the settled bulk density for each high organic matter point using representative Sand, Silt, Clay values for all twelve soil texture classes. For all three models, the normalized values show a strong trend in relation to sand content. The normalized values of low organic matter data points are fit to a second order fourier function with respect to sand content. The high organic content points are averaged in order to get a value for 100% organic matter content. ---BEGIN Averaging Script--- test_soil_density odat diff cat odat_diff.txt | dm "if INLINE > 1 then INPUT else SKIP" | dm "if x8 > 0.35 then INPUT else SKIP" | colex 4 | stats mean test_soil_density odat ratio cat odat_ratio.txt | dm "if INLINE > 1 then INPUT else SKIP" | dm "if x8 > 0.35 then INPUT else SKIP" | colex 4 | stats mean test_soil_density odat drat cat odat_drat.txt | dm "if INLINE > 1 then INPUT else SKIP" | dm "if x8 > 0.35 then INPUT else SKIP" | colex 4 | stats mean ---END Averaging Script--- diff_mean = 0.0666647 ratio_mean = 1.19378 rdat_mean = 0.193782 ---BEGIN odat_diff.plt--- set yrange [0:] set xrange [0:1] pflg = -1 set ylabel 'Reference-Settled BD (Mg/m^3)' set xlabel 'OM' plot 'odat_diff.txt' using 8:4 with points title 'All OM' pause pflg set xlabel 'Sand' plot 'odat_diff.txt' using 7:4 with points title 'All OM' pause pflg set xlabel 'Sand' plot 'odat_diff.txt' using ($8<0.35?($7):NaN):4 with points title 'OM<35%' pause pflg set xlabel 'Silt' plot 'odat_diff.txt' using 6:4 with points title 'All OM' pause pflg set xlabel 'Silt' plot 'odat_diff.txt' using ($8<0.35?($6):NaN):4 with points title 'OM<35%' pause pflg set xlabel 'Clay' plot 'odat_diff.txt' using 5:4 with points title 'All OM' pause pflg set xlabel 'Clay' plot 'odat_diff.txt' using ($8<0.35?($5):NaN):4 with points title 'OM<35%' pause pflg exit a = -1 b = -1 c = 1 d = -5 e = 1 f = 1 f(x) = a*(x+d)*(x+d) + b*(x+d) + c + e*exp(f*x) #fit f(x) 'odat_diff.txt' using 7:4 via a,b,c,d,e,f # final sum of squares of residuals : 0.77258 a = 0.254494 # +/- 0.8115 (318.9%) b = 0.910623 # +/- 1.433e+10 (1.574e+12%) c = 0.41558 # +/- 2.562e+10 (6.164e+12%) d = -4.0794 # +/- 2.816e+10 (6.904e+11%) e = -0.937184 # +/- 0.6643 (70.88%) f = -4.70351 # +/- 2.426 (51.58%) plot f(x), 'odat_diff.txt' using 7:4 with points pause pflg a = -1 b = -1 c = 1 d = -5 e = 1 f = 1 f(x) = a*(x+d)*(x+d) + b*(x+d) + c + e*sin(f*x) #fit f(x) 'odat_diff.txt' using 7:4 via a,b,c,d,e,f # final sum of squares of residuals : 0.758665 a = -6.82882 # +/- 1.207 (17.67%) b = -4.96788 # +/- 6.764e+10 (1.362e+12%) c = 2.32028 # +/- 2.457e+10 (1.059e+12%) d = -1.04948 # +/- 4.953e+09 (4.719e+11%) e = -3.02462 # +/- 0.8598 (28.43%) f = 2.15669 # +/- 0.3891 (18.04%) plot f(x), 'odat_diff.txt' using 7:4 with points pause pflg a = -1 b = -1 c = 1 d = -5 e = 1 f = 1 g = 1 h = 1 f(x) = a*(x+d)*(x+d) + b*(x+d) + c + e*sin(f*x) + g*cos(h*x) #fit f(x) 'odat_diff.txt' using 7:4 via a,b,c,d,e,f,g,h #final sum of squares of residuals : 0.747182 a = 0.100419 # +/- 11.4 (1.135e+04%) b = 0.499643 # +/- 6.176e+09 (1.236e+12%) c = -0.201248 # +/- 1.535e+10 (7.628e+12%) d = -4.77603 # +/- 3.075e+10 (6.439e+11%) e = 1.11687 # +/- 11.76 (1053%) f = 2.61841 # +/- 13.24 (505.5%) g = 0.323616 # +/- 1.315 (406.4%) h = 4.99596 # +/- 7.6 (152.1%) plot f(x), 'odat_diff.txt' using 7:4 with points pause pflg a = 1 b = 1 c = 1 d = 1 f(x) = a*cos(x) + b*sin(x) + c*cos(2*x) + d*sin(2*x) #fit f(x) 'odat_diff.txt' using 7:4 via a,b,c,d # final sum of squares of residuals : 0.773553 a = -2.57058 # +/- 0.2528 (9.835%) b = 4.09442 # +/- 0.5145 (12.56%) c = 2.61977 # +/- 0.2402 (9.168%) d = -0.940779 # +/- 0.1928 (20.5%) plot f(x), 'odat_diff.txt' using 7:4 with points pause pflg exit ---END odat_diff.plt--- ---BEGIN odat_ratio.plt--- set yrange [1:] set xrange [0:1] pflg = -1 set ylabel 'Reference/Settled BD (Mg/m^3)' set xlabel 'OM' plot 'odat_ratio.txt' using 8:4 with points title 'All OM' pause pflg set xlabel 'Sand' plot 'odat_ratio.txt' using 7:4 with points title 'All OM' pause pflg set xlabel 'Sand' plot 'odat_ratio.txt' using ($8<0.35?($7):NaN):4 with points title 'OM<35%' pause pflg set xlabel 'Silt' plot 'odat_ratio.txt' using 6:4 with points title 'All OM' pause pflg set xlabel 'Silt' plot 'odat_ratio.txt' using ($8<0.35?($6):NaN):4 with points title 'OM<35%' pause pflg set xlabel 'Clay' plot 'odat_ratio.txt' using 5:4 with points title 'All OM' pause pflg set xlabel 'Clay' plot 'odat_ratio.txt' using ($8<0.35?($5):NaN):4 with points title 'OM<35%' pause pflg exit pflg = 5 set xlabel 'Sand' a = -1 b = -1 c = 1 d = -5 e = 1 f = 1 f(x) = a*(x+d)*(x+d) + b*(x+d) + c + e*exp(f*x) #fit f(x) 'odat_ratio.txt' using ($8<0.35?($7):(1/0)):4 via a,b,c,d,e,f #final sum of squares of residuals : 1.05669 a = -0.592157 # +/- 57.22 (9663%) b = -2.93319 # +/- 1.684e+10 (5.74e+11%) c = 0.853777 # +/- 4.167e+10 (4.88e+12%) d = -4.2057 # +/- 1.422e+10 (3.381e+11%) e = -1.53158 # +/- 426.4 (2.784e+04%) f = 0.800238 # +/- 66.57 (8318%) plot f(x), 'odat_ratio.txt' using ($8<0.35?($7):NaN):4 with points pause pflg a = -1 b = -1 c = 1 d = -5 e = 1 f = 1 f(x) = a*(x+d)*(x+d) + b*(x+d) + c + e*sin(f*x) #fit f(x) 'odat_ratio.txt' using ($8<0.35?($7):(1/0)):4 via a,b,c,d,e,f #final sum of squares of residuals : 1.00515 a = -3.64523 # +/- 2.171 (59.55%) b = -4.69548 # +/- 5.472e+10 (1.165e+12%) c = 1.42433 # +/- 3.52e+10 (2.472e+12%) d = -1.34869 # +/- 7.505e+09 (5.565e+11%) e = -1.80162 # +/- 5.343 (296.6%) f = 1.96521 # +/- 2.72 (138.4%) plot f(x), 'odat_ratio.txt' using ($8<0.35?($7):NaN):4 with points pause pflg a = -1 b = -1 c = 1 d = -5 e = 1 f = 1 g = 1 h = 1 f(x) = a*(x+d)*(x+d) + b*(x+d) + c + e*sin(f*x) + g*cos(h*x) #fit f(x) 'odat_ratio.txt' using ($8<0.35?($7):(1/0)):4 via a,b,c,d,e,f,g,h #final sum of squares of residuals : 1.00686 a = -0.199255 # +/- 2585 (1.298e+06%) b = -0.894163 # +/- 9.435e+09 (1.055e+12%) c = 0.954062 # +/- 2.115e+10 (2.216e+12%) d = -4.99055 # +/- 2.368e+10 (4.744e+11%) e = 0.631356 # +/- 9.669e+05 (1.532e+08%) f = 0.588887 # +/- 2.999e+05 (5.092e+07%) g = 0.676088 # +/- 1317 (1.947e+05%) h = 2.70479 # +/- 1222 (4.518e+04%) plot f(x), 'odat_ratio.txt' using ($8<0.35?($7):NaN):4 with points pause pflg a = 1 b = 1 c = 1 d = 1 f(x) = a*cos(x) + b*sin(x) + c*cos(2*x) + d*sin(2*x) #fit f(x) 'odat_ratio.txt' using ($8<0.35?($7):(1/0)):4 via a,b,c,d #final sum of squares of residuals : 1.00632 a = -0.516472 # +/- 0.5369 (104%) b = 3.46117 # +/- 1.25 (36.11%) c = 1.64331 # +/- 0.5152 (31.35%) d = -0.965802 # +/- 0.5011 (51.89%) plot f(x), 'odat_ratio.txt' using ($8<0.35?($7):NaN):4 with points pause pflg exit ---END odat_ratio.plt--- ---BEGIN odat_drat.plt--- set yrange [0:] set xrange [0:1] pflg = -1 set ylabel 'Reference/Settled BD (Mg/m^3)' set xlabel 'OM' plot 'odat_drat.txt' using 8:4 with points title 'All OM' pause pflg set xlabel 'Sand' plot 'odat_drat.txt' using 7:4 with points title 'All OM' pause pflg set xlabel 'Sand' plot 'odat_drat.txt' using ($8<0.35?($7):NaN):4 with points title 'OM<35%' pause pflg set xlabel 'Silt' plot 'odat_drat.txt' using 6:4 with points title 'All OM' pause pflg set xlabel 'Silt' plot 'odat_drat.txt' using ($8<0.35?($6):NaN):4 with points title 'OM<35%' pause pflg set xlabel 'Clay' plot 'odat_drat.txt' using 5:4 with points title 'All OM' pause pflg set xlabel 'Clay' plot 'odat_drat.txt' using ($8<0.35?($5):NaN):4 with points title 'OM<35%' pause pflg exit pflg = 5 set xlabel 'Sand' a = -1 b = -1 c = 1 d = -5 e = 1 f = 1 f(x) = a*(x+d)*(x+d) + b*(x+d) + c + e*exp(f*x) #fit f(x) 'odat_drat.txt' using ($8<0.35?($7):(1/0)):4 via a,b,c,d,e,f #final sum of squares of residuals : 1.05783 a = -0.523935 # +/- 53.14 (1.014e+04%) b = -2.54544 # +/- 1.231e+10 (4.835e+11%) c = 0.846633 # +/- 2.987e+10 (3.528e+12%) d = -4.45513 # +/- 1.175e+10 (2.636e+11%) e = -1.60272 # +/- 377.2 (2.354e+04%) f = 0.817038 # +/- 57.28 (7011%) plot f(x), 'odat_drat.txt' using ($8<0.35?($7):NaN):4 with points pause pflg a = -1 b = -1 c = 1 d = -5 e = 1 f = 1 f(x) = a*(x+d)*(x+d) + b*(x+d) + c + e*sin(f*x) #fit f(x) 'odat_drat.txt' using ($8<0.35?($7):(1/0)):4 via a,b,c,d,e,f #final sum of squares of residuals : 1.00529 a = -3.58578 # +/- 2.148 (59.9%) b = -4.29519 # +/- 6.029e+10 (1.404e+12%) c = 0.969094 # +/- 3.606e+10 (3.722e+12%) d = -1.36937 # +/- 8.406e+09 (6.139e+11%) e = -2.1641 # +/- 8.512 (393.3%) f = 1.81974 # +/- 3.139 (172.5%) plot f(x), 'odat_drat.txt' using ($8<0.35?($7):NaN):4 with points pause pflg a = -1 b = -1 c = 1 d = -5 e = 1 f = 1 g = 1 h = 1 f(x) = a*(x+d)*(x+d) + b*(x+d) + c + e*sin(f*x) + g*cos(h*x) #fit f(x) 'odat_drat.txt' using ($8<0.35?($7):(1/0)):4 via a,b,c,d,e,f,g,h #final sum of squares of residuals : 1.00684 a = -0.238457 # +/- 2168 (9.091e+05%) b = -0.911753 # +/- 1.394e+10 (1.529e+12%) c = 0.715569 # +/- 2.661e+10 (3.719e+12%) d = -4.89641 # +/- 2.922e+10 (5.968e+11%) e = 0.136044 # +/- 1.329e+07 (9.766e+09%) f = 0.335704 # +/- 1.091e+07 (3.251e+09%) g = 0.666854 # +/- 1108 (1.661e+05%) h = 2.70843 # +/- 1050 (3.877e+04%) plot f(x), 'odat_drat.txt' using ($8<0.35?($7):NaN):4 with points pause pflg a = 1 b = 1 c = 1 d = 1 f(x) = a*cos(x) + b*sin(x) + c*cos(2*x) + d*sin(2*x) #fit f(x) 'odat_drat.txt' using ($8<0.35?($7):(1/0)):4 via a,b,c,d #final sum of squares of residuals : 1.00689 a = -1.75229 # +/- 0.5371 (30.65%) b = 2.92099 # +/- 1.25 (42.8%) c = 1.88065 # +/- 0.5153 (27.4%) d = -0.709907 # +/- 0.5013 (70.61%) plot f(x), 'odat_drat.txt' using ($8<0.35?($7):NaN):4 with points pause pflg exit ---END odat_drat.plt--- The values produced by each of the models for the data set are placed in the files value_diff.txt, value_ratio.txt and value_rdat.txt and the goodness of each model is evaluated using paired points analysis. ---BEGIN Paired Analysis Script--- test_soil_density value diff cat value_diff.txt | dm "if INLINE > 1 then INPUT else SKIP" | colex 3 4 | pair -s test_soil_density value ratio cat value_ratio.txt | dm "if INLINE > 1 then INPUT else SKIP" | colex 3 4 | pair -s test_soil_density value drat cat value_drat.txt | dm "if INLINE > 1 then INPUT else SKIP" | colex 3 4 | pair -s ---END Paired Analysis Script--- Comparing the means and standard deviation of the difference of the two columns, the difference ratio method has the smallest mean and standard deviation, best t value and highest p for the difference between the modeled columns and the data column. value_diff.txt Analysis for 231 points: Column 1 Column 2 Difference Minimums 0.3670 0.3577 -0.1624 Maximums 1.8170 1.8623 0.2483 Sums 281.1990 275.3430 5.8560 SumSquares 398.1717 377.3710 1.4992 Means 1.2173 1.1920 0.0254 SDs 0.4928 0.4624 0.0766 t(230) 37.5407 39.1804 5.0278 p 0.0000 0.0000 0.0000 Correlation r-squared t(229) p 0.9892 0.9784 101.8900 0.0000 Intercept Slope 0.0623 0.9280 value_ratio.txt Analysis for 231 points: Column 1 Column 2 Difference Minimums 0.3670 0.3321 -0.2314 Maximums 1.8170 1.9538 0.2180 Sums 281.1990 281.7599 -0.5609 SumSquares 398.1717 399.8484 1.2621 Means 1.2173 1.2197 -0.0024 SDs 0.4928 0.4942 0.0740 t(230) 37.5407 37.5117 -0.4985 p 0.0000 0.0000 0.6186 Correlation r-squared t(229) p 0.9888 0.9776 100.0366 0.0000 Intercept Slope 0.0128 0.9915 value_drat.txt Analysis for 231 points: Column 1 Column 2 Difference Minimums 0.3670 0.3263 -0.2312 Maximums 1.8170 1.9542 0.2223 Sums 281.1990 281.2526 -0.0536 SumSquares 398.1717 398.6575 1.2752 Means 1.2173 1.2175 -0.0002 SDs 0.4928 0.4944 0.0745 t(230) 37.5407 37.4290 -0.0474 p 0.0000 0.0000 0.9623 Correlation r-squared t(229) p 0.9886 0.9774 99.4863 0.0000 Intercept Slope 0.0103 0.9918 This reference bulk density relationship with Proctor density data from the WEPP and SERDP data sets may be adequate. For comparison, the Proctor density model from Wagner et al. 1994 was programmed and fit to the reference data set, the data set from the paper (WEPP data set) and the data set from the SERDP project (SERDP data set). Wagner, L.E., Ambe, N.M., Ding, D. Estimating a Proctor Density Curve from Intrinsic Soil Properties. Trans of the ASAE; 1994; 37((4)): 1121-1125. The Optimal Water Content function developed in the paper (Om content < 3.13%) shows instability for OM contents above 5%. This functional relationship was developed using the WEPP data set. Since the SERDP data set is independent, the goodness of fit with the regression is compared against the goodness of fit original data set. ---BEGIN show-owc-procden.plt--- # NOTE: data file values are percent, not fraction set term wxt size 900,500 set key bottom owc_a0 = 21.09 owc_a1 = -0.2892 owc_a2 = 0.007075 owc_a3 = -0.001375 owc_a4 = 0.4234 owc(clay, sand, om) = owc_a0 + owc_a1*clay + owc_a2*clay*clay + owc_a3*sand*sand + owc_a4*om*om den_organic = 1.23 den_quartz = 2.65 pden(om) = 1.0 / ((om/100.0)/den_organic + (1.0-(om/100.0))/den_quartz) procden(clay,sand,om) = pden(om) / (1.0 + pden(om)*owc(clay,sand,om)/80.0) set term wxt 1 set xlabel 'fit OWC (%)' set ylabel 'data OWC (%)' plot x, 'proctor-wepp.txt' using (owc($3,$4,$5)):6 with points, 'proctor-serdp.txt' using (owc($2,$4,$5)):6 with points set term wxt 2 set xlabel 'Fit Proctor BD (Mg/m^3)' set ylabel 'Data BD (Mg/m^3)' plot x, 'proctor-wepp.txt' using (procden($3,$4,$5)):7 with points, 'proctor-serdp.txt' using (procden($2,$4,$5)):7 with points set table "temp.out" plot 'proctor-wepp.txt' using (owc($3,$4,$5)):6 with points unset table !cat temp.out | dm "if INLINE > 4 then INPUT else SKIP" | colex 1 2 | pair -s set table "temp.out" plot 'proctor-serdp.txt' using (owc($2,$4,$5)):6 with points unset table !cat temp.out | dm "if INLINE > 4 then INPUT else SKIP" | colex 1 2 | pair -s set table "temp.out" plot 'proctor-wepp.txt' using (procden($3,$4,$5)):7 with points unset table !cat temp.out | dm "if INLINE > 4 then INPUT else SKIP" | colex 1 2 | pair -s set table "temp.out" plot 'proctor-serdp.txt' using (procden($2,$4,$5)):7 with points unset table !cat temp.out | dm "if INLINE > 4 then INPUT else SKIP" | colex 1 2 | pair -s !rm temp.out ---END show-owc-procden.plt--- Fit comparison for OWC for WEPP data Analysis for 39 points: Column 1 Column 2 Difference Minimums 8.5306 8.0000 -3.5307 Maximums 27.2244 26.0000 3.1422 Sums 662.0644 662.0000 0.0644 SumSquares 11948.0020 12050.0000 104.2232 Means 16.9760 16.9744 0.0017 SDs 4.3188 4.6254 1.6561 t(38) 24.5471 22.9181 0.0062 p 0.0000 0.0000 0.9951 Correlation r-squared t(37) p 0.9337 0.8718 15.8623 0.0000 Intercept Slope -0.0012 1.0000 Fit comparison for OWC for SERDP data Analysis for 36 points: Column 1 Column 2 Difference Minimums 9.1566 7.7693 -4.5782 Maximums 28.7757 26.0364 8.3252 Sums 653.7300 581.4578 72.2722 SumSquares 13173.1731 10553.5720 333.1002 Means 18.1592 16.1516 2.0076 SDs 6.0991 5.7622 2.3177 t(35) 17.8640 16.8182 5.1971 p 0.0000 0.0000 0.0000 Correlation r-squared t(34) p 0.9252 0.8560 14.2154 0.0000 Intercept Slope 0.2791 0.8741 Fit comparison for PROCDEN for WEPP data Analysis for 39 points: Column 1 Column 2 Difference Minimums 1.3674 1.4600 -0.1190 Maximums 2.0615 1.9900 0.2915 Sums 66.1775 65.6900 0.4875 SumSquares 113.3163 111.3523 0.2988 Means 1.6969 1.6844 0.0125 SDs 0.1640 0.1364 0.0878 t(38) 64.6067 77.1300 0.8895 p 0.0000 0.0000 0.3793 Correlation r-squared t(37) p 0.8449 0.7139 9.6077 0.0000 Intercept Slope 0.4923 0.7025 Fit comparison for PROCDEN for SERDP data Analysis for 36 points: Column 1 Column 2 Difference Minimums 1.3179 1.4364 -0.2648 Maximums 2.0276 1.9559 0.2663 Sums 59.6409 61.1836 -1.5427 SumSquares 100.5201 104.7928 0.5864 Means 1.6567 1.6995 -0.0429 SDs 0.2213 0.1520 0.1219 t(35) 44.9256 67.0930 -2.1088 p 0.0000 0.0000 0.0422 Correlation r-squared t(34) p 0.8503 0.7231 9.4216 0.0000 Intercept Slope 0.7319 0.5841 The fit of optimum water content to the WEPP data set is better than the ability of the fit to model the SERDP data set. The mean of the residuals changes from 0.0017 for WEPP to 2.0076 for SERDP and the standard deviation increases from 1.6561 for WEPP to 2.3177 for SERDP. Similarly, using the WEPP fit OWC relationship to model the proctor density, the mean of the residual changes from 0.0125 for WEPP to -0.0429 for SERDP and the standard deviation increases from 0.0878 for WEPP to 0.1219 for SERDP. Plotting the two data sets together for the independent variables show that ---BEGIN show-wepp-serdp.plt--- set xrange [0:] set term wxt size 900,500 set key bottom set term wxt 1 set xlabel 'clay (%)' set ylabel 'data OWC (%)' plot 'proctor-wepp.txt' using 3:6 with points, 'proctor-serdp.txt' using 2:6 with points set term wxt 2 set xlabel 'sand (%)' plot 'proctor-wepp.txt' using 4:6 with points, 'proctor-serdp.txt' using 4:6 with points set term wxt 3 set xlabel 'OM (%)' plot 'proctor-wepp.txt' using 5:6 with points, 'proctor-serdp.txt' using 5:6 with points ---END show-wepp-serdp.plt--- Optimum water content increases with increasing OM and clay, and decreases with increasing sand. Fitting to a simple linear model: ---BEGIN fit-wepp-serdp-owc.plt--- # create composite data set !cat proctor-wepp.txt | colex 1 3 4 5 6 7 > proctor-wepp-serdp.txt !cat proctor-serdp.txt | colex 1 2 4 5 6 7 >> proctor-wepp-serdp.txt owc_a = 16 owc_b = 1 owc_c = -1 owc_d = 1 owc(clay,sand,om) = owc_a + owc_b*clay + owc_c*sand + owc_d*om fit [clay=0:100] [sand=0:100] [om=0:100] owc(clay,sand,om) 'proctor-wepp-serdp.txt' using 2:3:4:5:(1) via owc_a,owc_b,owc_c,owc_d # result of fit owc_a = 16.0932 # +/- 1.32 (8.201%) owc_b = 0.129032 # +/- 0.02986 (23.14%) owc_c = -0.0883454 # +/- 0.0147 (16.64%) owc_d = 1.06305 # +/- 0.2585 (24.32%) # plot the residuals set xrange [0:] set term wxt size 900,500 set key bottom set term wxt 1 set xlabel 'clay (%)' set ylabel 'residual OWC (%)' plot 'proctor-wepp-serdp.txt' using 2:($5-owc($2,$3,$4)) with points set term wxt 2 set xlabel 'sand (%)' plot 'proctor-wepp-serdp.txt' using 3:($5-owc($2,$3,$4)) with points set term wxt 3 set xlabel 'OM (%)' plot 'proctor-wepp-serdp.txt' using 4:($5-owc($2,$3,$4)) with points # find goodness of fit set table "temp.out" plot 'proctor-wepp-serdp.txt' using (owc($2,$3,$4)):5 with points unset table !cat temp.out | dm "if INLINE > 4 then INPUT else SKIP" | colex 1 2 | pair -s !rm temp.out ---END fit-wepp-serdp-owc.plt--- Analysis for 75 points: Column 1 Column 2 Difference Minimums 8.6060 7.7693 -5.5421 Maximums 24.4677 26.0364 3.3199 Sums 1243.4614 1243.4578 0.0036 SumSquares 22289.4528 22603.5720 314.2432 Means 16.5795 16.5794 0.0000 SDs 4.7555 5.1828 2.0607 t(74) 30.1929 27.7036 0.0002 p 0.0000 0.0000 1.0000 Correlation r-squared t(73) p 0.9176 0.8419 19.7170 0.0000 Intercept Slope -0.0000 1.0000 The standard deviation for this composite set is greater than the original WEPP data set fit, but less than using that fit for the SERDP data set. Using this OWC relationship to predict the Proctor Density results in: ---BEGIN new-owc-procden.plt--- # NOTE: data file values are percent, not fraction set term wxt size 900,500 set key bottom owc_a = 16.0932 # +/- 1.32 (8.201%) owc_b = 0.129032 # +/- 0.02986 (23.14%) owc_c = -0.0883454 # +/- 0.0147 (16.64%) owc_d = 1.06305 # +/- 0.2585 (24.32%) owc(clay,sand,om) = owc_a + owc_b*clay + owc_c*sand + owc_d*om den_organic = 1.23 den_quartz = 2.65 pden(om) = 1.0 / ((om/100.0)/den_organic + (1.0-(om/100.0))/den_quartz) procden(clay,sand,om) = pden(om) / (1.0 + pden(om)*owc(clay,sand,om)/80.0) set xlabel 'Fit Proctor BD (Mg/m^3)' set ylabel 'Data BD (Mg/m^3)' plot x, 'proctor-wepp-serdp.txt' using (procden($2,$3,$4)):6 with points set table "temp.out" plot 'proctor-wepp-serdp.txt' using (procden($2,$3,$4)):6 with points unset table !cat temp.out | dm "if INLINE > 4 then INPUT else SKIP" | colex 1 2 | pair -s !rm temp.out ---END new-owc-procden.plt--- Analysis for 75 points: Column 1 Column 2 Difference Minimums 1.4273 1.4364 -0.2137 Maximums 2.0563 1.9900 0.3303 Sums 128.1673 126.8736 1.2937 SumSquares 221.5860 216.1451 0.9044 Means 1.7089 1.6916 0.0172 SDs 0.1860 0.1433 0.1092 t(74) 79.5483 102.2339 1.3682 p 0.0000 0.0000 0.1754 Correlation r-squared t(73) p 0.8107 0.6572 11.8313 0.0000 Intercept Slope 0.6245 0.6244 The result is a standard deviation that is also greater than the original WEPP data set fit, but less than using that fit for the SERDP data set. Using this relationship with high organic matter soils running 'test_soil_density wepp' creates 'proc-wepp-ref.txt' running 'test_soil_density serdp' creates 'proc-serdp-ref.txt' running 'test_soil_density pref' creates 'proc-pref-ref.txt' ---BEGIN ref-new-owc-procden.plt--- # NOTE: data file values are fraction, not percent set term wxt size 1800,1000 set key bottom owc_a = 16.0932 owc_b = 0.129032*100 owc_c = -0.0883454*100 owc_d = 1.06305*100 owc(clay,sand,om) = owc_a + owc_b*clay + owc_c*sand + owc_d*om den_organic = 1.23 den_quartz = 2.65 pden(om) = 1.0 / ((om)/den_organic + (1.0-(om))/den_quartz) procden(clay,sand,om) = pden(om) / (1.0 + pden(om)*owc(clay,sand,om)/80.0) set term wxt 1 set xlabel 'Fit Proctor BD (Mg/m^3)' set ylabel 'Data BD (Mg/m^3)' plot x, 'proc-wepp-ref.txt' using (procden($8,$10,$11)):3 with points, 'proc-serdp-ref.txt' using (procden($8,$10,$11)):3 with points, 'proc-pref-ref.txt' using (procden($8,$10,$11)):3 with points set term wxt 2 set xlabel 'OM' set ylabel 'OWC (%)' plot 'proc-wepp-ref.txt' using 11:(owc($8,$10,$11)) with points, 'proc-serdp-ref.txt' using 11:(owc($8,$10,$11)) with points, 'proc-pref-ref.txt' using 11:(owc($8,$10,$11)) with points ---END ref-new-owc-procden.plt--- The proctor density relationship does not fit well for the uniaxial compression data at high organic matter content. Lacking real proctor density data values in that range, it will be adjusted later as needed. ---BEGIN proc_all.plt--- set key bottom set xrange [0:] pflg = -1 set term wxt size 1800,1000 set ylabel 'Data BD (Mg/m^3)' set term wxt 1 set xlabel 'OM' plot 'proc-wepp-ref.txt' using 11:3 with points, 'proc-serdp-ref.txt' using 11:3 with points, 'proc-pref-ref.txt' using 11:3 with points set term wxt 2 set xlabel 'Sand' plot 'proc-wepp-ref.txt' using 10:3 with points, 'proc-serdp-ref.txt' using 10:3 with points, 'proc-pref-ref.txt' using 10:3 with points set term wxt 3 set xlabel 'Silt' plot 'proc-wepp-ref.txt' using 9:3 with points, 'proc-serdp-ref.txt' using 9:3 with points, 'proc-pref-ref.txt' using 9:3 with points set term wxt 4 set xlabel 'Clay' plot 'proc-wepp-ref.txt' using 8:3 with points, 'proc-serdp-ref.txt' using 8:3 with points, 'proc-pref-ref.txt' using 8:3 with points set term wxt 5 set xlabel 'PartDen (Mg/m^3)' plot 'proc-wepp-ref.txt' using 7:3 with points, 'proc-serdp-ref.txt' using 7:3 with points, 'proc-pref-ref.txt' using 7:3 with points set ylabel 'Data BD (Mg/m^3)' set term wxt 6 set xlabel 'Settled BD (Mg/m^3)' plot 'proc-wepp-ref.txt' using 4:3 with points, 'proc-serdp-ref.txt' using 4:3 with points, 'proc-pref-ref.txt' using 4:3 with points, x set term wxt 7 set xlabel 'Reference BD (Mg/m^3)' plot 'proc-wepp-ref.txt' using 5:3 with points, 'proc-serdp-ref.txt' using 5:3 with points, 'proc-pref-ref.txt' using 5:3 with points, x set term wxt 8 set xlabel 'Proctor BD (Mg/m^3)' plot 'proc-wepp-ref.txt' using 6:3 with points, 'proc-serdp-ref.txt' using 6:3 with points, 'proc-pref-ref.txt' using 6:3 with points, x set term wxt 9 set ylabel 'Reference BD (Mg/m^3)' set xlabel 'Proctor BD (Mg/m^3)' plot 'proc-wepp-ref.txt' using 6:5 with points, 'proc-serdp-ref.txt' using 6:3 with points, 'proc-pref-ref.txt' using 6:3 with points, x pause pflg ---END proc_all.plt--- The script below contains some interesting methods for gnuplot, but the results were ultimately not used. ---BEGIN fit-procden.plt--- # NOTE: data file values are fraction, not percent set key bottom min(x,y) = (x