source:
branches/dev_1784_PATM/NEMO/OPA_SRC/lib_cray.f90
@
2155
Last change on this file since 2155 was 1601, checked in by ctlod, 15 years ago | |
---|---|
|
|
File size: 959 bytes |
Line | |
---|---|
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 |
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 | !!---------------------------------------------------------------------- |
12 | SUBROUTINE wheneq ( i, x, j, t, ind, nn ) |
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 | |
30 | END SUBROUTINE wheneq |
Note: See TracBrowser
for help on using the repository browser.