source: LMDZ6/branches/Amaury_dev/libf/misc/lmdz_ssum_scopy.f90 @ 5153

Last change on this file since 5153 was 5120, checked in by abarral, 2 months ago

enforce PRIVATE by default in several modules, expose PUBLIC as needed in filtrez/

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 706 bytes
Line 
1! Those are old legacy CRAY replacement functions, that are now used in several parts of the code.
2
3MODULE lmdz_ssum_scopy
4  IMPLICIT NONE; PRIVATE
5  PUBLIC ssum, scopy
6CONTAINS
7
8  SUBROUTINE scopy(n, sx, incx, sy, incy)
9
10    IMPLICIT NONE
11
12    INTEGER n, incx, incy, ix, iy, i
13    REAL sx((n - 1) * incx + 1), sy((n - 1) * incy + 1)
14
15    iy = 1
16    ix = 1
17    DO i = 1, n
18      sy(iy) = sx(ix)
19      ix = ix + incx
20      iy = iy + incy
21    END DO
22
23  end
24
25  function ssum(n, sx, incx)
26
27    IMPLICIT NONE
28
29    INTEGER n, incx, i, ix
30    REAL ssum, sx((n - 1) * incx + 1)
31
32    ssum = 0.
33    ix = 1
34    do i = 1, n
35      ssum = ssum + sx(ix)
36      ix = ix + incx
37    END DO
38
39  end
40
41END MODULE lmdz_ssum_scopy
Note: See TracBrowser for help on using the repository browser.