OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
julday.f
Go to the documentation of this file.
1  SUBROUTINE julday (YYMMDD,JDAY)
2 c*******************************************************************
3 c*
4 c* julday
5 c*
6 c* PURPOSE: Converts month and date to julian day
7 c*
8 c* INPUT PARAMETER:
9 c* yymmdd integer yy*10000 + mm*100 + dd
10 c* OUTPUT PARAMETER:
11 c* jday integer converted julian date
12 c*
13 c* SUBPROGRAMS REFERENCED
14 c* TAE:
15 c* IIS:
16 c* M75SUB:
17 c* TPIO:
18 c* LOCAL:
19 c*
20 c* I/O ():
21 c*
22 c* COMMON AREAS: none
23 c**
24 c* BY: Jean Liu GSC 3/23/1984
25 c* TO UNIX: BD Schieber, SAIC/GSC 93
26 c********************************************************************
27 c
28  IMPLICIT NONE
29  INTEGER YYMMDD, JDAY, MONTH(12), YY, MM, DD, IT
30 c
31  DATA month /0,31,59,90,120,151,181,212,243,273,304,334/
32 c
33 c********************************************************************
34 C
35 C
36  dd = mod(yymmdd, 100)
37  it = yymmdd / 100
38  mm = mod(it, 100)
39  yy = it / 100
40 C
41  jday = month(mm) + dd
42  IF (mod(yy, 4) .EQ. 0) THEN
43  IF (mm .GT. 2) jday = jday + 1
44  ENDIF
45 C
46 C
47 C EXIT
48 C
49 C
50  RETURN
51  END
subroutine julday(YYMMDD, JDAY)
Definition: julday.f:2