Read one or more cumulated daily spectral irradiance file as output by Anders
Lindors' model based on libRadTrans. The file naming conventions needed
are fairly strict, and file name should contain the date in a format
suitable for decoding by the function suplied as date.f
.
read_fmi_cum(file, date = NULL, geocode = NULL, label = NULL, tz = NULL,
locale = readr::default_locale(), .skip = 3, .n_max = -1,
.date.f = lubridate::ymd)read_m_fmi_cum(files, date = NULL, geocode = NULL, label = NULL,
tz = NULL, .skip = 3, .n_max = -1, .date.f = lubridate::ymd)
Either a path to a file, a connection, or literal data (either a single string or a raw vector).
a POSIXct
object, but if NULL
the date stored in
file is used, and if NA
no date variable is added
A data frame with columns lon
and lat
.
character string, but if NULL
the value of file
is
used, and if NA
the "what.measured" attribute is not set.
character Time zone used for interpreting times saved in the file header.
The locale controls defaults that vary from place to place. The
default locale is US-centric (like R), but you can use
locale
to create your own locale that controls things
like the default time zone, encoding, decimal mark, big mark, and day/month
names.
Number of lines to skip before reading data.
Maximum number of records to read.
A function for extracting a date-time from the file name
passed as charecter sring to its first argument and which returns a
POSIXct
object.
list or vector of paths each one with the same requirements as
described for argument file
.
read_fmi_cum()
returns a source_spct
object with
time.unit
attribute set to "day"
and when.measured
attribute set to the date-time extracted from the file name.
read_m_fmi_cum
returns a collection of source_mspct
.