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

Last change on this file since 5115 was 5105, checked in by abarral, 4 months ago

Replace 1DUTILS.h by module lmdz_1dutils.f90
Replace 1DConv.h by module lmdz_old_1dconv.f90 (it's only used by old_* files)
Convert *.F to *.f90
Fix gradsdef.h formatting
Remove unnecessary "RETURN" at the end of functions/subroutines

  • 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
13  IMPLICIT NONE
14  !
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
22  !
23  !
24!$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
25  DO l = 1,klevel
26  !
27  ijb=ij_begin
28  ije=ij_end
29  DO ij = ijb, ije - 1
30    pgx( ij,l ) = pg( ij +1,l ) - pg( ij,l )
31  END DO
32  !
33  !    .... correction pour  pgx(ip1,j,l)  ....
34  !    ...    pgx(iip1,j,l)= pgx(1,j,l)  ....
35  !DIR$ IVDEP
36  DO ij = ijb+iip1-1, ije, iip1
37    pgx( ij,l ) = pgx( ij -iim,l )
38  END DO
39  !
40  ijb=ij_begin-iip1
41  ije=ij_end
42  if (pole_nord) ijb=ij_begin
43  if (pole_sud)  ije=ij_end-iip1
44
45  DO ij = ijb,ije
46    pgy( ij,l ) = pg( ij,l ) - pg( ij +iip1,l )
47  END DO
48  !
49  END DO
50!$OMP END DO NOWAIT
51
52
53END SUBROUTINE grad_p
Note: See TracBrowser for help on using the repository browser.