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

Diff of /trunk/dyn3d/grad.f

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

revision 102 by guez, Wed Mar 5 14:57:53 2014 UTC revision 103 by guez, Fri Aug 29 13:00:05 2014 UTC
# Line 11  contains Line 11  contains
11    
12      ! Calcul des composantes covariantes en x et y du gradient de g.      ! Calcul des composantes covariantes en x et y du gradient de g.
13    
14      USE dimens_m, ONLY: iim      USE dimens_m, ONLY: iim, jjm
     USE paramet_m, ONLY: iip1, ip1jm, ip1jmp1  
15    
16      INTEGER, intent(in):: klevel      INTEGER, intent(in):: klevel
17      REAL, intent(in):: g(ip1jmp1, klevel)      REAL, intent(in):: g(iim + 1, jjm + 1, klevel)
18      REAL, intent(out):: gx(ip1jmp1, klevel) , gy(ip1jm, klevel)      REAL, intent(out):: gx(iim + 1, jjm + 1, klevel) , gy(iim + 1, jjm, klevel)
19    
20      ! Local:      ! Local:
21      INTEGER l, ij      INTEGER i, j
22    
23      !----------------------------------------------------------------      !----------------------------------------------------------------
24    
25      DO l = 1, klevel      forall (i = 1:iim) gx(i, :, :) = g(i + 1, :, :) - g(i, :, :)
26         DO ij = 1, ip1jmp1 - 1      gx(iim + 1, :, :)= gx(1, :, :)
27            gx(ij, l) = g(ij +1, l) - g(ij, l)  
28         end DO      forall (j = 1:jjm) gy(:, j, :) = g(:, j, :) - g(:, j + 1, :)
   
        ! correction pour gx(ip1, j, l)  
        ! gx(iip1, j, l)= gx(1, j, l)  
        DO ij = iip1, ip1jmp1, iip1  
           gx(ij, l) = gx(ij -iim, l)  
        end DO  
   
        DO ij = 1, ip1jm  
           gy(ij, l) = g(ij, l) - g(ij +iip1, l)  
        end DO  
     end DO  
29    
30    END SUBROUTINE grad    END SUBROUTINE grad
31    

Legend:
Removed from v.102  
changed lines
  Added in v.103

  ViewVC Help
Powered by ViewVC 1.1.21