sidfex.reltime2ydoy: Convert Days Since a Reference Time to Year and DayOfYear

View source: R/sidfex.reltime2ydoy.R

sidfex.reltime2ydoyR Documentation

Convert Days Since a Reference Time to Year and DayOfYear

Description

Convert days since a reference time to Year and DayOfYear based on the Gregorian calendar

Usage

sidfex.reltime2ydoy(reltime, RefYear = 2017, RefDayOfYear = 1.0)

Arguments

reltime

a numeric vector specifying the time in days relative to the reference time provided by RefYear and RefDayOfYear. Can also be character which will be coerced with as.numeric.

RefYear

an integer scalar specifying the reference year. Can also be character which will be coerced with as.integer.

RefDayOfYear

a numeric scalar specifying the reference day of year. Can also be character which will be coerced with as.numeric.

Value

a numeric vector of the same length as DayOfYear.

Year

an integer vector providing the year.

DayOfYear

a numeric vector providing the day of the year.

Note

The convention for the day of the year is that January 1st begins with DayOfYear=1.0, that is, DayOfYear=1.5 corresponds to January 1st 12:00.

Author(s)

Helge Goessling

Examples

reltime = seq(-100,400,pi*10)
ydoy = sidfex.reltime2ydoy(reltime=reltime,RefYear=2016,RefDayOfYear=1)
print(ydoy)

helgegoessling/SIDFEx documentation built on March 15, 2024, 2:26 p.m.