fetchHenry: Download Data from the Henry Mount Soil Climate Database...

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

This function is a front-end to the REST query functionality of the Henry Mount Soil Climate Database.

Usage

1
2
3
4
fetchHenry(usersiteid = NULL, project = NULL, sso = NULL,
type = "soiltemp", gran = "day", 
start.date = NULL, stop.date = NULL, 
pad.missing.days = TRUE, soiltemp.summaries = TRUE)

Arguments

usersiteid

(optional) filter results using a NASIS user site ID

project

(optional) filter results using a project ID

sso

(optional) filter results using a soil survey office code

type

sensor type, currently only "soiltemp" is supported

gran

data granularity: "day", "week", "month", "year"; returned data are averages

start.date

(optional) starting date filter

stop.date

(optional) ending date filter

pad.missing.days

should missing data ("day" granularity) be filled with NA? see details

soiltemp.summaries

should soil temperature ("day" granularity only) be summarized? see details

Details

Filling missing days with NA is useful for computing and index of how complete the data are, and for estimating (mostly) unbiased MAST and seasonal mean soil temperatures. Summaries are computed by first averaging over Julian day, then averaging over all days of the year (MAST) or just those days that occur within "summer" or "winter". This approach makes it possible to estimate summaries in the presence of missing data. The quality of summaries should be weighted by the number of "functional years" (number of years with non-missing data after combining data by Julian day) and "complete years" (number of years of data with >= 365 days of non-missing data).

Value

a list containing:

sites

a SpatialPointsDataFrame object containing site-level information

soiltemp

a data.frame object containing soil temperature timeseries data

Note

This function and the back-end database are very much a work in progress.

Author(s)

D.E. Beaudette

See Also

fetchSCAN

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
library(lattice)

# get CA630 data as daily averages
x <- fetchHenry(project='CA630', gran = 'day')

# inspect data gaps
levelplot(factor(!is.na(sensor_value)) ~ doy * factor(year) | id, 
data=x$soiltemp, col.regions=c('grey', 'RoyalBlue'), cuts=1, 
colorkey=FALSE, as.table=TRUE, scales=list(alternating=3), 
par.strip.text=list(cex=0.75), strip=strip.custom(bg='yellow'), 
xlab='Julian Day', ylab='Year')

## End(Not run)

soilDB documentation built on May 2, 2019, 5:17 p.m.