76 static double satcond[
NCLASS] = {0.0, 0.000176, 0.0001563,
77 0.00003467, 0.0000072, 0.00000695,
78 0.0000063, 0.0000017, 0.00000245,
79 0.000002167, 0.000001033,
80 0.000001283, 0.0000080, 0.0000080};
81 static double bulk_density[
NCLASS] = {0.0, 1.55, 1.50, 1.43, 1.36,
82 1.39, 1.35, 1.24, 1.30, 1.28,
83 1.19, 1.15, 1.40, 0.75};
84 static double field_capacity[
NCLASS] = {0.0, 0.14, 0.18, 0.22, 0.32,
85 0.29, 0.28, 0.40, 0.36,
86 0.36, 0.46, 0.45, 0.33,
90 double sand, silt, clay;
96 if ((sand > 100 || sand < 0) || (silt > 100 || silt < 0) ||
97 (clay > 100 || clay < 0)) {
98 fprintf(stderr,
"Invalid texture in getsoilprop: sand = %f,", sand);
99 fprintf(stderr,
" silt = %f, clay = %f\n", silt, clay);
106 }
else if ((sand >= 85) && ((-2.0/3.0)*silt - clay + 10 >= 0)) {
109 }
else if (((-2.0/3.0)*silt - clay + 10 <= 0) &&
110 (-0.5*silt - clay + 15 >= 0)) {
113 }
else if (((-0.5*silt-clay+15 <= 0) && (clay <= 20) && (sand >= 52)) ||
114 ((sand <= 52) && (silt <= 50) && (clay <= 7))) {
117 }
else if ((sand <= 50) && (silt >= 50) && (clay <= 27)) {
118 if ((sand <= 20) && (clay <= 10)) {
125 }
else if ((sand >= 23 && sand <= 52) && (silt >= 28 && silt <= 50) &&
126 (clay >= 7 && clay <= 27)) {
129 }
else if ((sand >= 45 && sand <= 80) && (silt <= 28) &&
130 (clay >= 20 && clay <= 35)) {
133 }
else if ((sand <= 20) && (clay >= 27 && clay <= 40)) {
136 }
else if ((sand >= 20 && sand <= 45) && (clay >= 27 && clay <= 40)) {
139 }
else if ((sand >= 45 && sand <= 65) && (silt <= 20) &&
140 (clay >= 35 && clay <= 55)) {
143 }
else if ((sand <= 20) && (silt >= 40 && silt <= 60) &&
144 (clay >= 40 && clay <= 60)) {
147 }
else if ((sand <= 45) && (silt <= 40) && (clay >= 40)) {
151 fprintf(stderr,
"Unknown texture type: sand = %f, silt = %f,", sand,
153 fprintf(stderr,
" clay = %f\n", clay);
157 *bulkden = bulk_density[soil_indx];
158 *fieldcap = field_capacity[soil_indx];
159 ksat = satcond[soil_indx]*100.0;
160 *soilclassification=soil_indx-1;
#define VERYFINE
Definition: getsoilprop.c:71
#define NCLASS
Definition: getsoilprop.c:67