get_dap_data: A function to retrieve OPeNDAP data for the climates package.

Description Usage Arguments Value Examples

View source: R/get_dap_data.R

Description

This function takes an ncdf4 object, indices to request, variables to request, and a temperature convversion function. It returns cooresponding data.

Usage

1
2
get_dap_data(ncdf4_handle, x1, y1, x2, y2, t_ind1, t_ind2, tmax_var, tmin_var,
  prcp_var, tave_var = NULL, temp_unit_func = NULL, fill_nas = FALSE)

Arguments

ncdf4_handle

ncdf4 object.

x1

x index from request_bbox function

y1

y index from request_bbox function

x2

x index from request_bbox function

y2

y index from request_bbox function

t_ind1

t index from request_time_bounds function

t_ind2

t index from request_time_bounds function

tmax_var

a string of the tmax variable id

tmin_var

a string of the tmin variable id

prcp_var

a string of the prcp variable id

tave_var

optional: a string of the tave variable id

temp_unit_func

function returned by init_dap function

Cells

that are NA in only some time steps will be filled with the average of their neighbors.

Value

A named list of data according to inputs.

Examples

1
2
3
4
## Not run: 
Soon!

## End(Not run)

jjvanderwal/climates documentation built on May 19, 2019, 11:41 a.m.