Function to coerce (convert) an LPJmLMetaData object into an LPJmL header object. More information at create_header().

as_header(x, silent = FALSE)

Arguments

x

An LPJmLMetaData object

silent

Logical. Whether to suppress notifications from header conversion/initialization.

Value

An LPJmL header object. More information at create_header().

Examples

if (FALSE) {

vegc_meta <- read_meta(filename = "./vegc.bin.json")

# Returns a list object with the structure of an LPJmL header
as_header(vegc_meta)
# $name
# [1] "LPJDUMMY"
#
# $header
#      version        order    firstyear        nyear    firstcell
#          4.0          4.0       1901.0        200.0          0.0
#        ncell       nbands cellsize_lon       scalar cellsize_lat
#      67420.0          1.0          0.5          1.0          0.5
#     datatype        nstep     timestep
#          3.0          1.0          1.0
#
# $endian
# [1] "little"

}