source: LMDZ4/branches/pre_V3/libf/dyn3dpar/grad_p.F @ 1315

Last change on this file since 1315 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: 1.2 KB
Line 
1      SUBROUTINE  grad_p(klevel, pg,pgx,pgy )
2c
3c      P. Le Van
4c
5c    ******************************************************************
6c     .. calcul des composantes covariantes en x et y du gradient de g
7c
8c    ******************************************************************
9c             pg        est un   argument  d'entree pour le s-prog
10c       pgx  et  pgy    sont des arguments de sortie pour le s-prog
11c
12      USE parallel
13      IMPLICIT NONE
14c
15#include "dimensions.h"
16#include "paramet.h"
17      INTEGER klevel
18      REAL  pg( ip1jmp1,klevel )
19      REAL pgx( ip1jmp1,klevel ) , pgy( ip1jm,klevel )
20      INTEGER  l,ij
21      INTEGER :: ijb,ije,jjb,jje
22c
23c
24      DO 6 l = 1,klevel
25c
26      ijb=ij_begin
27      ije=ij_end
28      DO 2  ij = ijb, ije - 1
29        pgx( ij,l ) = pg( ij +1,l ) - pg( ij,l )
30   2  CONTINUE
31c
32c    .... correction pour  pgx(ip1,j,l)  ....
33c    ...    pgx(iip1,j,l)= pgx(1,j,l)  ....
34CDIR$ IVDEP
35      DO 3  ij = ijb+iip1-1, ije, iip1
36        pgx( ij,l ) = pgx( ij -iim,l )
37   3  CONTINUE
38c
39      ijb=ij_begin-iip1
40      ije=ij_end
41      if (pole_nord) ijb=ij_begin
42      if (pole_sud)  ije=ij_end-iip1
43     
44      DO 4 ij = ijb,ije
45        pgy( ij,l ) = pg( ij,l ) - pg( ij +iip1,l )
46   4  CONTINUE
47c
48   6  CONTINUE
49      RETURN
50      END
Note: See TracBrowser for help on using the repository browser.