Mast head image

WEPS Related Soil Data

This script retrieves data needed for the WEPS program.


Text highlighted in yellow in the example script can be changed for a particular area; e.g., 'MO123' can be substituted for 'NE109'. Also, you can use wildcards to get the entire State; e.g., 'MO%' will extract the state of Missouri. More examples can be found on the TIPS page.

Tips Page

Copy the example script below and paste it into the query page on the Soil Data Access site.

Soil Data Access Query Page

Example Script

SELECT sa.saversion, sa.saverest, l.lkey, mu.mukey, c.cokey, ch.chkey, l.areasymbol, l.areaname, mu.musym , mu.muname, mu.muacres, c.compname , c.comppct_r,localphase , slope_r , slopelenusle_r , albedodry_r , desgnmaster, hzname, hzdept_r, hzdepb_r, hzdepb_r-hzdept_r AS thick, claytotal_r, silttotal_r, sandtotal_r, sandvc_r, sandco_r, sandmed_r, sandfine_r, sandvf_r, texture, (SELECT CASE WHEN SUM(cf.fragvol_r) IS NULL THEN '0' ELSE CAST(SUM(cf.fragvol_r) AS VARCHAR) END FROM chfrags cf WHERE cf.chkey = ch.chkey) AS fragvol, sieveno10_r, fraggt10_r, frag3to10_r, kffact, dbthirdbar_r, dbovendry_r, ksat_r, ph1to1h2o_r, wthirdbar_r, wfifteenbar_r, awc_l,awc_r, om_r, ec_r, caco3_r, cec7_r, ecec_r

FROM legend AS l

INNER JOIN mapunit AS mu ON mu.lkey = l.lkey

INNER JOIN sacatalog AS sa ON sa.areasymbol = l.areasymbol AND l.areasymbol LIKE 'OH003'

INNER JOIN component AS c ON c.mukey = mu.mukey AND compkind != 'miscellaneous area'

INNER JOIN chorizon AS ch ON ch.cokey = c.cokey

INNER JOIN chtexturegrp AS ct ON ch.chkey=ct.chkey AND ct.rvindicator = 'yes'

ORDER BY areasymbol, musym, comppct_r DESC, hzdept_r

Examples Table Output

Column headers have not been changed from the original script.

Description of tables and columns can be found on this link: Table and Column Descriptions

sa.saversion sa.saverest l.lkey mu.mukey c.cokey ch.chkey l.areasymbol l.areaname mu.musym mu.muname mu.muacres c.compname c.comppct_r localphase slope_r slopelenusle_r albedodry_r desgnmaster hzname hzdept_r hzdepb_r thick claytotal_r silttotal_r sandtotal_r sandvc_r sandco_r sandmed_r sandfine_r sandvf_r texture fragvol sieveno10_r fraggt10_r frag3to10_r kffact dbthirdbar_r dbovendry_r ksat_r ph1to1h2o_r wthirdbar_r wfifteenbar_r awc_l awc_r om_r ec_r caco3_r cec7_r ecec_r
16 9/16/2016 7:45:35 PM 11521 171870 13333797 38139888 OH003 Allen County, Ohio AkA Alvada loam, 0 to 1 percent slopes 1607 Alvada 90 0.5 53 0.23 H H1 0 36 36 22.5 37.7 39.8 3.6 5 6.9 12.5 11.8 L 10 92.5 0 0 .24 1.38 1.45 9.17 6.5 31.2 18.5 0.18 0.2 5.5 0 0 22.7
16 9/16/2016 7:45:35 PM 11521 171872 13333809 38139894 OH003 Allen County, Ohio ArB Arkport loamy fine sand, 2 to 6 percent slopes 199 Arkport 100 4 23 0.3 H H2 25 46 21 9 6.5 84.5 0 1.3 13.2 46.9 23.1 LFS 4 92.5 0 0 .24 1.4 1.47 28.23 5.9 15.3 6.1 0.06 0.11 0.5 0 0 4.5



Helping People Help the Land

USDA is an equal opportunity provider, employer, and lender.