write_vars_to_cdf.Rd
The names of the list elements will be used to name the variable associated with each matrix. Consistent with the raster package, it is assumed that matrices are stored as (lat, lon), with lon increasing and lat decreasing.
write_vars_to_cdf(vars, filename, extent = NULL, ids = NULL, xmin = NULL, xmax = NULL, ymin = NULL, ymax = NULL, extra_dims = NULL, write_slice = NULL, attrs = list(), prec = NULL, append = FALSE, put_data = TRUE, quick_append = FALSE)
vars | List of matrices containing values to write, or a 3D with dimension names on the third dimension. |
---|---|
filename | Name of output file |
extent | vector of (xmin, xmax, ymin, ymax) |
ids | vector of integer or character IDs |
xmin | lowest longitude value (left side of cell) |
xmax | highest longitude value (right side of cell) |
ymin | lowest latitude value (bottom of cell) |
ymax | highest latitude value (top of cell) |
extra_dims | Optional list of extra dimensions (excluding
'id' or spatial dimensions). Specified as a list
with dimension names as keys and a vector of
acceptable values as values, e.g.
|
write_slice | Optional list used to write a two-dimensional array (lat, lon) across constant values of other dimensions. List keys are used to indicate dimension names and values are used to indicate the constant value for that dimension. |
attrs | List of attributes to associate with the file, or with each variable. Each attribute is described by a list, with the following properties:
|
prec | The numerical precision with which
|
append | Determines if we should add variables to an existing file, if present. |
put_data | Flag indicating whether to write data contained in
|
quick_append | Flag indicating whether to validate that data
written in an append operation conforms to the
original dimensions of the file. If |