download.NOAA_GEFS.Rd
Download NOAA GEFS Weather Data
download.NOAA_GEFS(outfolder, lat.in, lon.in, sitename, start_date = Sys.time(), end_date = (as.POSIXct(start_date, tz = "UTC") + lubridate::days(16)), overwrite = FALSE, verbose = FALSE, ...)
outfolder | Directory where results should be written |
---|---|
sitename | The unique ID given to each site. This is used as part of the file name. |
start_date, | end_date Range of dates/times to be downloaded (default assumed time of day is 0:00, midnight) |
overwrite | logical. Download a fresh version even if a local file with the same name already exists? |
verbose | logical. Print additional debug information. Passed on to functions in the netcdf4 package to provide debugging info. |
... | Other arguments, currently ignored |
lat | site latitude in decimal degrees |
lon | site longitude in decimal degrees |
A list of data frames is returned containing information about the data file that can be used to locate it later. Each data frame contains information about one file.
Information on NOAA weather units can be found below. Note that the temperature is measured in degrees C, but is converted at the station and downlaoded in Kelvin.
This function downloads NOAA GEFS weather data. GEFS is an ensemble of 21 different weather forecast models. A 16 day forecast is avaliable every 6 hours. Each forecast includes information on a total of 8 variables. These are transformed from the NOAA standard to the internal PEcAn standard.
NOAA GEFS weather data is avaliable on a rolling 12 day basis; dates provided in "start_date" must be within this range. The end date can be any point after that, but if the end date is beyond 16 days, only 16 days worth of forecast are recorded. Times are rounded down to the previous 6 hour forecast. NOAA GEFS weather data isn't always posted immediately, and to compensate, this function adjusts requests made in the last two hours back two hours (approximately the amount of time it takes to post the data) to make sure the most current forecast is used.
Data is saved in the netcdf format to the specified directory. File names reflect the precision of the data to the given range of days. NOAA.GEFS.willow creek.3.2018-06-08T06:00.2018-06-24T06:00.nc specifies the forecast, using ensemble nubmer 3 at willow creek on June 6th, 2018 at 6:00 a.m. to June 24th, 2018 at 6:00 a.m.
https://www.ncdc.noaa.gov/crn/measurements.html
# NOT RUN { download.NOAA_GEFS(outfolder="~/Working/results", lat.in= 45.805925, lon.in = -90.07961, sitename="US-WCr") # }# NOT RUN { # }