- filename
Mandatory character string giving the file name to read,
including its path and extension.
- subset
Optional list allowing to subset data read from the file along
one or several of its dimensions. See details for more information.
- band_names
Optional vector of character strings providing the band
names or NULL. Normally determined automatically from the meta file in
case of output files using file_type = "meta".
- dim_order
Order of dimensions in returned LPJmLData object. Must be
a character vector containing all of the following in any order:
c("cell", "time", "band"). Users may select the order most useful to
their further data processing.
- file_type
Optional character string giving the file type. This is
normally detected automatically but can be prescribed if automatic
detection is incorrect. Valid options:
"raw", a binary file without header.
"clm", a binary file with header.
"meta", a meta information JSON file complementing a raw or clm file.
- version
Integer indicating the clm file header version, currently
supports one of c(1, 2, 3, 4).
- order
Integer value or character string describing the order of data
items in the file (default in input file: 1; in output file: 4). Valid
values for LPJmL input/output files are "cellyear"/ 1, "yearcell" /
2, "cellindex"/ 3, and "cellseq" / 4, although only options 1
and 4 are supported by this function.
- firstyear
Integer providing the first year of data in the file.
- nyear
Integer providing the number of years of data included in the
file. These are not consecutive in case of timestep > 1.
- firstcell
Integer providing the cell index of the first data item.
0 by default.
- ncell
Integer providing the number of data items per band.
- nbands
Integer providing the number of bands per time step of data.
- cellsize_lon
Numeric value providing the longitude cell size in
degrees.
- scalar
Numeric value providing a conversion factor that needs to be
applied to raw data when reading it from file to derive final values.
- cellsize_lat
Numeric value providing the latitude cell size in
degrees.
- datatype
Integer value or character string describing the LPJmL data
type stored in the file. Supported options: "byte" / 0, "short" /
1, "int" / 2, "float" / 3, or "double" / 4.
- nstep
Integer value defining the number of within-year time steps of
the file. Valid values are 1 (yearly), 12 (monthly), 365 (daily).
Defaults to 1 if not read from file ("clm" or "meta" file) or provided by
the user.
- timestep
Integer value providing the interval in years between years
represented in the file data. Normally 1, but LPJmL also allows averaging
annual outputs over several years. Defaults to 1 if not read from file
("clm" or "meta" file) or provided by user.
- endian
Endianness to use for file (either "big" or "little"). By
default uses endianness determined from file header or set in meta
information or the platform-specific endianness .Platform$endian if not
set.
- variable
Optional character string providing the name of the variable
contained in the file. Included in some JSON meta files. Important: If
file_type == "raw", prescribe variable = "grid" to ensure that data
are recognized as a grid.
- descr
Optional character string providing a more detailed description
of the variable contained in the file. Included in some JSON meta files.
- unit
Optional character string providing the unit of the data in the
file. Included in some JSON meta files.
- name
Optional character string specifying the header name. This is
usually read from clm headers for file_type = "clm" but can be specified
for the other file_type options.
- silent
If set to TRUE, suppresses most warnings or messages. Use
only after testing that read_io() works as expected with the files it is
being used on. Default: FALSE.