Skip to contents

extract_thredds_nc

Usage

extract_thredds_nc(site_info, url, varid)

Arguments

site_info

list containing site_id, site_name, lat, lon, time_zone. Derived from BETY using a PEcAn .xml settings file with site information. Can use the get_site_info function to generate this list.

url

a THREDDS url of a .nc file to extract data from.

varid

character vector of shorthand variable name. i.e. LAI

Value

a dataframe with the values for each date/site combination from a THREDDS file

Author

Bailey Morrison

Examples

if (FALSE) { # \dontrun{
thredds_url = paste0( # breaking up long URL for readability
  "https://www.ncei.noaa.gov/thredds/dodsC/cdr/lai/files/1995/",
  "AVHRR-Land_v005_AVH15C1_NOAA-14_19950201_c20180831220722.nc")
output <- extract_thredds_nc(
  site_info = site_info,
  url = thredds_url,
  varid = "LAI")
} # }