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

Diff of /trunk/dyn3d/grad.f

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

trunk/libf/dyn3d/grad.f revision 55 by guez, Mon Dec 12 13:25:01 2011 UTC trunk/libf/dyn3d/grad.f90 revision 60 by guez, Mon Jan 30 14:37:26 2012 UTC
# Line 1  Line 1 
1  !  module grad_m
2  ! $Header: /home/cvsroot/LMDZ4/libf/dyn3d/grad.F,v 1.1.1.1 2004/05/19 12:53:05 lmdzadmin Exp $  
3  !    IMPLICIT NONE
4        SUBROUTINE  grad(klevel, pg,pgx,pgy )  
5  c  contains
6  c      P. Le Van  
7  c    SUBROUTINE grad(klevel, pg, pgx, pgy)
8  c    ******************************************************************  
9  c     .. calcul des composantes covariantes en x et y du gradient de g      ! From LMDZ4/libf/dyn3d/grad.F, version 1.1.1.1 2004/05/19 12:53:05
10  c      ! P. Le Van
11  c    ******************************************************************  
12  c             pg        est un   argument  d'entree pour le s-prog      ! Calcul des composantes covariantes en x et y du gradient de g.
13  c       pgx  et  pgy    sont des arguments de sortie pour le s-prog  
14  c      USE dimens_m, ONLY : iim
15        use dimens_m      USE paramet_m, ONLY : iip1, ip1jm, ip1jmp1
16        use paramet_m  
17        IMPLICIT NONE      INTEGER, intent(in):: klevel
18  c      REAL, intent(in):: pg(ip1jmp1, klevel)
19        INTEGER, intent(in):: klevel      REAL, intent(out):: pgx(ip1jmp1, klevel) , pgy(ip1jm, klevel)
20        REAL  pg( ip1jmp1,klevel )  
21        REAL pgx( ip1jmp1,klevel ) , pgy( ip1jm,klevel )      ! Local:
22        INTEGER  l,ij      INTEGER l, ij
23  c  
24  c      !----------------------------------------------------------------
25        DO 6 l = 1,klevel  
26  c      DO l = 1, klevel
27        DO 2  ij = 1, ip1jmp1 - 1         DO ij = 1, ip1jmp1 - 1
28        pgx( ij,l ) = pg( ij +1,l ) - pg( ij,l )            pgx(ij, l) = pg(ij +1, l) - pg(ij, l)
29     2  CONTINUE         end DO
30  c  
31  c    .... correction pour  pgx(ip1,j,l)  ....         ! correction pour pgx(ip1, j, l)
32  c    ...    pgx(iip1,j,l)= pgx(1,j,l)  ....         ! pgx(iip1, j, l)= pgx(1, j, l)
33  CDIR$ IVDEP         DO ij = iip1, ip1jmp1, iip1
34        DO 3  ij = iip1, ip1jmp1, iip1            pgx(ij, l) = pgx(ij -iim, l)
35        pgx( ij,l ) = pgx( ij -iim,l )         end DO
36     3  CONTINUE  
37  c         DO ij = 1, ip1jm
38        DO 4 ij = 1,ip1jm            pgy(ij, l) = pg(ij, l) - pg(ij +iip1, l)
39        pgy( ij,l ) = pg( ij,l ) - pg( ij +iip1,l )         end DO
40     4  CONTINUE      end DO
41  c  
42     6  CONTINUE    END SUBROUTINE grad
43        RETURN  
44        END  end module grad_m

Legend:
Removed from v.55  
changed lines
  Added in v.60

  ViewVC Help
Powered by ViewVC 1.1.21