populate_netCDF: Add data to an existing netCDF file

View source: R/functions_netCDF.R

populate_netCDFR Documentation

Add data to an existing netCDF file

Description

Add data to an existing netCDF file

Usage

populate_netCDF(
  filename,
  data,
  var_names,
  data_str = c("xyzt", "xyt", "xyz", "xy", "szt", "st", "sz", "s"),
  nc_name_crs = "crs",
  nc_name_crs_wkt = "crs_wkt",
  xy_names = c("lon", "lat"),
  time_ids = -1,
  vertical_ids = -1,
  ...
)

Arguments

filename

A character string. The name of the netCDF file.

data

A numeric array or vector (optional). A vector is converted to a one-column matrix.

var_names

A character vector of strings. The netCDF variable names.

data_str

A character string describing the dimensions of data where "xy" stands for x and y spatial dimensions if the spatial structure is gridded, while "s" stands for site if the spatial structure are discrete points; z stands for a vertical dimension; and t stands for a temporal dimension.

nc_name_crs

A character string. The name of the crs variable in the netCDF. Function create_netCDF hard codes "crs".

nc_name_crs_wkt

A character string. The name of the attribute that holds the WKT2 string of the crs variable in the netCDF. Function create_netCDF hard codes "crs_wkt".

xy_names

A vector with two character strings. The names of the x and y spatial dimensions of a netCDF file.

time_ids

An integer vector. The index to read a subset of time steps; a value of -1 means to read all.

vertical_ids

An integer vector. The index to read a subset of vertical steps; a value of -1 means to read all.

...

Additional arguments passed on to the specific functions.

Notes

This function is not yet implemented.


DrylandEcology/rSW2st documentation built on Jan. 10, 2024, 6:22 p.m.