source: LMDZ6/trunk/libf/dyn3d_common/grad.f90 @ 5271

Last change on this file since 5271 was 5271, checked in by abarral, 26 hours ago

Move dimensions.h into a module
Nb: doesn't compile yet

  • 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
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.0 KB
Line 
1!
2! $Header$
3!
4SUBROUTINE  grad(klevel, pg,pgx,pgy )
5  !
6  !  P. Le Van
7  !
8  !    ******************************************************************
9  ! .. calcul des composantes covariantes en x et y du gradient de g
10  !
11  !    ******************************************************************
12  !         pg        est un   argument  d'entree pour le s-prog
13  !   pgx  et  pgy    sont des arguments de sortie pour le s-prog
14  !
15  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
16IMPLICIT NONE
17  !
18
19  INCLUDE "paramet.h"
20  INTEGER :: klevel
21  REAL :: pg( ip1jmp1,klevel )
22  REAL :: pgx( ip1jmp1,klevel ) , pgy( ip1jm,klevel )
23  INTEGER :: l,ij
24  !
25  !
26  DO l = 1,klevel
27  !
28  DO  ij = 1, ip1jmp1 - 1
29  pgx( ij,l ) = pg( ij +1,l ) - pg( ij,l )
30  END DO
31  !
32  !    .... correction pour  pgx(ip1,j,l)  ....
33  !    ...    pgx(iip1,j,l)= pgx(1,j,l)  ....
34  !DIR$ IVDEP
35  DO  ij = iip1, ip1jmp1, iip1
36  pgx( ij,l ) = pgx( ij -iim,l )
37  END DO
38  !
39  DO ij = 1,ip1jm
40  pgy( ij,l ) = pg( ij,l ) - pg( ij +iip1,l )
41  END DO
42  !
43  END DO
44  RETURN
45END SUBROUTINE grad
Note: See TracBrowser for help on using the repository browser.