Learn R Programming

cmsaf (version 2.0.1)

get_time: Convert time steps to POSIXct.

Description

Times in NetCDF data are generally given in form of a time step and a time unit. This functions uses both information to convert them to POSIXct time values. For the unit 'months since' an approximation of 30.4375 d is used!

Usage

get_time(time.unit, time.step)

Arguments

time.unit

Time unit, which is conform to the CF convention (character).

time.step

Time steps in form of a numeric or integer vector.

Value

Time in form of POSIXct is returned. Default time zone is UTC.

Examples

Run this code
# NOT RUN {
get_time("hours since 1987-01-01", 249109)
get_time("days since 1987-01-01", 9109)
# }

Run the code above in your browser using DataLab