Date and time functions#

JULDAY#

Calculate the Julian Day Number for a given month, day, and year.

Inputs:
  • month (integer) – month number (1 = January, …, 12 = December)

  • day (integer) – day of the month

  • year (integer) – year

Outputs:
  • julday (integer) – Julian Day Number which begins at noon of the specified calendar date

Calling sequence:
From FORTRAN#
result = JULDAY(year, month, day)
CALDAT#

Return the calendar date given julian day. This is the inverse of the function JULDAY.

Inputs:
  • julday (integer) – Julian Day Number

Outputs:
  • month (integer) – month number (1 = January, …, 12 = December)

  • day (integer) – day of the month

  • year (integer) – year

Calling sequence:
From FORTRAN#
call CALDAT(julian, year, month, day)
GET_DOY#

Calculate the day of year for a given month, day, and year.

Inputs:
  • month (integer) – month number (1 = January, …, 12 = December)

  • day (integer) – day of the month

  • year (integer) – year

Outputs:
  • doy (integer) – day of year

Calling sequence:
From FORTRAN#
doy = GET_DOY(year, month, day)
DECY2DATE_AND_TIME#

Calculate the date and time (year, month, day of month, day of year and Universal Time)

Inputs:
  • dec_y (double) – decimal year, where yyyy.0d0 is January 1st at 00:00

Outputs:
  • year (integer) – year

  • month (integer) – month number (1 = January, …, 12 = December)

  • day (integer) – day of the month

  • doy (integer) – day of year (1 for January 1st)

  • hour (integer) – UT hour of day (h)

  • minute (integer) – UT minute (min)

  • second (integer) – UT second (sec)

  • UT (double) – UT time of day (sec)

Calling sequence:
From FORTRAN#
CALL DECY2DATE_AND_TIME(Dec_y,Year,Month, Day, doy, hour,minute,second,UT)
DATE_AND_TIME2DECY#

Calculate the decimal year from date and time.

Inputs:
  • year (integer) – year

  • month (integer) – month number (1 = January, …, 12 = December)

  • day (integer) – day of the month

  • hour (integer) – UT hour of day (h)

  • minute (integer) – UT minute (min)

  • second (integer) – UT second (sec)

Outputs:
  • dec_y (double) – decimal year, where yyyy.0d0 is January 1st at 00:00

Calling sequence:
From FORTRAN#
CALL DATE_AND_TIME2DECY(Year,Month,Day,hour,minute,second,Dec_y)
DOY_AND_UT2DATE_AND_TIME#

Calculate month, day, year, hour, minute, second from year, day of year and UT.

Inputs:
  • year (integer) – year

  • doy (integer) – day of year (1 for January 1st)

  • UT (double) – UT time of day (sec)

Outputs:
  • month (integer) – month number (1 = January, …, 12 = December)

  • day (integer) – day of the month

  • hour (integer) – UT hour of day (h)

  • minute (integer) – UT minute (min)

  • second (integer) – UT second (sec)

Calling sequence:
From FORTRAN#
CALL DOY_AND_UT2DATE_AND_TIME(Year,Doy,UT,Month, Day, hour,minute,second)