getProjectData: getProjectData

getProjectDataR Documentation

getProjectData

Description

Given a project name, this function constructs a data.frame containing all research flights and, optionally, test and ferry flights, for the project.

Usage

getProjectData(
  .Project,
  .Variables = standardVariables(),
  DataDir = DataDirectory(),
  Flights = NA,
  .Test = FALSE,
  .Ferry = FALSE,
  maxMemory = 1e+09
)

Arguments

.Project

The name of the project, for which data files are assumed stored in DataDirectory()/Project with names like Projectrf01.nc. If this is not the desired location, the next parameter can be used to specify the directory. There is no default, so omission of the project name generates an error.

.Variables

A list of variables to be loaded. "ALL" loads everything; the default is the set of variables specified by 'standardVariables()'. If the variable does not exist in the data.file an error will be reported and instead an all-missing-value variable with that name will be included.

DataDir

The full path to the data directory. The default is the path obtained by DataDirectory().

Flights

An optional vector of integers denoting the research flights to include. The default is to include all research flights.

.Test

If TRUE, test flights will be included, identified by flight numbers starting at 51. The default is FALSE.

.Ferry

If TRUE, ferry flights will be included, identified by flight numbers starting at 101. The default is FALSE.

maxMemory

The cutoff at which data.frame construction will be suspended to avoid very large data.frame generation. The default is 1000000000. When the data.frame exceeds this size, subsequent requested flights are skipped.

Details

Individual flights are distinguished by RF, which is the research flight number or the test flight number + 50 or the ferry flight number + 100. Only the specified variables are included unless .Variables == 'ALL', in which case all are included (but the resulting data.frame may be unmanageably large). A size limit is imposed by maxMemory, and data.frame construction stops if this size is exceeded. Variables have a "label" attribute added that provides an appropriate identifying label, with units, where possible.

Value

A new data.frame containing all the flights.

Author(s)

William Cooper


NCAR/Ranadu documentation built on Jan. 27, 2023, 1:09 a.m.