1 |
C $Header: /u/gcmpack/development/heimbach/ecco_env/pkg/cal/cal_printdate.F,v 1.4 2001/02/02 16:57:22 heimbach Exp $ |
2 |
|
3 |
#include "CAL_CPPOPTIONS.h" |
4 |
|
5 |
subroutine cal_PrintDate( |
6 |
I caldate, |
7 |
I mythid |
8 |
& ) |
9 |
|
10 |
c ================================================================== |
11 |
c SUBROUTINE cal_PrintDate |
12 |
c ================================================================== |
13 |
c |
14 |
c o Print a calendar date. |
15 |
c |
16 |
c Purpose: Print a date as used by the calendar tool in some nice |
17 |
c format by using the MITgcmuv's print routine |
18 |
c |
19 |
c started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
20 |
c |
21 |
c changed: Christian Eckert eckert@mit.edu 19-Jan-2000 |
22 |
c |
23 |
c - inserted print statements |
24 |
c |
25 |
c Christian Eckert eckert@mit.edu 03-Feb-2000 |
26 |
c |
27 |
c - Introduced new routine and function names, cal_<NAME>, |
28 |
c for verion 0.1.3. |
29 |
c |
30 |
c ================================================================== |
31 |
c SUBROUTINE cal_PrintDate |
32 |
c ================================================================== |
33 |
|
34 |
implicit none |
35 |
|
36 |
c == global variables == |
37 |
|
38 |
#include "EEPARAMS.h" |
39 |
|
40 |
c == routine arguments == |
41 |
|
42 |
c caldate - date in the format used by the calendar tool. |
43 |
c mythid - thread number for this instance of the routine. |
44 |
|
45 |
integer caldate(4) |
46 |
integer mythid |
47 |
|
48 |
c == local variables == |
49 |
|
50 |
integer ierr |
51 |
ce character*(max_len_mbuf) msgbuf |
52 |
|
53 |
c == end of interface == |
54 |
|
55 |
if ( caldate(4) .gt. 0 ) then |
56 |
c Print the calendar date. |
57 |
print*,caldate |
58 |
ce write(*,'(i10,i8,i3,i4)') caldate(1), caldate(2), |
59 |
ce & caldate(3), caldate(4) |
60 |
|
61 |
else if ( caldate(4) .eq. -1 ) then |
62 |
c Print the time interval. |
63 |
print*,caldate |
64 |
ce write(*,'(i10,i8,i3,i4)') caldate(1), caldate(2), |
65 |
ce & caldate(3), caldate(4) |
66 |
|
67 |
else |
68 |
|
69 |
ierr = 2001 |
70 |
call cal_PrintError( ierr, mythid ) |
71 |
stop ' stopped in cal_PrintDate.' |
72 |
|
73 |
endif |
74 |
|
75 |
return |
76 |
end |