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

Last change on this file since 5172 was 5159, checked in by abarral, 5 months 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
RevLine 
[5105]1SUBROUTINE  grad_p(klevel, pg,pgx,pgy )
[5159]2
[5105]3  !  P. Le Van
[5159]4
[5105]5  !    ******************************************************************
6  ! .. calcul des composantes covariantes en x et y du gradient de g
[5159]7
[5105]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
[5159]11
[5105]12  USE parallel_lmdz
[5159]13USE lmdz_dimensions, ONLY: iim, jjm, llm, ndm
14  USE lmdz_paramet
[5105]15  IMPLICIT NONE
16  !
[5159]17
18
[5105]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
[5159]24
25
[5105]26!$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
27  DO l = 1,klevel
[5159]28
[5105]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
[5159]34
[5105]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
[5159]41
[5105]42  ijb=ij_begin-iip1
43  ije=ij_end
[5117]44  IF (pole_nord) ijb=ij_begin
45  IF (pole_sud)  ije=ij_end-iip1
[1632]46
[5105]47  DO ij = ijb,ije
48    pgy( ij,l ) = pg( ij,l ) - pg( ij +iip1,l )
49  END DO
[5159]50
[5105]51  END DO
52!$OMP END DO NOWAIT
53
54
55END SUBROUTINE grad_p
Note: See TracBrowser for help on using the repository browser.