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 tags/nemo_v3_2/nemo_v3_2/NEMO/OPA_SRC – NEMO

source: tags/nemo_v3_2/nemo_v3_2/NEMO/OPA_SRC/lib_cray.f90 @ 1878

Last change on this file since 1878 was 1878, checked in by flavoni, 14 years ago

initial test for nemogcm

File size: 1006 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: lib_cray.f90 1601 2009-08-11 10:09:19Z ctlod $
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.