1 subroutine da_julian_day(NY,NM,ND,JD,METHOD)
3 !-----------------------------------------------------------------------
5 ! method = 1: input ---- ny, nm, nd. output ---- jd
6 ! method = 2: input ---- ny, jd. output ---- nm, nd
7 !-----------------------------------------------------------------------
11 integer, intent(in) :: METHOD, NY
12 integer, intent(inout) :: NM, ND, JD
15 integer, dimension(12) :: MDAY = (/31,28,31,30,31,30,31,31,30,31,30,31/)
17 if (trace_use_dull) call da_trace_entry("da_julian_day")
19 if (mod(ny,4) == 0) then
21 if (mod(ny,100) == 0) then
23 if (mod(ny,400) == 0) then
34 else if (method == 2) then
38 if (nd <= mday(loop)) exit
45 if (trace_use_dull) call da_trace_exit("da_julian_day")
47 end subroutine da_julian_day