1 |
C $Header: /u/gcmpack/development/heimbach/ecco_env/pkg/cal/cal_intyears.F,v 1.4 2001/02/02 16:57:22 heimbach Exp $ |
2 |
|
3 |
#include "CAL_CPPOPTIONS.h" |
4 |
|
5 |
integer function cal_IntYears( |
6 |
I mythid |
7 |
& ) |
8 |
|
9 |
c ================================================================== |
10 |
c FUNCTION cal_IntYears |
11 |
c ================================================================== |
12 |
c |
13 |
c o Return the number of calendar years 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_IntYears |
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 == end of interface == |
44 |
|
45 |
cal_IntYears = ( modelenddate(1) /10000 - |
46 |
& modelstartdate(1)/10000 ) + 1 |
47 |
|
48 |
if ( ( modelenddate(2) .eq. 0) .and. |
49 |
& ( mod(modelenddate(1),100) .eq. 1 ) .and. |
50 |
& mod(modelenddate(1)/100,100) .eq. 1 ) then |
51 |
cal_IntYears = cal_IntYears -1 |
52 |
endif |
53 |
|
54 |
return |
55 |
end |