View source: R/write_timeseries_dsg.R
write_timeseries_dsg | R Documentation |
This function creates a timeseries discrete sampling geometry NetCDF file.
It uses the orthogonal array encoding to write one data.frame
per
function call. This encoding is best suited to data with the same number of
timesteps per instance (e.g. geometry or station).
write_timeseries_dsg(
nc_file,
instance_names,
lats,
lons,
times,
data,
alts = NA,
data_unit = "",
data_prec = "double",
data_metadata = list(name = "data", long_name = "unnamed data"),
time_units = "days since 1970-01-01 00:00:00",
instance_dim_name = "instance",
dsg_timeseries_id = "instance_name",
coordvar_long_names = list(instance = "Station Names", time = "time of measurement",
lat = "latitude of the measurement", lon = "longitude of the measurement", alt =
"altitude of the measurement"),
attributes = list(),
add_to_existing = FALSE,
overwrite = FALSE
)
nc_file |
|
instance_names |
|
lats |
|
lons |
|
times |
|
data |
|
alts |
|
data_unit |
|
data_prec |
|
data_metadata |
|
time_units |
|
instance_dim_name |
the |
dsg_timeseries_id |
the |
coordvar_long_names |
|
attributes |
list An optional list of attributes that will be added at the global level. See details for useful attributes. |
add_to_existing |
|
overwrite |
boolean unless set to true, error if file exists. |
Suggested Global Variables: c(title = "title", abstract = "history", provider site = "institution", provider name ="source", description = "description")
Note regarding add_to_existing: add_to_existing = TRUE should only be used to add variables to an existing NetCDF discrete sampling geometry file. All other inputs should be the same as are already in the file. If the functions is called with add_to_existing=FALSE (the default), it will overwrite an existing file with the same name. The expected usage is to call this function repeatedly only changing the data, data_unit, data_prec and data_metadata inputs.
See the timeseries vignette for more information.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.