source:
trunk/NEMOGCM/NEMO/OPA_SRC/lib_cray.f90
@
3254
Last change on this file since 3254 was 2528, checked in by rblod, 14 years ago | |
---|---|
|
|
File size: 949 bytes |
Rev | Line | |
---|---|---|
[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 | ! wheneq | |
[1601] | 7 | !!---------------------------------------------------------------------- |
8 | !! OPA 9.0 , LOCEAN-IPSL (2005) | |
9 | !! $Id$ | |
10 | !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt | |
11 | !!---------------------------------------------------------------------- | |
[2528] | 12 | SUBROUTINE wheneq ( i, x, j, t, ind, nn ) |
[3] | 13 | IMPLICIT NONE |
14 | ||
15 | INTEGER , INTENT ( in ) :: i, j | |
16 | INTEGER , INTENT ( out ) :: nn | |
17 | REAL , INTENT ( in ), DIMENSION (1+(i-1)*j) :: x | |
18 | REAL , INTENT ( in ) :: t | |
19 | INTEGER , INTENT ( out ), DIMENSION (1+(i-1)*j) :: ind | |
20 | INTEGER :: n, k | |
21 | nn = 0 | |
22 | DO n = 1, i | |
23 | k = 1 + (n-1) * j | |
24 | IF ( x ( k) == t ) THEN | |
25 | nn = nn + 1 | |
26 | ind (nn) = k | |
27 | ENDIF | |
28 | END DO | |
29 | ||
[2528] | 30 | END SUBROUTINE wheneq |
Note: See TracBrowser
for help on using the repository browser.