| hourlyNCEP | R Documentation | 
hourlyNCEP optionally downloads the required NCEP climate and radiation forcing data
required for running microclima and interpolates 4x daily data to hourly.
hourlyNCEP(ncepdata = NA, lat, long, tme, reanalysis2 = FALSE)
ncepdata | 
 an optional  data frame of climate variables as returned by   | 
lat | 
 the latitude of the location for which data are required. Ignored if   | 
long | 
 the longitude of the location for which data are required. Ignored if   | 
tme | 
 a POSIXlt object covering the duration for which data are required. Ignored if   | 
reanalysis2 | 
 Logical. Should data be obtained from the Reanalysis II dataset (default) or
from Reanalysis I (data prior to 1979). Ignored if   | 
If ncepdata is not provided, then get_NCEP() is called and data are downloaded from NCEP Atmospheric
Model Intercomparison Project (Kanamitso et al 2002). Six-hourly data are interpolated as follows.
Pressure, humidity and the u and v wind vectors are converted to hourly using spline interpolation. Wind speeed and direction and then
calculated and adjusted to give values at 1 m using windheight(). The diffuse radiation
proportion is calculated using difprop(), and hourly obtained by adusting for the direction
of the solar beam and airmass thickness using functions siflat() and airmasscoef().
Hourly temperature are derived using hourlytemp() and longwave radiation by splining emissivity
values.
a dataframe with the following variables:
POSIXlt object of times in UTC
emperatures at 2m (ºC)
specific humidity at 2m (Kg / Kg)
surface pressure (Pa)
wind speed at 2m (metres per second
wind direction (degrees from N)
emissivity of the atmosphere (0 - 1, downlong / uplong)
Net longwave radiation (MJ m-2 hr-1)
Upward longwave radiation (MJ m-2 hr-1)
Downward longwave radiation (MJ m-2 hr-1)
Direct radiation normal to the solar beam (MJ m-2 hr-1)
Diffuse radiation (MJ m-2 hr-1)
the zenith angle (degrees)
cloud cover (Percentage)
get_NCEP()
tme <- as.POSIXlt(c(0:30) * 24 * 3600, origin ="2015-01-15 00:00", tz = "UTC")
# NB takes a while to download data
hdata<- hourlyNCEP(NA, 50, -5, tme)
head(hdata)
plot(temperature ~ as.POSIXct(obs_time), data = hdata, type = "l", xlab = "Month")
plot(rad_dif ~ as.POSIXct(obs_time), data = hdata, type = "l", xlab = "Month")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.