source: LMDZ4/branches/LMDZ4_par_0/libf/dyn3dpar/groupe_p.F @ 1379

Last change on this file since 1379 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.7 KB
Line 
1      subroutine groupe_p(pext,pbaru,pbarv,pbarum,pbarvm,wm)
2      USE parallel
3      implicit none
4
5c   sous-programme servant a fitlrer les champs de flux de masse aux
6c   poles en "regroupant" les mailles 2 par 2 puis 4 par 4 etc. au fur
7c   et a mesure qu'on se rapproche du pole.
8c
9c   en entree: pext, pbaru et pbarv
10c
11c   en sortie:  pbarum,pbarvm et wm.
12c
13c   remarque, le wm est recalcule a partir des pbaru pbarv et on n'a donc
14c   pas besoin de w en entree.
15
16#include "dimensions.h"
17#include "paramet.h"
18#include "comconst.h"
19#include "comgeom2.h"
20#include "comvert.h"
21
22      integer ngroup
23      parameter (ngroup=3)
24
25
26      real pbaru(iip1,jjp1,llm),pbarv(iip1,jjm,llm)
27      real pext(iip1,jjp1,llm)
28
29      real pbarum(iip1,jjp1,llm),pbarvm(iip1,jjm,llm)
30      real wm(iip1,jjp1,llm)
31
32      real zconvm(iip1,jjp1,llm),zconvmm(iip1,jjp1,llm)
33
34      real uu
35
36      integer i,j,l
37
38      logical firstcall
39      save firstcall
40
41      data firstcall/.true./
42      integer ijb,ije,jjb,jje
43     
44      if (firstcall) then
45         if(mod(iim,2**ngroup).ne.0) stop'probleme du nombre ede point'
46         firstcall=.false.
47      endif
48
49c   Champs 1D
50
51      call convflu_p(pbaru,pbarv,llm,zconvm)
52
53c
54c      call scopy(ijp1llm,zconvm,1,zconvmm,1)
55c      call scopy(ijmllm,pbarv,1,pbarvm,1)
56     
57      jjb=jj_begin
58      jje=jj_end
59      zconvmm(:,jjb:jje,:)=zconvm(:,jjb:jje,:)
60      call groupeun_p(jjp1,llm,jjb,jje,zconvmm)
61     
62      jjb=jj_begin-1
63      jje=jj_end
64      if (pole_nord) jjb=jj_begin
65      if (pole_sud)  jje=jj_end-1
66      pbarvm(:,jjb:jje,:)=pbarv(:,jjb:jje,:)
67      call groupeun_p(jjm,llm,jjb,jje,pbarvm)
68
69c   Champs 3D
70   
71      jjb=jj_begin
72      jje=jj_end
73      if (pole_nord) jjb=jj_begin+1
74      if (pole_sud)  jje=jj_end-1
75     
76      do l=1,llm
77         do j=jjb,jje
78            uu=pbaru(iim,j,l)
79            do i=1,iim
80               uu=uu+pbarvm(i,j,l)-pbarvm(i,j-1,l)-zconvmm(i,j,l)
81               pbarum(i,j,l)=uu
82c     zconvm(i,j,l ) =  xflu(i-1,j,l)-xflu(i,j,l)+
83c    *                      yflu(i,j,l)-yflu(i,j-1,l)
84            enddo
85            pbarum(iip1,j,l)=pbarum(1,j,l)
86         enddo
87      enddo
88
89c    integration de la convergence de masse de haut  en bas ......
90   
91      jjb=jj_begin
92      jje=jj_end
93     
94      do l=1,llm
95         do j=jjb,jje
96            do i=1,iip1
97               zconvmm(i,j,l)=zconvmm(i,j,l)
98            enddo
99         enddo
100      enddo
101     
102      do  l = llm-1,1,-1
103          do j=jjb,jje
104             do i=1,iip1
105                zconvmm(i,j,l)=zconvmm(i,j,l)+zconvmm(i,j,l+1)
106             enddo
107          enddo
108      enddo
109     
110      if (.not. pole_sud) then
111        zconvmm(:,jj_end+1,:)=0
112        wm(:,jj_end+1,:)=0
113      endif
114      CALL vitvert_p(zconvmm(1,1,1),wm(1,1,1))
115
116      return
117      end
118
Note: See TracBrowser for help on using the repository browser.