returnRecordsByCoordinates: Return climate records based on coordinate bounds

Description Usage Arguments Details Examples

View source: R/returnRecordsByCoordinates.R

Description

The returnRecordsByCoordinates function returns the climate records for a section of the mosaic file specified by coordinate bounds.

Usage

1
2
returnRecordsByCoordinates(areaExtent, mosaicFile, outputFormat = "long",
  startDate, endDate)

Arguments

areaExtent

Vector string of numeric values specifying lat/lon coordinates of the bounding box. The format is: c(Minimum Longitude, Maximum Longitude, Minimum Latitude, Maximum Latitude).

mosaicFile

Character string of the file path to the netCDF mosiac file to access.

outputFormat

A character string of the format of the dataframe output. Options are "wide" or "long" defaulting to "long".

startDate

A character string of the first date to return. This date must match the year of the mosaic file. The format is: "yyyy-mm-dd"

endDate

A character string of the last date to return. This date must match the year of the mosaic file. The format is: "yyyy-mm-dd"

Details

Climate records for all points within the bounding box will be retrieved and identified by their source latitude and longitude coordinates.

Examples

1
2
3
4
5
returnRecordsByCoordinates(areaExtent   = c(-71.0, -70.0, 42.0, 43.0),
                           mosaicFile   = "C:/USER/Data/Daymet/prcp_2010.nc4",
                           outputFormat = "long",
                           startDate    = "2010-01-01",
                           endDate      = "2010-01-31")

Conte-Ecology/zonalDaymet documentation built on Aug. 11, 2021, 12:52 a.m.