1 | SUBROUTINE blasold (pfild ,kmsize, kfield, pmcoeff, kaux, kaddr, |
---|
2 | $ kasize, pacoeff, ksiztot, paux) |
---|
3 | C**** |
---|
4 | C ***************************** |
---|
5 | C * OASIS ROUTINE - LEVEL 3 * |
---|
6 | C * ------------- ------- * |
---|
7 | C ***************************** |
---|
8 | C |
---|
9 | C**** *blasold* - Stupid blas routine |
---|
10 | C |
---|
11 | C Purpose: |
---|
12 | C ------- |
---|
13 | C Do linear combination of fields with given coefficients |
---|
14 | C before interpolation |
---|
15 | C |
---|
16 | C** Interface: |
---|
17 | C --------- |
---|
18 | C *CALL* *blasold (pfild ,kmsize, kfield, pmcoeff, kaux, kaddr, |
---|
19 | C kasize, pacoeff, ksiztot, paux)* |
---|
20 | C |
---|
21 | C Input: |
---|
22 | C ----- |
---|
23 | C pfild : field array to be modified (real 1D) |
---|
24 | C kmsize : size of the field array (integer) |
---|
25 | C kfield : field identificator number (integer) |
---|
26 | C pmcoeff : field multiplicative coefficient (real) |
---|
27 | C kaux : number of combined auxilary fields (integer) |
---|
28 | C kaddr : pointer for auxilary fields (integer 1D) |
---|
29 | C kasize : size of auxilary fields (integer 1D) |
---|
30 | C pacoeff : auxilary field multiplicative coefficient (real 1D) |
---|
31 | C ksiztot : total size of work memory used (integer) |
---|
32 | C paux : global work array (real 1D) |
---|
33 | C |
---|
34 | C Output: |
---|
35 | C ------ |
---|
36 | C pfild : new field array (real 1D) |
---|
37 | C |
---|
38 | C Workspace: |
---|
39 | C --------- |
---|
40 | C None |
---|
41 | C |
---|
42 | C Externals: |
---|
43 | C --------- |
---|
44 | C None |
---|
45 | C |
---|
46 | C Reference: |
---|
47 | C --------- |
---|
48 | C See OASIS manual (1995) |
---|
49 | C |
---|
50 | C History: |
---|
51 | C ------- |
---|
52 | C Version Programmer Date Description |
---|
53 | C ------- ---------- ---- ----------- |
---|
54 | C 2.0 L. Terray 95/10/01 created |
---|
55 | C 2.3 S. Valcke 99/04/30 added: printing levels |
---|
56 | C |
---|
57 | C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
58 | C |
---|
59 | C* ---------------------------- Include files --------------------------- |
---|
60 | C |
---|
61 | USE mod_kinds_oasis |
---|
62 | USE mod_unit |
---|
63 | USE mod_printing |
---|
64 | C |
---|
65 | C* ---------------------------- Argument declarations ------------------- |
---|
66 | C |
---|
67 | REAL (kind=ip_realwp_p) pfild(kmsize) |
---|
68 | REAL (kind=ip_realwp_p) paux(ksiztot), pacoeff(kaux) |
---|
69 | INTEGER (kind=ip_intwp_p) kaddr(kaux), kasize(kaux) |
---|
70 | C |
---|
71 | C* ---------------------------- Local declarations ---------------------- |
---|
72 | C |
---|
73 | INTEGER (kind=ip_intwp_p) istop |
---|
74 | LOGICAL llchk |
---|
75 | C |
---|
76 | C* ---------------------------- Poema verses ---------------------------- |
---|
77 | C |
---|
78 | C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
79 | C |
---|
80 | C* 1. Initialization |
---|
81 | C -------------- |
---|
82 | C |
---|
83 | IF (nlogprt .GE. 2) THEN |
---|
84 | WRITE (UNIT = nulou,FMT = *) ' ' |
---|
85 | WRITE (UNIT = nulou,FMT = *) ' ' |
---|
86 | WRITE (UNIT = nulou,FMT = *) |
---|
87 | $ ' ROUTINE blasold - Level 3' |
---|
88 | WRITE (UNIT = nulou,FMT = *) |
---|
89 | $ ' *************** *******' |
---|
90 | WRITE (UNIT = nulou,FMT = *) ' ' |
---|
91 | WRITE (UNIT = nulou,FMT = *) |
---|
92 | $ ' Do linear combination of fields' |
---|
93 | WRITE (UNIT = nulou,FMT = *) ' ' |
---|
94 | WRITE (UNIT = nulou,FMT = *) ' ' |
---|
95 | ENDIF |
---|
96 | istop = 0 |
---|
97 | C |
---|
98 | C* Check all fields have same dimensions as current field |
---|
99 | C |
---|
100 | DO 110 jc = 1, kaux |
---|
101 | llchk = (kasize(jc) - kmsize) .EQ. 0 |
---|
102 | IF (.NOT. llchk) THEN |
---|
103 | CALL prtout ('WARNING!!! |
---|
104 | $ Pb in combining field number =', kfield, 2) |
---|
105 | CALL prtout ('Different size for auxilary field number =', |
---|
106 | $ jc, 2) |
---|
107 | istop = istop + 1 |
---|
108 | ENDIF |
---|
109 | 110 CONTINUE |
---|
110 | IF (istop .GT. 0) CALL HALTE('STOP in blasold') |
---|
111 | C |
---|
112 | C |
---|
113 | C* 2. Linear combination |
---|
114 | C ------------------ |
---|
115 | C |
---|
116 | C* Multiply current field by main coefficient |
---|
117 | C |
---|
118 | DO 210 ja = 1, kmsize |
---|
119 | pfild(ja) = pmcoeff * pfild(ja) |
---|
120 | 210 CONTINUE |
---|
121 | C |
---|
122 | C* Combine with other fields if required |
---|
123 | C |
---|
124 | IF (kaux .GE. 1) THEN |
---|
125 | DO 220 jc = 1, kaux |
---|
126 | DO 230 ja = 1, kmsize |
---|
127 | pfild(ja) = pfild(ja) + pacoeff(jc) * |
---|
128 | $ paux(kaddr(jc)+ja-1) |
---|
129 | 230 CONTINUE |
---|
130 | 220 CONTINUE |
---|
131 | ENDIF |
---|
132 | C |
---|
133 | C |
---|
134 | C* 3. End of routine |
---|
135 | C -------------- |
---|
136 | C |
---|
137 | IF (nlogprt .GE. 2) THEN |
---|
138 | WRITE (UNIT = nulou,FMT = *) ' ' |
---|
139 | WRITE (UNIT = nulou,FMT = *) |
---|
140 | $ '--------- End of routine blasold ---------' |
---|
141 | CALL FLUSH (nulou) |
---|
142 | ENDIF |
---|
143 | RETURN |
---|
144 | END |
---|