1 | SUBROUTINE qlsst (pqta, prho, kto, kwg, knga, pqtb, |
---|
2 | $ kngb, kmska, kvma) |
---|
3 | C**** |
---|
4 | C ***************************** |
---|
5 | C * OASIS ROUTINE - LEVEL 3 * |
---|
6 | C * ------------- ------- * |
---|
7 | C ***************************** |
---|
8 | C |
---|
9 | C**** *qlsst* - Interpolate a field with a ponderation technique |
---|
10 | C |
---|
11 | C Purpose: |
---|
12 | C ------- |
---|
13 | C Given the weights prho and indices kto of field pqtb on a source grid, |
---|
14 | C performs a ponderation to generate pqta on target grid. |
---|
15 | C |
---|
16 | C N.B: Nothing is done for the masked points |
---|
17 | C |
---|
18 | C** Interface: |
---|
19 | C --------- |
---|
20 | C *CALL* *qlsst*(pqta, prho, kto, kwg, knga, pqtb, kngb, |
---|
21 | C kmska, pmask, kvma)* |
---|
22 | C |
---|
23 | C Input: |
---|
24 | C ----- |
---|
25 | C prho: array, the weights |
---|
26 | C kto: array, the indices in source grid |
---|
27 | C kwg: the number of neighbors |
---|
28 | C knga: the target grid size |
---|
29 | C pqtb: array, the field on source grid |
---|
30 | C kngb: the source grid size |
---|
31 | C kmska: mask of the target grid |
---|
32 | C kvma: value of the mask on target grid |
---|
33 | C |
---|
34 | C Output: |
---|
35 | C ------ |
---|
36 | C pqta: array, the field to calculate |
---|
37 | C |
---|
38 | C Workspace: |
---|
39 | C --------- |
---|
40 | C None |
---|
41 | C |
---|
42 | C External: |
---|
43 | C -------- |
---|
44 | C None |
---|
45 | C |
---|
46 | C References: |
---|
47 | C ---------- |
---|
48 | C O. Thual, Simple ocean-atmosphere interpolation. |
---|
49 | C Part A: The method, EPICOA 0629 (1992) |
---|
50 | C Part B: Software implementation, EPICOA 0630 (1992) |
---|
51 | C See also OASIS manual (1995) |
---|
52 | C |
---|
53 | C History: |
---|
54 | C ------- |
---|
55 | C Version Programmer Date Description |
---|
56 | C ------- ---------- ---- ----------- |
---|
57 | C 1.0 O. Thual 93/04/15 created |
---|
58 | C 1.1 E. Guilyardi 93/11/23 modified |
---|
59 | C 2.0 L. Terray 95/10/01 modified: new structure |
---|
60 | C |
---|
61 | C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
62 | C |
---|
63 | C* ---------------------------- Include files --------------------------- |
---|
64 | C |
---|
65 | USE mod_kinds_oasis |
---|
66 | USE mod_unit |
---|
67 | C |
---|
68 | C* ---------------------------- Argument declarations ------------------- |
---|
69 | C |
---|
70 | REAL (kind=ip_realwp_p) pqtb(kngb), pqta(knga), prho(kwg,knga) |
---|
71 | INTEGER (kind=ip_intwp_p) kmska(knga), kto(kwg,knga) |
---|
72 | C |
---|
73 | C* ---------------------------- Poema verses ---------------------------- |
---|
74 | C |
---|
75 | C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
76 | C |
---|
77 | C* 1. Ponderation |
---|
78 | C ----------- |
---|
79 | C |
---|
80 | DO 110 j1 = 1, knga |
---|
81 | C |
---|
82 | C* Nothing happens if it is a continental point |
---|
83 | C |
---|
84 | IF (kmska(j1) .NE. kvma) THEN |
---|
85 | zsum = 0. |
---|
86 | DO 120 j2 = 1, kwg |
---|
87 | zsum = zsum + prho(j2,j1) * pqtb(kto(j2,j1)) |
---|
88 | 120 CONTINUE |
---|
89 | pqta(j1) = zsum |
---|
90 | ENDIF |
---|
91 | 110 CONTINUE |
---|
92 | C |
---|
93 | C* End of routine |
---|
94 | C |
---|
95 | RETURN |
---|
96 | END |
---|