1 | FUNCTION jcoor (kind, kimax) |
---|
2 | C**** |
---|
3 | C ****************************** |
---|
4 | C * OASIS FUNCTION - LEVEL T * |
---|
5 | C * -------------- ------- * |
---|
6 | C ****************************** |
---|
7 | C |
---|
8 | C**** *jcoor* - Search function |
---|
9 | C |
---|
10 | C Purpose: |
---|
11 | C ------- |
---|
12 | C Given an index value, kind, for a 2D array which has kimax rows, |
---|
13 | C this function returns the column number |
---|
14 | C |
---|
15 | C** Interface: |
---|
16 | C --------- |
---|
17 | C *ii =* *jcoor (kind, kimax)* |
---|
18 | C |
---|
19 | C Input: |
---|
20 | C ----- |
---|
21 | C kind : index (integer) |
---|
22 | C kimax : number of rows (integer) |
---|
23 | C |
---|
24 | C Output: |
---|
25 | C ------ |
---|
26 | C None |
---|
27 | C |
---|
28 | C Workspace: |
---|
29 | C --------- |
---|
30 | C None |
---|
31 | C |
---|
32 | C Externals: |
---|
33 | C --------- |
---|
34 | C None |
---|
35 | C |
---|
36 | C Reference: |
---|
37 | C --------- |
---|
38 | C See OASIS manual (1995) |
---|
39 | C |
---|
40 | C History: |
---|
41 | C ------- |
---|
42 | C Version Programmer Date Description |
---|
43 | C ------- ---------- ---- ----------- |
---|
44 | C 1.1 R. Sutton 95/11/25 Created |
---|
45 | C 2.0 L. Terray 95/12/26 Modified: to suit OASIS 2.0 |
---|
46 | C |
---|
47 | C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
48 | C |
---|
49 | C* ---------------------------- Include files --------------------------- |
---|
50 | C |
---|
51 | USE mod_kinds_oasis |
---|
52 | USE mod_unit |
---|
53 | C |
---|
54 | C* ---------------------------- Argument declarations ------------------- |
---|
55 | C |
---|
56 | INTEGER (kind=ip_intwp_p) jcoor |
---|
57 | C |
---|
58 | C* ---------------------------- Poema verses ---------------------------- |
---|
59 | C |
---|
60 | C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
61 | C |
---|
62 | C* 1. Find the column number |
---|
63 | C ---------------------- |
---|
64 | C |
---|
65 | jcoor = 1 + (kind-1) / kimax |
---|
66 | C |
---|
67 | C* End of function |
---|
68 | C |
---|
69 | RETURN |
---|
70 | END |
---|