1 | ! |
---|
2 | ! $Header$ |
---|
3 | ! |
---|
4 | SUBROUTINE grad(klevel, pg,pgx,pgy ) |
---|
5 | ! |
---|
6 | ! P. Le Van |
---|
7 | ! |
---|
8 | ! ****************************************************************** |
---|
9 | ! .. calcul des composantes covariantes en x et y du gradient de g |
---|
10 | ! |
---|
11 | ! ****************************************************************** |
---|
12 | ! pg est un argument d'entree pour le s-prog |
---|
13 | ! pgx et pgy sont des arguments de sortie pour le s-prog |
---|
14 | ! |
---|
15 | USE dimensions_mod, ONLY: iim, jjm, llm, ndm |
---|
16 | USE paramet_mod_h, ONLY: iip1, iip2, iip3, jjp1, llmp1, llmp2, llmm1, kftd, ip1jm, ip1jmp1, & |
---|
17 | ip1jmi1, ijp1llm, ijmllm, mvar, jcfil, jcfllm |
---|
18 | IMPLICIT NONE |
---|
19 | ! |
---|
20 | |
---|
21 | |
---|
22 | INTEGER :: klevel |
---|
23 | REAL :: pg( ip1jmp1,klevel ) |
---|
24 | REAL :: pgx( ip1jmp1,klevel ) , pgy( ip1jm,klevel ) |
---|
25 | INTEGER :: l,ij |
---|
26 | ! |
---|
27 | ! |
---|
28 | DO l = 1,klevel |
---|
29 | ! |
---|
30 | DO ij = 1, ip1jmp1 - 1 |
---|
31 | pgx( ij,l ) = pg( ij +1,l ) - pg( ij,l ) |
---|
32 | END DO |
---|
33 | ! |
---|
34 | ! .... correction pour pgx(ip1,j,l) .... |
---|
35 | ! ... pgx(iip1,j,l)= pgx(1,j,l) .... |
---|
36 | !DIR$ IVDEP |
---|
37 | DO ij = iip1, ip1jmp1, iip1 |
---|
38 | pgx( ij,l ) = pgx( ij -iim,l ) |
---|
39 | END DO |
---|
40 | ! |
---|
41 | DO ij = 1,ip1jm |
---|
42 | pgy( ij,l ) = pg( ij,l ) - pg( ij +iip1,l ) |
---|
43 | END DO |
---|
44 | ! |
---|
45 | END DO |
---|
46 | RETURN |
---|
47 | END SUBROUTINE grad |
---|