Last data update: 2014.03.03

R: The Cook Agronomy Farm data set
cookfarmR Documentation

The Cook Agronomy Farm data set

Description

The R.J. Cook Agronomy Farm (cookfarm) is a Long-Term Agroecosystem Research Site operated by Washington State University, located near Pullman, Washington, USA. Contains spatio-temporal (3D+T) measurements of three soil properties and a number of spatial and temporal regression covariates.

Usage

data(cookfarm)

Format

The cookfarm data set contains four data frames. The readings data frame contains measurements of volumetric water content (cubic-m/cubic-m), temperature (degree C) and bulk electrical conductivity (dS/m), measured at 42 locations using 5TE sensors at five standard depths (0.3, 0.6, 0.9, 1.2, 1.5 m) for the period "2011-01-01" to "2012-12-31":

SOURCEID

factor; unique station ID

Date

date; observation day

Port*VW

numeric; volumetric water content measurements at five depths

Port*C

numeric; soil temperature measurements at five depths

Port*EC

numeric; bulk electrical conductivity measurements at five depths

The profiles data frame contains soil profile descriptions from 142 sites:

SOURCEID

factor; unique station ID

Easting

numeric; x coordinate in the local projection system

Northing

numeric; y coordinate in the local projection system

TAXNUSDA

factor; Keys to Soil Taxonomy taxon name e.g. "Caldwell"

HZDUSD

factor; horizon designation

UHDICM

numeric; upper horizon depth from the surface in cm

LHDICM

numeric; lower horizon depth from the surface in cm

BLD

bulk density in tonnes per cubic-meter

PHIHOX

numeric; pH index measured in water solution

The grids data frame contains values of regression covariates at 10 m resolution:

DEM

numeric; Digital Elevation Model

TWI

numeric; SAGA GIS Topographic Wetness Index

MUSYM

factor; soil mapping units e.g. "Thatuna silt loam"

NDRE.M

numeric; mean value of the Normalized Difference Red Edge Index (time series of 11 RapidEye images)

NDRE.sd

numeric; standard deviation of the Normalized Difference Red Edge Index (time series of 11 RapidEye images)

Cook_fall_ECa

numeric; apparent electrical conductivity image from fall

Cook_spr_ECa

numeric; apparent electrical conductivity image from spring

X2011

factor; cropping system in 2011

X2012

factor; cropping system in 2012

The weather data frame contains daily temperatures and rainfall from the nearest meteorological station:

Date

date; observation day

Precip_wrcc

numeric; observed precipitation in mm

MaxT_wrcc

numeric; observed maximum daily temperature in degree C

MinT_wrccc

numeric; observed minimum daily temperature in degree C

Note

The farm is 37 ha, stationed in the hilly Palouse region, which receives an annual average of 550 mm of precipitation, primarily as rain and snow in November through May. Soils are deep silt loams formed on loess hills; clay silt loam horizons commonly occur at variable depths. Farming practices at Cook Farm are representative of regional dryland annual cropping systems (direct-seeded cereal grains and legume crops).

Author(s)

Caley Gasch, Tomislav Hengl and David J. Brown

References

  • Gasch, C.K., Hengl, T., Gräler, B., Meyer, H., Magney, T., Brown, D.J., 2015. Spatio-temporal interpolation of soil water, temperature, and electrical conductivity in 3D+T: the Cook Agronomy Farm data set. Spatial Statistics, 14, pp.70–90.

  • Gasch, C.K., D.J. Brown, E.S. Brooks, M. Yourek, M. Poggio, D.R. Cobos, C.S. Campbell, 2016? Retroactive calibration of soil moisture sensors using a two-step, soil-specific correction. Submitted to Vadose Zone Journal.

  • Gasch, C.K., D.J. Brown, C.S. Campbell, D.R. Cobos, E.S. Brooks, M. Chahal, M. Poggio, 2016? A field-scale sensor network data set for monitoring and modeling the spatial and temporal variation of soil moisture in a dryland agricultural field. Submitted to Water Resources Research.

Examples

## An example for 3D+T modelling applied to the cookfarm data set can be assesed via 
## demo(cookfarm_3DT_kriging)
## demo(cookfarm_3DT_RF)
## Please note that the demo's might take 10-15 minutes to complete.
library(rgdal)
library(sp)
library(spacetime)
library(aqp)
library(splines)
library(randomForest)
library(plyr)
library(plotKML)
data(cookfarm)

## gridded data:
grid10m <- cookfarm$grids
gridded(grid10m) <- ~x+y
proj4string(grid10m) <- CRS(cookfarm$proj4string)
spplot(grid10m["DEM"], col.regions=SAGA_pal[[1]])

## soil profiles:
profs <- cookfarm$profiles
levels(cookfarm$profiles$HZDUSD)
## Bt horizon:
sel.Bt <- grep("Bt", profs$HZDUSD, ignore.case=FALSE, fixed=FALSE)
profs$Bt <- 0
profs$Bt[sel.Bt] <- 1
depths(profs) <- SOURCEID ~ UHDICM + LHDICM
site(profs) <- ~ TAXSUSDA + Easting + Northing
coordinates(profs) <- ~Easting + Northing
proj4string(profs) <- CRS(cookfarm$proj4string)
profs.geo <- as.geosamples(profs)

## fit model for Bt horizon:
m.Bt <- GSIF::fit.gstatModel(profs.geo, Bt~DEM+TWI+MUSYM+Cook_fall_ECa
   +Cook_spr_ECa+ns(altitude, df = 4), grid10m, fit.family = binomial(logit))
plot(m.Bt)

## fit model for soil pH:
m.PHI <- fit.gstatModel(profs.geo, PHIHOX~DEM+TWI+MUSYM+Cook_fall_ECa
    +Cook_spr_ECa+ns(altitude, df = 4), grid10m)
plot(m.PHI)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(GSIF)
GSIF version 0.5-2 (2016-06-25)
URL: http://gsif.r-forge.r-project.org/
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/GSIF/cookfarm.Rd_%03d_medium.png", width=480, height=480)
> ### Name: cookfarm
> ### Title: The Cook Agronomy Farm data set
> ### Aliases: cookfarm
> ### Keywords: datasets
> 
> ### ** Examples
> 
> ## An example for 3D+T modelling applied to the cookfarm data set can be assesed via 
> ## demo(cookfarm_3DT_kriging)
> ## demo(cookfarm_3DT_RF)
> ## Please note that the demo's might take 10-15 minutes to complete.
> library(rgdal)
Loading required package: sp
rgdal: version: 1.1-10, (SVN revision 622)
 Geospatial Data Abstraction Library extensions to R successfully loaded
 Loaded GDAL runtime: GDAL 1.11.3, released 2015/09/16
 Path to GDAL shared files: /usr/share/gdal/1.11
 Loaded PROJ.4 runtime: Rel. 4.9.2, 08 September 2015, [PJ_VERSION: 492]
 Path to PROJ.4 shared files: (autodetected)
 Linking to sp version: 1.2-3 
> library(sp)
> library(spacetime)
> library(aqp)
This is aqp 1.9.3
> library(splines)
> library(randomForest)
randomForest 4.6-12
Type rfNews() to see new features/changes/bug fixes.
> library(plyr)
> library(plotKML)
plotKML version 0.5-6 (2016-05-02)
URL: http://plotkml.r-forge.r-project.org/
> data(cookfarm)
> 
> ## gridded data:
> grid10m <- cookfarm$grids
> gridded(grid10m) <- ~x+y
> proj4string(grid10m) <- CRS(cookfarm$proj4string)
> spplot(grid10m["DEM"], col.regions=SAGA_pal[[1]])
> 
> ## soil profiles:
> profs <- cookfarm$profiles
> levels(cookfarm$profiles$HZDUSD)
 [1] "2R"    "A"     "A1"    "A2"    "A3"    "Ab"    "AB"    "AB1"   "AB2"  
[10] "ABb"   "AE"    "Ap"    "Ap1"   "Ap2"   "B/C"   "BA"    "BA1"   "BA2"  
[19] "BC"    "BCk"   "BE"    "BE1"   "BE2"   "BEb"   "Bk"    "Bk1"   "Bk2"  
[28] "Bk3"   "Bk4"   "Bkb"   "Bkb1"  "Bkb2"  "Bt"    "Btb"   "Btb1"  "Btb2" 
[37] "Btb3"  "Btb4"  "Btk1"  "Btk2"  "Btkb"  "Bw"    "Bw1"   "Bw2"   "Bw3"  
[46] "Bwb"   "Bwb1"  "Bwb2"  "Bwg"   "Bwgb"  "Bwk"   "Bwk1"  "Bwk2"  "Bwkb" 
[55] "Bwkb1" "Bwkb2" "Bwkb3" "Cb"    "Ck"    "Ck1"   "Ck2"   "E"     "E/B"  
[64] "Eb"    "EB"    "EB1"   "EB2"  
> ## Bt horizon:
> sel.Bt <- grep("Bt", profs$HZDUSD, ignore.case=FALSE, fixed=FALSE)
> profs$Bt <- 0
> profs$Bt[sel.Bt] <- 1
> depths(profs) <- SOURCEID ~ UHDICM + LHDICM
Warning message:
converting IDs from factor to character 
> site(profs) <- ~ TAXSUSDA + Easting + Northing
> coordinates(profs) <- ~Easting + Northing
> proj4string(profs) <- CRS(cookfarm$proj4string)
> profs.geo <- as.geosamples(profs)
Reprojecting to +proj=longlat +datum=WGS84 ...
> 
> ## fit model for Bt horizon:
> m.Bt <- GSIF::fit.gstatModel(profs.geo, Bt~DEM+TWI+MUSYM+Cook_fall_ECa
+    +Cook_spr_ECa+ns(altitude, df = 4), grid10m, fit.family = binomial(logit))
Warning: Shapiro-Wilk normality test and Anderson-Darling normality test report probability of < .05 indicating lack of normal distribution for residuals
Fitting a 3D variogram...
Saving an object of class 'gstatModel'...
Warning message:
In gstat::fit.variogram(svgm, model = ivgm, ...) :
  No convergence after 200 iterations: try different initial values?
> plot(m.Bt)
Error in dev.new(width = 9, height = 5) : 
  no suitable unused file name for pdf()
Calls: plot -> plot -> dev.new
Execution halted