dbW_getIDs: Locate keys for weather database tables in the registered...

View source: R/sw_dbW_WeatherDatabase.R

dbW_getIDsR Documentation

Locate keys for weather database tables in the registered weather database

Description

Obtain database table keys 'Site_id' and 'Scenario_id' using alternative information and optionally add missing sites and scenarios. A site will be identified alternatively by

  • its identification number site_id,

  • its name site_label, or

  • its geographic location long and lat.

A scenario will be identified alternatively by

  • its identification number scenario_id, or

  • its name scenario.

Usage

dbW_getIDs(
  site_id = NULL,
  site_label = NULL,
  long = NULL,
  lat = NULL,
  tol_xy = 1e-04,
  scenario = NULL,
  scenario_id = NULL,
  add_if_missing = FALSE,
  ignore.case = FALSE,
  verbose = FALSE
)

Arguments

site_id

An integer value. The IDs/database key of the queried site.

site_label

A character string. The name/label of the queried site.

long

A numeric vector or NULL. The longitude in decimal degrees of WGS84. Eastern longitudes are positive, sites on the western hemisphere have negative values.

lat

A numeric vector or NULL. The latitude in decimal degrees of WGS84. Northern latitude are positive, sites on the southern hemisphere have negative values.

tol_xy

A numeric value. The tolerance used to match requested longitude and latitude values.

scenario

A character string. The name/label of a climate scenario.

scenario_id

An integer value The ID/database key of the queried scenario.

add_if_missing

A logical value. Should site entries in the data base be created if they are queried and do not exist in the data base?

ignore.case

A logical value.

verbose

A logical value.

Value

A list with two elements site_id and scenario_id.


Burke-Lauenroth-Lab/Rsoilwat documentation built on Dec. 9, 2023, 12:41 a.m.