source: LMDZ4/branches/V3_test/libf/dyn3dpar/divgrad2_p.F @ 703

Last change on this file since 703 was 630, checked in by Laurent Fairhead, 19 years ago

Import d'une version parallele de la dynamique YM
LF

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
Line 
1      SUBROUTINE divgrad2_p ( klevel, h, deltapres, lh, divgra )
2c
3c     P. Le Van
4c
5c   ***************************************************************
6c
7c     .....   calcul de  (div( grad ))   de (  pext * h ) .....
8c   ****************************************************************
9c   h ,klevel,lh et pext  sont des arguments  d'entree pour le s-prg
10c         divgra     est  un argument  de sortie pour le s-prg
11c
12      USE parallel
13      USE times
14      IMPLICIT NONE
15c
16#include "dimensions.h"
17#include "paramet.h"
18#include "comgeom2.h"
19#include "comdissipn.h"
20
21c    .......    variables en arguments   .......
22c
23      INTEGER klevel
24      REAL h( ip1jmp1,klevel ), deltapres( ip1jmp1,klevel )
25      REAL divgra( ip1jmp1,klevel)
26c
27c    .......    variables  locales    ..........
28c
29      REAL     signe, nudivgrs, sqrtps( ip1jmp1,llm )
30      INTEGER  l,ij,iter,lh
31c    ...................................................................
32
33      EXTERNAL  filtreg
34      EXTERNAL  SCOPY,  laplacien_gam
35      INTEGER ijb,ije
36c
37      signe    = (-1.)**lh
38      nudivgrs = signe * cdivh
39
40c      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
45c
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
56c
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   
63c    ........    Iteration de l'operateur  laplacien_gam    ........
64c
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
72c
73c    ...............................................................
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
80c
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 )
85c
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
Note: See TracBrowser for help on using the repository browser.