Create the core structure of the EBV netCDF based on the json
from the EBV Data Portal. Data will be
added afterwards using ebv_add_data()
.
Character. Path to the json file downloaded from the EBV Data Portal. Login to the page and click on 'Uploads' and 'New Upload' to start the process.
Character. Set path where the netCDF file should be created.
Character string or vector of character strings. In case of
single character string: Path to the csv table holding the entity names.
Default: comma-separated delimiter, else change the sep
argument
accordingly. Should have only one column, each row is the name of one
entity. In case of vector of character strings: Vector holding the entity
names.
Integer. Default: 4326 (WGS84). Defines the coordinate reference system via the corresponding epsg code.
Numeric. Default: c(-180,180,-90,90). Defines the extent of the data: c(xmin, xmax, ymin, ymax).
Numerical. Vector of two numerical values defining the longitudinal and latitudinal resolution of the pixel: c(lon,lat).
Character. Vector of the timesteps in the dataset. Default: NULL - in this case the time will be calculated from the start-, endpoint and temporal resolution given in the metadata file (json). Else, the dates must be given in in ISO format 'YYYY-MM-DD' or shortened 'YYYY' in case of yearly timesteps.
Numeric. Value of the missing data in the array. Not mandatory but should be defined!
Character. Default: 'double'. Precision of the data set. Valid options: 'short' 'integer' 'float' 'double' 'char' 'byte'.
Character. Default: ','. If the delimiter of the csv specifying the entity-names differs from the default, indicate here.
Logical. Default is TRUE. If the argument is TRUE, there will be 4D cubes (lon, lat, time, entity) per metric. If this argument is changed to FALSE, there will be 3D cubes (lon, lat, time) per entity (per metric). So the latter yields a higher amount of cubes and does not bundle all information per metric. In the future the standard will be restricted to the 4D version. Recommendation: go with the 4D cubes!
Logical. Default: FALSE. Set to TRUE to overwrite the output file defined by 'outputpath'.
Logical. Default: TRUE. Turn off additional prints by setting it to FALSE.
Creates the netCDF file at the 'outputpath' location.
To check out the results take a look at your netCDF file with Panoply provided by the NASA.
#set path to JSON file
json <- system.file(file.path("extdata","metadata.json"), package="ebvcube")
#set output path of the new EBV netCDF
out <- file.path(system.file(package='ebvcube'),"extdata","sCAR_new.nc")
#set path to the csv holding the entity names
entities <- file.path(system.file(package='ebvcube'),"extdata","entities.csv")
#create new EBV netCDF
if (FALSE) {
ebv_create(jsonpath = json, outputpath = out, entities = entities,
fillvalue=-3.4E38)
}