source: CPL/oasis3/trunk/src/mod/oasis3/src/isumi.f @ 1677

Last change on this file since 1677 was 1677, checked in by aclsce, 12 years ago

Imported oasis3 (tag ipslcm5a) from cvs server to svn server (igcmg project).

File size: 1.6 KB
Line 
1      FUNCTION isumi (ka, kna)
2C****
3C               ******************************
4C               * OASIS FUNCTION  -  LEVEL T *
5C               * --------------     ------- *
6C               ******************************
7C
8C**** *isumi*  - Arithmetic function
9C
10C     Purpose:
11C     -------
12C     Sum of the elements of an integer array
13C
14C**   Interface:
15C     ---------
16C       *ii =*  *isumi (ka, kna)*
17C
18C     Input:
19C     -----
20C                ka     : array to be summed (integer 1D)
21C                kna    : array dimension (integer)
22C
23C     Output:
24C     ------
25C     None
26C
27C     Workspace:
28C     ---------
29C     None
30C
31C     Externals:
32C     ---------
33C     None
34C
35C     Reference:
36C     ---------
37C     See OASIS manual (1995)
38C
39C     History:
40C     -------
41C       Version   Programmer     Date      Description
42C       -------   ----------     ----      ----------- 
43C       2.0       L. Terray      95/09/01  created
44C
45C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
46C
47C* ---------------------------- Include files ---------------------------
48C
49      USE mod_kinds_oasis
50      USE mod_unit
51C
52C* ---------------------------- Argument declarations -------------------
53C
54      INTEGER (kind=ip_intwp_p) isumi, ka(kna)
55C
56C* ---------------------------- Poema verses ----------------------------
57C
58C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
59C
60C*    1. Perform the sum
61C        ---------------
62C
63      itemp = 0
64      DO 110 ji = 1, kna
65        itemp = itemp + ka(ji)
66 110  CONTINUE
67      isumi = itemp
68C
69C* End of function
70C
71      RETURN
72      END
73
Note: See TracBrowser for help on using the repository browser.