1 |
C $Header: /u/gcmpack/MITgcm/pkg/cal/cal_weekday.F,v 1.1.20.1 2003/10/02 18:30:07 adcroft Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "CAL_OPTIONS.h" |
5 |
|
6 |
subroutine cal_WeekDay( |
7 |
I indate, |
8 |
O daystring, |
9 |
I mythid |
10 |
& ) |
11 |
|
12 |
c ================================================================== |
13 |
c SUBROUTINE cal_WeekDay |
14 |
c ================================================================== |
15 |
c |
16 |
c o Given a calendar date return the weekday as a string. |
17 |
c |
18 |
c started: Christian Eckert eckert@mit.edu 19-Jan-1999 |
19 |
c |
20 |
c changed: Christian Eckert eckert@mit.edu 03-Feb-2000 |
21 |
c |
22 |
c - Introduced new routine and function names, cal_<NAME>, |
23 |
c for verion 0.1.3. |
24 |
c |
25 |
c ================================================================== |
26 |
c SUBROUTINE cal_WeekDay |
27 |
c ================================================================== |
28 |
|
29 |
implicit none |
30 |
|
31 |
c == global variables == |
32 |
|
33 |
#include "cal.h" |
34 |
|
35 |
c == routine arguments == |
36 |
|
37 |
integer indate(4) |
38 |
character*(3) daystring |
39 |
integer mythid |
40 |
|
41 |
c == local variables == |
42 |
|
43 |
integer nweekday |
44 |
integer numberofdays(4) |
45 |
|
46 |
c == end of interface == |
47 |
|
48 |
c Determine the day of the week. |
49 |
call cal_TimePassed( refdate, indate, numberofdays, mythid ) |
50 |
nweekday = mod(numberofdays(1),7)+1 |
51 |
|
52 |
daystring = dayofweek(nweekday) |
53 |
|
54 |
return |
55 |
end |
56 |
|