read_header | R Documentation |
Reads a header from an LPJmL clm file. CLM is the default format used for LPJmL input files and can also be used for output files.
read_header(filename, force_version = NULL, verbose = TRUE)
filename |
Filename to read header from. |
force_version |
Manually set clm version. The default value |
verbose |
If |
The function returns a list with 3 components:
name: Header name, e.g. "LPJGRID"; describes the type of data in the file.
header: Vector of header values ('version', 'order', 'firstyear', 'nyear', 'firstcell', 'ncell', 'nbands', 'cellsize_lon', 'scalar', 'cellsize_lat', 'datatype', 'nstep', 'timestep') describing the file structure. If header version is <4, the header is partially filled with default values.
endian: Endianness of file ("little"
or "big"
).
create_header()
for a more detailed description of the LPJmL header
format.
write_header()
for writing headers to files.
## Not run:
header <- read_header("filename.clm")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.