1 | SUBROUTINE divgrad2_p ( klevel, h, deltapres, lh, divgra ) |
---|
2 | c |
---|
3 | c P. Le Van |
---|
4 | c |
---|
5 | c *************************************************************** |
---|
6 | c |
---|
7 | c ..... calcul de (div( grad )) de ( pext * h ) ..... |
---|
8 | c **************************************************************** |
---|
9 | c h ,klevel,lh et pext sont des arguments d'entree pour le s-prg |
---|
10 | c divgra est un argument de sortie pour le s-prg |
---|
11 | c |
---|
12 | USE parallel |
---|
13 | USE times |
---|
14 | IMPLICIT NONE |
---|
15 | c |
---|
16 | #include "dimensions.h" |
---|
17 | #include "paramet.h" |
---|
18 | #include "comgeom2.h" |
---|
19 | #include "comdissipn.h" |
---|
20 | |
---|
21 | c ....... variables en arguments ....... |
---|
22 | c |
---|
23 | INTEGER klevel |
---|
24 | REAL h( ip1jmp1,klevel ), deltapres( ip1jmp1,klevel ) |
---|
25 | REAL divgra( ip1jmp1,klevel) |
---|
26 | c |
---|
27 | c ....... variables locales .......... |
---|
28 | c |
---|
29 | REAL signe, nudivgrs, sqrtps( ip1jmp1,llm ) |
---|
30 | INTEGER l,ij,iter,lh |
---|
31 | c ................................................................... |
---|
32 | |
---|
33 | EXTERNAL filtreg |
---|
34 | EXTERNAL SCOPY, laplacien_gam |
---|
35 | INTEGER ijb,ije |
---|
36 | c |
---|
37 | signe = (-1.)**lh |
---|
38 | nudivgrs = signe * cdivh |
---|
39 | |
---|
40 | c CALL SCOPY ( ip1jmp1 * klevel, h, 1, divgra, 1 ) |
---|
41 | ijb=ij_begin |
---|
42 | ije=ij_end |
---|
43 | divgra(ijb:ije,1:klevel)=h(ijb:ije,1:klevel) |
---|
44 | |
---|
45 | c |
---|
46 | call suspend_timer(timer_dissip) |
---|
47 | call exchange_Hallo(divgra,ip1jmp1,llm,1,1) |
---|
48 | call resume_timer(timer_dissip) |
---|
49 | CALL laplacien_p( klevel, divgra, divgra ) |
---|
50 | |
---|
51 | DO l = 1, klevel |
---|
52 | DO ij = ijb, ije |
---|
53 | sqrtps( ij,l ) = SQRT( deltapres(ij,l) ) |
---|
54 | ENDDO |
---|
55 | ENDDO |
---|
56 | c |
---|
57 | DO l = 1, klevel |
---|
58 | DO ij = ijb, ije |
---|
59 | divgra(ij,l) = divgra(ij,l) * sqrtps(ij,l) |
---|
60 | ENDDO |
---|
61 | ENDDO |
---|
62 | |
---|
63 | c ........ Iteration de l'operateur laplacien_gam ........ |
---|
64 | c |
---|
65 | DO iter = 1, lh - 2 |
---|
66 | call suspend_timer(timer_dissip) |
---|
67 | call exchange_Hallo(divgra,ip1jmp1,llm,1,1) |
---|
68 | call resume_timer(timer_dissip) |
---|
69 | CALL laplacien_gam_p ( klevel,cuvscvgam2,cvuscugam2,unsair_gam2, |
---|
70 | * unsapolnga2, unsapolsga2, divgra, divgra ) |
---|
71 | ENDDO |
---|
72 | c |
---|
73 | c ............................................................... |
---|
74 | |
---|
75 | DO l = 1, klevel |
---|
76 | DO ij = ijb, ije |
---|
77 | divgra(ij,l) = divgra(ij,l) * sqrtps(ij,l) |
---|
78 | ENDDO |
---|
79 | ENDDO |
---|
80 | c |
---|
81 | call suspend_timer(timer_dissip) |
---|
82 | call exchange_Hallo(divgra,ip1jmp1,llm,1,1) |
---|
83 | call resume_timer(timer_dissip) |
---|
84 | CALL laplacien_p ( klevel, divgra, divgra ) |
---|
85 | c |
---|
86 | DO l = 1,klevel |
---|
87 | DO ij = ijb,ije |
---|
88 | divgra(ij,l) = nudivgrs * divgra(ij,l) / deltapres(ij,l) |
---|
89 | ENDDO |
---|
90 | ENDDO |
---|
91 | |
---|
92 | RETURN |
---|
93 | END |
---|