convertDateR2Ncdf: Convert time vectors in netCDF files to Julian days since a...

Description Usage Arguments Details Value Author(s)

Description

This function automatically converts time vectors in netCDF files to a standardized Gregorian calendar

Usage

1
2
convertDateR2Ncdf(ncdf.obj, date.vec = "auto", origin = "1800-01-01", 
    write.to.ncdf = TRUE)

Arguments

ncdf.obj

character string or netCDF connection: netCDF file for which to convert the dates

date.vec

POSIXct vector: date vectors for the time dimension. If set to 'auto', this is tried to be extracted from the netCDF file

origin

character string: origin to be used for the time vector. This start of the Gregorian calendar should be kept to avoid possible mistakes due to flawed conversions.

write.to.ncdf

logical: whether to write the time vector to the netCDF file.

Details

This function sets a time vector in a netCDF file to a standardized format which is readable by most software. It transfers the time vector to days since the start of the Gregorian calendar.

Value

(invisibly): the time vector. Additionally the time vector is written to the respective file.

Author(s)

Jannis v. Buttlar


ncdf.tools documentation built on May 2, 2019, 4:19 a.m.