Constructor for the class Meteo
with values of
daily or intradaily values of global horizontal irradiation and ambient temperature
from a local file or a data.frame.
readBD(file, lat,
format = '%d/%m/%Y',
header = TRUE, fill = TRUE, dec = '.', sep = ';',
dates.col = 'date',source = file)readBDi(file, lat,
format = '%d/%m/%Y %H:%M:%S',
header = TRUE, fill = TRUE, dec = '.', sep = ';',
time.col = 'time',
source = file)
df2Meteo(file, lat,
format = '%d/%m/%Y',
dates.col = 'date',
source = '')
dfI2Meteo(file, lat,
format = '%d/%m/%Y %H:%M:%S',
time.col = 'time',
source = '')
zoo2Meteo(file, lat, source = '')
The name of the file (readBD
and readBDi
), data.frame
(df2Meteo
and dfI2Meteo
) or zoo
(zoo2Meteo
) which the data are to be read from.
It should contain a column G0
with
daily (readBD
and df2Meteo
) or
intradaily (readBDi
and dfI2Meteo
) values of
global horizontal irradiation (Wh/m<U+00B2>). It should also include a column
named Ta
with values of ambient temperature. However, if the
object is only a vector with irradiation values, it will converted to a zoo
with two
columns named G0
and Ta
(filled with constant values)
If the Meteo
object is to be used with calcG0
(or fCompD
, fCompI
) and the option
corr = 'none'
, the file/data.frame must include three
columns named G0
, B0
and D0
with values of
global, direct and diffuse irradiation on the horizontal plane.
Only for daily data: if the ambient temperature is not available,
the file should include two columns named TempMax
and
TempMin
with daily values of maximum and minimum ambient
temperature, respectively (see fTemp
for details).
See read.table
character string with the format of the dates or time
index.
(Default for daily time bases:%d/%m/%Y
).
(Default for intradaily time bases: %d/%m/%Y %H:%M:%S
)
numeric, latitude (degrees) of the location.
character string with the name of the column wich contains the dates of the time series.
character string with the name of the column wich contains the time index of the series.
character string with information about the source of the values. (Default: the name of the file).
A Meteo
object.
# NOT RUN {
data(helios)
names(helios) = c('date', 'G0', 'TempMax', 'TempMin')
bd = df2Meteo(helios, dates.col = 'date', lat = 41, source = 'helios-IES', format = '%Y/%m/%d')
summary(getData(bd))
xyplot(bd)
# }
Run the code above in your browser using DataLab