/[lmdze]/trunk/dyn3d/divergf.f
ViewVC logotype

Diff of /trunk/dyn3d/divergf.f

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 57 by guez, Mon Jan 30 12:54:02 2012 UTC revision 64 by guez, Wed Aug 29 14:47:17 2012 UTC
# Line 6  contains Line 6  contains
6    
7    SUBROUTINE divergf(klevel, x, y, div)    SUBROUTINE divergf(klevel, x, y, div)
8    
9      ! From libf/dyn3d/divergf.F, v 1.1.1.1 2004/05/19 12:53:05      ! From libf/dyn3d/divergf.F, version 1.1.1.1 2004/05/19 12:53:05
10    
11      ! P. Le Van      ! P. Le Van
12      ! Calcule la divergence à tous les niveaux d'un vecteur de      ! Calcule la divergence à tous les niveaux d'un vecteur de
# Line 17  contains Line 17  contains
17      USE comgeom, ONLY: apoln, apols, cuvsurcv, cvusurcu, unsaire      USE comgeom, ONLY: apoln, apols, cuvsurcv, cvusurcu, unsaire
18      USE filtreg_m, ONLY: filtreg      USE filtreg_m, ONLY: filtreg
19    
     ! div est un argument de sortie pour le s-prog  
   
     ! variables en arguments  
   
20      INTEGER, intent(in):: klevel      INTEGER, intent(in):: klevel
21      REAL, intent(in):: x(ip1jmp1, klevel), y(ip1jm, klevel)      REAL, intent(in):: x(ip1jmp1, klevel), y(ip1jm, klevel)
22      real div(ip1jmp1, klevel)      real, intent(out):: div(ip1jmp1, klevel) ! in (unit of x, y) m-2
23    
24      ! variables locales      ! Variables locales :
25    
26      INTEGER l, ij      INTEGER l, ij
27      REAL aiy1(iip1) , aiy2(iip1)      REAL aiy1(iim) , aiy2(iim)
28      REAL sumypn, sumyps      REAL sumypn, sumyps
29    
     REAL SSUM  
   
30      !------------------------------------------------------------      !------------------------------------------------------------
31    
32      DO l = 1, klevel      DO l = 1, klevel
# Line 52  contains Line 46  contains
46            aiy1(ij) = cuvsurcv(ij) * y(ij , l)            aiy1(ij) = cuvsurcv(ij) * y(ij , l)
47            aiy2(ij) = cuvsurcv(ij+ ip1jmi1) * y(ij+ ip1jmi1, l)            aiy2(ij) = cuvsurcv(ij+ ip1jmi1) * y(ij+ ip1jmi1, l)
48         ENDDO         ENDDO
49         sumypn = SSUM (iim, aiy1, 1) / apoln         sumypn = SUM(aiy1) / apoln
50         sumyps = SSUM (iim, aiy2, 1) / apols         sumyps = SUM(aiy2) / apols
51    
52         DO ij = 1, iip1         DO ij = 1, iip1
53            div(ij , l) = - sumypn            div(ij , l) = - sumypn
# Line 61  contains Line 55  contains
55         ENDDO         ENDDO
56      end DO      end DO
57    
58      CALL filtreg(div, jjp1, klevel, 2, 2, .TRUE., 1)      CALL filtreg(div, jjp1, klevel, 2, 2, .TRUE.)
59    
60      DO l = 1, klevel      DO l = 1, klevel
61         DO ij = iip2, ip1jm         DO ij = iip2, ip1jm

Legend:
Removed from v.57  
changed lines
  Added in v.64

  ViewVC Help
Powered by ViewVC 1.1.21