| LPJmLMetaData | R Documentation |
A meta data container for LPJmL input and output meta data.
Container - because an LPJmLMetaData object is an environment in which
the meta data are stored after read_meta() (or read_io()).
Each attribute can be accessed via $<attribute>. To get an overview over
available attributes, print the object or export it as a list
as_list().
The enclosing environment is locked and cannot be altered.
sim_nameSimulation name (works as identifier in LPJmL Runner).
sourceLPJmL version (character string).
historyCharacter string of the call used to run LPJmL. This normally includes the path to the LPJmL executable and the path to the configuration file for the simulation.
variableName of the input/output variable, e.g. "npp" or
"runoff".
descrDescription of the input/output variable.
unitUnit of the input/output variable.
nbandsNumber (numeric) of bands (categoric dimension). Please
note that nbands follows the convention in LPJmL, which uses the
plural form for bands as opposed to nyear or ncell.
band_namesName of the bands (categoric dimension). Not included
if nbands = 1.
nyearNumber (numeric) of data years in the parent LPJmLData
object.
firstyearFirst calendar year (numeric) in the parent LPJmLData
object.
lastyearLast calendar year (numeric) in the parent LPJmLData
object.
nstepNumber (numeric) of intra-annual time steps. 1 for annual,
12 for monthly, and 365 for daily data.
timestepNumber (numeric) of years between time steps.
timestep = 5 means that output is written every 5 years.
ncellNumber (numeric) of cells in the parent LPJmLData object.
firstcellFirst cell (numeric) in the parent LPJmLData object.
cellsize_lonLongitude cellsize in degrees (numeric).
cellsize_latLatitude cellsize in degrees (numeric).
datatypeFile data type (character string), e.g. "float". Note
that data are converted into R-internal data type by read_io().
scalarConversion factor (numeric) applied when reading raw data
from file. The parent LPJmLData object contains the values after
the application of the conversion factor.
orderOrder of the data items in the file, either "cellyear",
"yearcell", "cellindex", or "cellseq". The structure of the data
array in the parent LPJmLData object may differ from the original
order in the file depending on the dim_order parameter used in
read_io().
offsetOffset (numeric) at the start of the binary file before the actual data start.
bigendian(Logical) Endianness refers to the order in which bytes are stored in a multi-byte value, with big-endian storing the most significant byte at the lowest address and little-endian storing the least significant byte at the lowest address.
formatBinary format (character string) of the file containing the
actual data. Either "raw", "clm" (raw with header), or "cdf" for
NetCDF format.
filenameName of the file containing the actual data.
subsetLogical. Whether parent LPJmLData object is subsetted.
mapCharacter vector describing how to map the bands in an input
file to the bands used inside LPJmL. May be used by read_io() to
construct a band_names attribute.
versionVersion of data file.
._data_dir_Internal character string containing the directory from which the file was loaded.
._subset_space_Internal logical. Whether space dimensions are
subsetted in the parent LPJmLData object.
._fields_set_Internal character vector of names of attributes set by the meta file.
._time_format_Internal character string describing the time
dimension format, either "time" or "year_month_day".
._space_format_Internal character string describing the space
dimension format, either "cell" or "lon_lat".
._dimension_map_Internal dictionary/list of space and time dimension formats with categories and namings.
as_list()Method to coerce (convert) an LPJmLMetaData object into a
list.
See also as_list().
LPJmLMetaData$as_list()
as_header()Method to coerce (convert) an LPJmLMetaData object into an LPJmL
binary file header. More information about file headers at
create_header()).
LPJmLMetaData$as_header(...)
...See as_header().
print()Method to print an LPJmLMetaData object.
See also print.
LPJmLMetaData$print(all = TRUE, spaces = "")
allLogical. Should all attributes be printed or only the most
relevant (all = FALSE)?
spacesInternal parameter Spaces to be printed at the start.
.__init_grid__()!Internal method only to be used for package development!
LPJmLMetaData$.__init_grid__()
.__update_subset__()!Internal method only to be used for package development!
LPJmLMetaData$.__update_subset__( subset, cell_dimnames = NULL, time_dimnames = NULL, year_dimnames = NULL )
subsetList of subset arguments, see also subset.LPJmLData().
cell_dimnamesOptional list of new cell_dimnames of subset data to update meta data. Required if spatial dimensions are subsetted.
time_dimnamesOptional list of new time_dimnames of subset data to update meta data. Required if time dimension is subsetted.
year_dimnamesOptional list of new year_dimnames of subset data to update meta data. Required if year dimension is subsetted.
.__transform_time_format__()!Internal method only to be used for package development!
LPJmLMetaData$.__transform_time_format__(time_format)
time_formatCharacter. Choose between "year_month_day" and
"time".
.__transform_space_format__()!Internal method only to be used for package development!
LPJmLMetaData$.__transform_space_format__(space_format)
space_formatCharacter. Choose between "lon_lat" and "cell".
.__set_attribute__()!Internal method only to be used for package development!
LPJmLMetaData$.__set_attribute__(key, value)
keyName of the attribute, e.g. "variable"
valueValue of the attribute, e.g. "grid"
new()Create a new LPJmLMetaData object.
LPJmLMetaData$new(x, additional_attributes = list(), data_dir = NULL)
xA list (not nested) with meta data.
additional_attributesA list of additional attributes to be set
that are not included in file header or JSON meta file. These are
c"(band_names", "variable", "descr", "unit")
data_dirDirectory containing the file this LPJmLMetaData object refers to. Used to "lazy load" grid.
clone()The objects of this class are cloneable with this method.
LPJmLMetaData$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.