4 |
|
|
5 |
contains |
contains |
6 |
|
|
7 |
SUBROUTINE grad(klevel, pg, pgx, pgy) |
SUBROUTINE grad(klevel, g, gx, gy) |
8 |
|
|
9 |
! From LMDZ4/libf/dyn3d/grad.F, version 1.1.1.1 2004/05/19 12:53:05 |
! From LMDZ4/libf/dyn3d/grad.F, version 1.1.1.1 2004/05/19 12:53:05 |
10 |
! P. Le Van |
! P. Le Van |
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 |
15 |
USE paramet_m, ONLY : iip1, ip1jm, ip1jmp1 |
USE paramet_m, ONLY: iip1, ip1jm, ip1jmp1 |
16 |
|
|
17 |
INTEGER, intent(in):: klevel |
INTEGER, intent(in):: klevel |
18 |
REAL, intent(in):: pg(ip1jmp1, klevel) |
REAL, intent(in):: g(ip1jmp1, klevel) |
19 |
REAL, intent(out):: pgx(ip1jmp1, klevel) , pgy(ip1jm, klevel) |
REAL, intent(out):: gx(ip1jmp1, klevel) , gy(ip1jm, klevel) |
20 |
|
|
21 |
! Local: |
! Local: |
22 |
INTEGER l, ij |
INTEGER l, ij |
25 |
|
|
26 |
DO l = 1, klevel |
DO l = 1, klevel |
27 |
DO ij = 1, ip1jmp1 - 1 |
DO ij = 1, ip1jmp1 - 1 |
28 |
pgx(ij, l) = pg(ij +1, l) - pg(ij, l) |
gx(ij, l) = g(ij +1, l) - g(ij, l) |
29 |
end DO |
end DO |
30 |
|
|
31 |
! correction pour pgx(ip1, j, l) |
! correction pour gx(ip1, j, l) |
32 |
! pgx(iip1, j, l)= pgx(1, j, l) |
! gx(iip1, j, l)= gx(1, j, l) |
33 |
DO ij = iip1, ip1jmp1, iip1 |
DO ij = iip1, ip1jmp1, iip1 |
34 |
pgx(ij, l) = pgx(ij -iim, l) |
gx(ij, l) = gx(ij -iim, l) |
35 |
end DO |
end DO |
36 |
|
|
37 |
DO ij = 1, ip1jm |
DO ij = 1, ip1jm |
38 |
pgy(ij, l) = pg(ij, l) - pg(ij +iip1, l) |
gy(ij, l) = g(ij, l) - g(ij +iip1, l) |
39 |
end DO |
end DO |
40 |
end DO |
end DO |
41 |
|
|