create_netcdf_time_axis: Create a time axis unit known to work for netCDF

Description Usage Arguments Value Examples

View source: R/time_dimensions.R

Description

Create a time axis unit known to work for netCDF

Usage

1
create_netcdf_time_axis(d, time_step = "hours since", tzoffset)

Arguments

d

an object coercible to a POSIXct

time_step

the character prefix to put before the date, in the netCDF time axis unit definition.

tzoffset

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

Value

a character, the axis units to use for the netCDF 'time' dimension

Examples

1
2
3
4
5
start_time <- ISOdate(year=2010, month=08, day=01, hour = 12, min = 0, sec = 0, tz = 'UTC')
create_netcdf_time_axis(d=start_time)
start_time <- ISOdate(year=2015, month=10, day=04, hour = 01, 
  min = 0, sec = 0, tz = 'Australia/Sydney')
create_netcdf_time_axis(d=start_time, tzoffset='+1000')

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