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

Contents of /trunk/dyn3d/grad.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 60 - (show annotations)
Mon Jan 30 14:37:26 2012 UTC (12 years, 4 months ago) by guez
Original Path: trunk/libf/dyn3d/grad.f90
File size: 989 byte(s)
Useless copies into "gdx" and "gdy" in "gradiv2".

1 module grad_m
2
3 IMPLICIT NONE
4
5 contains
6
7 SUBROUTINE grad(klevel, pg, pgx, pgy)
8
9 ! From LMDZ4/libf/dyn3d/grad.F, version 1.1.1.1 2004/05/19 12:53:05
10 ! P. Le Van
11
12 ! Calcul des composantes covariantes en x et y du gradient de g.
13
14 USE dimens_m, ONLY : iim
15 USE paramet_m, ONLY : iip1, ip1jm, ip1jmp1
16
17 INTEGER, intent(in):: klevel
18 REAL, intent(in):: pg(ip1jmp1, klevel)
19 REAL, intent(out):: pgx(ip1jmp1, klevel) , pgy(ip1jm, klevel)
20
21 ! Local:
22 INTEGER l, ij
23
24 !----------------------------------------------------------------
25
26 DO l = 1, klevel
27 DO ij = 1, ip1jmp1 - 1
28 pgx(ij, l) = pg(ij +1, l) - pg(ij, l)
29 end DO
30
31 ! correction pour pgx(ip1, j, l)
32 ! pgx(iip1, j, l)= pgx(1, j, l)
33 DO ij = iip1, ip1jmp1, iip1
34 pgx(ij, l) = pgx(ij -iim, l)
35 end DO
36
37 DO ij = 1, ip1jm
38 pgy(ij, l) = pg(ij, l) - pg(ij +iip1, l)
39 end DO
40 end DO
41
42 END SUBROUTINE grad
43
44 end module grad_m

  ViewVC Help
Powered by ViewVC 1.1.21