1 |
heimbach |
1.1 |
C $Header: /u/gcmpack/development/heimbach/ecco_env/pkg/cal/cal_intdays.F,v 1.4 2001/02/02 16:57:22 heimbach Exp $ |
2 |
|
|
|
3 |
|
|
#include "CAL_CPPOPTIONS.h" |
4 |
|
|
|
5 |
|
|
integer function cal_IntDays( |
6 |
|
|
I mythid |
7 |
|
|
& ) |
8 |
|
|
|
9 |
|
|
c ================================================================== |
10 |
|
|
c FUNCTION cal_IntDays |
11 |
|
|
c ================================================================== |
12 |
|
|
c |
13 |
|
|
c o Return the number of calendar days that are affected by the |
14 |
|
|
c current model integration. |
15 |
|
|
c |
16 |
|
|
c |
17 |
|
|
c started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
18 |
|
|
c |
19 |
|
|
c changed: Christian Eckert eckert@mit.edu 29-Dec-1999 |
20 |
|
|
c |
21 |
|
|
c - restructured the original version in order to have a |
22 |
|
|
c better interface to the MITgcmUV. |
23 |
|
|
c |
24 |
|
|
c Christian Eckert eckert@mit.edu 03-Feb-2000 |
25 |
|
|
c |
26 |
|
|
c - Introduced new routine and function names, cal_<NAME>, |
27 |
|
|
c for verion 0.1.3. |
28 |
|
|
c |
29 |
|
|
c ================================================================== |
30 |
|
|
c FUNCTION cal_IntDays |
31 |
|
|
c ================================================================== |
32 |
|
|
|
33 |
|
|
implicit none |
34 |
|
|
|
35 |
|
|
c == global variables == |
36 |
|
|
|
37 |
|
|
#include "cal.h" |
38 |
|
|
|
39 |
|
|
c == routine arguments == |
40 |
|
|
|
41 |
|
|
integer mythid |
42 |
|
|
|
43 |
|
|
c == local variables == |
44 |
|
|
|
45 |
|
|
integer tempdate(4) |
46 |
|
|
integer timediff(4) |
47 |
|
|
|
48 |
|
|
c == end of interface == |
49 |
|
|
|
50 |
|
|
tempdate(1) = modelstartdate(1) |
51 |
|
|
tempdate(2) = 0 |
52 |
|
|
tempdate(3) = modelstartdate(3) |
53 |
|
|
tempdate(4) = modelstartdate(4) |
54 |
|
|
|
55 |
|
|
call cal_SubDates( modelenddate, tempdate, timediff, mythid ) |
56 |
|
|
|
57 |
|
|
if ( timediff(2) .ne. 0 ) then |
58 |
|
|
cal_IntDays = timediff(1) + 1 |
59 |
|
|
else |
60 |
|
|
cal_IntDays = timediff(1) |
61 |
|
|
endif |
62 |
|
|
|
63 |
|
|
return |
64 |
|
|
end |