New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
lib_cray.f90 in trunk/NEMO/OPA_SRC – NEMO

source: trunk/NEMO/OPA_SRC/lib_cray.f90 @ 941

Last change on this file since 941 was 719, checked in by ctlod, 17 years ago

get back to the nemo_v2_3 version for trunk

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.8 KB
RevLine 
[3]1!  Cray subroutines or functions used by OPA model and possibly
2!  not found on other platforms.
3!
4!  check their existence
5
6!  sdot
7!  wheneq
8!  saxpy
9!  isrchne
[247]10   !!----------------------------------------------------------------------
11   !!  OPA 9.0 , LOCEAN-IPSL (2005)
[719]12   !! $Header$
[247]13   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
14   !!----------------------------------------------------------------------
[3]15!---------------------------------------------------------
[88]16     FUNCTION sdot( I, X, J, Y, K )
[3]17        DIMENSION X(1), Y(1)
18        SDOT = 0.
19        DO N = 1, I
20        SDOT = SDOT + X(1+(N-1)*J) * Y(1+(N-1)*K)
21        END DO
[88]22     END FUNCTION sdot
[3]23!---------------------------------------------------------
[88]24     SUBROUTINE wheneq ( i, x, j, t, ind, nn )
[3]25        IMPLICIT NONE
26
27        INTEGER , INTENT (  in ) :: i, j
28        INTEGER , INTENT ( out ) :: nn
29        REAL    , INTENT (  in ), DIMENSION (1+(i-1)*j) :: x
30        REAL    , INTENT (  in ) :: t
31        INTEGER , INTENT ( out ), DIMENSION (1+(i-1)*j) :: ind
32        INTEGER :: n, k
33        nn = 0
34        DO n = 1, i
35          k = 1 + (n-1) * j
36          IF ( x ( k) == t ) THEN
37              nn = nn + 1
38              ind (nn) = k
39          ENDIF
40        END DO
41
[88]42     END SUBROUTINE wheneq
[3]43!---------------------------------------------------------
[88]44     SUBROUTINE saxpy( I, A, X, J, Y, K )
[3]45        DIMENSION X(1),Y(1)
[88]46        DO N = 1, I
47           Y(1+(N-1)*K)=A*X(1+(N-1)*J)+Y(1+(N-1)*K)
48        END DO
49     END SUBROUTINE saxpy
[3]50!---------------------------------------------------------
[88]51     FUNCTION isrchne( K, X, I, B )
[3]52        DIMENSION X(1)
[88]53        DO N = 1, K
54           IF( X(1+(N-1)*I) /= B ) THEN
55              ISRCHNE = N
56              RETURN
57           ELSE
58              ISRCHNE = N + 1
59           ENDIF
60        END DO
61     END FUNCTION isrchne
Note: See TracBrowser for help on using the repository browser.