ToNCDFSG: Convert sp objects to NetCDF

Description Usage Arguments References

Description

Creates a file with point, line or polygon instance data ready for the extended NetCDF-CF timeSeries featuretype format. Will also add attributes if a sp dataframe object is passed in.

Usage

1
2
3
ToNCDFSG(nc_file, geomData = NULL, instance_names = NULL,
  instance_dim_name = NULL, lats = NULL, lons = NULL,
  variables = list())

Arguments

nc_file

A string file path to the nc file to be created.

geomData

An object of class SpatialPoints, SpatialLines or SpatialPolygons with WGS84 lon in the x coordinate and lat in the y coordinate. Note that three dimensional geometries is not supported.

instance_names

A character vector of names for geometries. If NULL, integers are used. If the geomData has a data frame, this is not used.

instance_dim_name

If the file provided already has an instance dimension, it needs to be provided as a character string otherwise a new instance dim may be created.

lats

Vector of WGS84 latitudes

lons

Vector of WGS84 longitudes

variables

If a an existing netcdf files is provided, this list of strings is used to add the geometry container attribute to the named existing variables.

References

https://github.com/bekozi/netCDF-CF-simple-geometry


dblodgett-usgs/NCDFSG documentation built on May 15, 2019, 1:21 a.m.