Various procedures for manipulating time
Returns Julian day from an array with date and time
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | date_array(6) |
Datetime [y,m,d,h,m,s] |
||
| integer, | intent(in) | :: | ref_year |
Reference year |
Julian day
Returns a date number from an array with date and time
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | date_array(6) |
Datetime [y,m,d,h,m,s] |
||
| integer, | intent(in) | :: | ref_year |
Reference year |
Date number in seconds since ref_year
The subroutine calculates the day of week given current datetime, where DAYW = 1 corresponds to Monday and DAYW = 7 to Sunday. The algorithm is based on the tables in "Hvem Hva Hvor 1971" (p. 121) and is valid for all years from 1800 to infinity
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | date_array(6) |
Datetime [y,m,d,h,m,s] |
Day of week [1-7]
Returns true if supplied date is during summer time in Europe, else false
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | date_array(6) |
Datetime [y,m,d,h,m,s] |
True if summer time, else false
Returns a date string based on (yyyy.mm.dd HH:MM:SS) from a date array
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | date_array(6) |
Datetime [y,m,d,h,m,s] |
||
| character(len=*), | intent(in) | :: | format_str |
Format string |
||
| character(len=*), | intent(out) | :: | date_str |
Date string |
Converts a date array to a date string with brackets in format string
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | date_array(6) |
Datetime [y,m,d,h,m,s] |
||
| character(len=*), | intent(in) | :: | in_format_str |
Format string |
||
| character(len=*), | intent(out) | :: | out_a_str |
Date string |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | date_array(6) |
Datetime [y,m,d,h,m,s] |
||
| character(len=*), | intent(in) | :: | in_format_str |
Format string |
||
| character(len=*), | intent(out) | :: | out_a_str |
Date string |
Converts a date array to a date string with brackets in format string
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | date_array(6) | |||
| character(len=*), | intent(in) | :: | in_format_str | |||
| character(len=*), | intent(out) | :: | out_a_str |
Converts date string to a date array based on the format string
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | date_str |
Date string [yyyymmddHHMMSS] |
||
| character(len=*), | intent(in) | :: | format_str |
Format string |
||
| integer, | intent(out) | :: | date_array(6) |
Datetime [y,m,d,h,m,s] |
Returns the azimuth and zenith angles
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real, | intent(in) | :: | lat | |||
| real, | intent(in) | :: | lon | |||
| integer, | intent(in) | :: | date_a(6) | |||
| real(kind=dp), | intent(in) | :: | date_num | |||
| real, | intent(in) | :: | difutc_h | |||
| real, | intent(out) | :: | azimuth_ang | |||
| real, | intent(out) | :: | zenith_ang |
Returns array with date and time from a date number
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | date_num |
Date number in seconds since ref_year |
||
| integer, | intent(out) | :: | date_array(6) |
Datetime [y,m,d,h,m,s] |
||
| integer, | intent(in) | :: | ref_year |
Reference year |