create_time_info: Helper function to create the definition of the time...

Description Usage Arguments Value See Also Examples

View source: R/time_dimensions.R

Description

Helper function to create the definition of the time dimension for use in a netCDF file. Defaults to create an hourly axis.

Usage

1
2
create_time_info(from, n, time_step = "hours since", time_step_delta = 1L,
  tzoffset)

Arguments

from

the start date of the time axis

n

length of the time dimension

time_step

unit prefix in the time dimension units

time_step_delta

integer, length of time units between each steps

tzoffset

an optional character, the time offset from UTC, e.g. '+1000' for 10 hours ahead of UTC. Can be missing, in which case 'from' must be explicitly a UTC time. Note that the tzoffset completely supersedes the time zone if present.

Value

A list with keys units and values

See Also

See create_efts for examples

Examples

1
2
3
4
5
6
7
8
9
timeAxisStart <- ISOdate(2015, 10, 4, 0, 0, 0, tz = "Australia/Canberra")
(time_dim_info <- create_time_info(from = timeAxisStart, n = 24L, 
  time_step = "hours since", time_step_delta = 3L, tzoffset = "+1000"))

# Note that the time zone information of thes sart date is NOT 
# used by create_time_info; the tzoffset argument takes precedence 
timeAxisStart <- ISOdate(2015, 10, 4, 0, 0, 0, tz = "Australia/Perth")
(time_dim_info <- create_time_info(from = timeAxisStart, n = 24L, 
  time_step = "hours since", time_step_delta = 3L, tzoffset = "+1000"))

efts documentation built on May 2, 2019, 3:39 p.m.