source: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/grad_p.f90 @ 5159

Last change on this file since 5159 was 5159, checked in by abarral, 7 weeks ago

Put dimensions.h and paramet.h into modules

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
File size: 1.2 KB
Line 
1SUBROUTINE  grad_p(klevel, pg,pgx,pgy )
2
3  !  P. Le Van
4
5  !    ******************************************************************
6  ! .. calcul des composantes covariantes en x et y du gradient de g
7
8  !    ******************************************************************
9  !         pg        est un   argument  d'entree pour le s-prog
10  !   pgx  et  pgy    sont des arguments de sortie pour le s-prog
11
12  USE parallel_lmdz
13USE lmdz_dimensions, ONLY: iim, jjm, llm, ndm
14  USE lmdz_paramet
15  IMPLICIT NONE
16  !
17
18
19  INTEGER :: klevel
20  REAL :: pg( ip1jmp1,klevel )
21  REAL :: pgx( ip1jmp1,klevel ) , pgy( ip1jm,klevel )
22  INTEGER :: l,ij
23  INTEGER :: ijb,ije,jjb,jje
24
25
26!$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
27  DO l = 1,klevel
28
29  ijb=ij_begin
30  ije=ij_end
31  DO ij = ijb, ije - 1
32    pgx( ij,l ) = pg( ij +1,l ) - pg( ij,l )
33  END DO
34
35  !    .... correction pour  pgx(ip1,j,l)  ....
36  !    ...    pgx(iip1,j,l)= pgx(1,j,l)  ....
37  !DIR$ IVDEP
38  DO ij = ijb+iip1-1, ije, iip1
39    pgx( ij,l ) = pgx( ij -iim,l )
40  END DO
41
42  ijb=ij_begin-iip1
43  ije=ij_end
44  IF (pole_nord) ijb=ij_begin
45  IF (pole_sud)  ije=ij_end-iip1
46
47  DO ij = ijb,ije
48    pgy( ij,l ) = pg( ij,l ) - pg( ij +iip1,l )
49  END DO
50
51  END DO
52!$OMP END DO NOWAIT
53
54
55END SUBROUTINE grad_p
Note: See TracBrowser for help on using the repository browser.