GetNetCDFAtCoords: Extract timeseries for nearest coordinates from a netcdf file

Description Usage Arguments Examples

View source: R/GetNetCDFAtCoords.R

Description

Extract timeseries for nearest coordinates from a netcdf file

Usage

1
2
3
4
5
6
7
8
GetNetCDFAtCoords(
  filename,
  req.coords,
  req.var,
  time.var = "time",
  lon.var = "longitude",
  lat.var = "latitude"
)

Arguments

filename

Name of the netcdf file

req.coords

matrix or dataframe of longitude and latitude coordinates

req.var

name of the variable to extract

time.var

name of the time variable

lon.var, lat.var

names of the longitude and latitude variables in the netcdf file

Examples

1
2
3
4
5
6
7
8
## Not run: req.coors = data.frame(
  lon = c(-64.5417, -64.9888, -64.7),
  lat = c(30.0867, 30.6486, 32.47))
GetNetCDFAtCoords("path/to/file.nc",
                  req.coords = req.coords,
                  req.var = "nobs")

## End(Not run)

EarthSystemDiagnostics/ecustools documentation built on Jan. 15, 2022, 5:22 p.m.