station_data: Station information from PBO metadata

View source: R/utilities.R

station_dataR Documentation

Station information from PBO metadata

Description

PBO operates a large number of stations, and station_data is a mechanism to search through a subset of their metadata; sta16_from_sta4 is a simple way to convert from a station's 4-character station code (e.g., B084) to its 16-character representation (e.g., pinyon084bcs2006).

Usage

station_data(name = NULL, meta = NULL, use.regexp = FALSE, verbose = TRUE)

station_data2(...)

station_data3(...)

Anza_stations(...)

sta16_from_sta4(sta4 = NULL, use.regexp = FALSE)

station_location(sta4 = NULL, ...)

.location.names(x)

Arguments

name

character; the search string; use use.regexp=TRUE to use it as a regular expression

meta

character; the metadata source; the only options are 'bsm', which accesses data('bsmmeta'), or 'bsm2' which accesses data('bsmmeta2'); the main difference is that the former has GHAM codes, and the latter has start/end times but no GHAM codes.

use.regexp

logical; should name be considered to be a regular expression (c.f. regexp)?

verbose

logical; should messages be given?

...

additional arguments

sta4

character; an optional 4-character station code (e.g., 'B084')

x

character; return a location for a given region-code

Details

This function searches internal metadata, which can be accessed via data(bsmmeta), for example.

Author(s)

A. Barbour

Examples

## Not run: 
station_data()
station_data("B084")
station_data("bcs", use.regexp=TRUE)
station_data(c("B082","B084"), use.regexp=TRUE) # will use only the first
station_data("B08[24]", use.regexp=TRUE) # gets what you want
#
# Get all of the 16-character codes
sta16_from_sta4()
# or just a few
sta16_from_sta4(c("B082","B084"))

# Special wrapper to get Anza cluster stations
# (note the extra bit of information returned: has.pp)
Anza_stations()

## End(Not run)

abarbour/pborepo documentation built on April 27, 2022, 8:47 a.m.