Learn R Programming

MetFns (version 3.2.2)

sollong_date: Calculation of date corresponding to given value of solar longitude

Description

Calculates calendar date and time corresponding to specified value of solar longitude (J2000.0) and specified year.

Usage

sollong_date(solval,year,date1=NULL,date2=NULL)

Arguments

solval

numeric vector of length one specifying solar longitude.

year

numeric vector of length one specifying year.

date1

character vector of length one specifying start date, given in "%Y-%m-%d %H:%M:%S" format (UTC timezone).

date2

character vector of length one specifying end date, given in "%Y-%m-%d %H:%M:%S" format (UTC timezone).

Value

sollong_date returns object of POSIXct class, calendar date in "%Y-%m-%d %H:%M:%S" format (UTC timezone).

Details

The function sollong_date calculates date corresponding to the given value of solar longitude, for specified year between 1984 and 2030. It searches for a solution in a interval bounded by date1 and date2. If user does not specify date1 and date2, they are, by default, equal to the 1st od January and the 31st of December, respectively.

See Also

date_sollong

Examples

Run this code
# NOT RUN {
## calculate date corresponding to 1 degree of solar longitude 
## search between dates 1 and 31 March 2017
sollong_date(1,year=2017,"2017-03-01","2017-03-31")
# }

Run the code above in your browser using DataLab