extract_time_series: Return a data frame comprising the time series data for the...

View source: R/netcdf_time_series.R

extract_time_seriesR Documentation

Return a data frame comprising the time series data for the given NetCDF climate grid near the specified coordinates.

Description

Return a data frame comprising the time series data for the given NetCDF climate grid near the specified coordinates.

Usage

extract_time_series(nc_file, latitude, longitude, var = NULL)

Arguments

nc_file

The file path for the NetCDF file.

latitude

The latitude for the desired time series dataset (in decimal-degrees Northing).

longitude

The longitude for the desired time series dataset (in decimal-degrees Easting).

var

(Optional) The variable to extract the time series for (default=NULL, in which case the first variable is extracted).

Value

A data frame containing the dates, nearest grid latitude and longitude, and the variable values.

Examples

## Not run: 
time_series <- extract_time_series("test.nc", -34.9257, 138.583)

## End(Not run)

biometryhub/BiometryTools documentation built on July 14, 2024, 4:42 p.m.