source: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/grad.f90 @ 5319

Last change on this file since 5319 was 5159, checked in by abarral, 3 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
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1020 bytes
RevLine 
[5099]1
[524]2! $Header$
[5099]3
[5105]4SUBROUTINE  grad(klevel, pg,pgx,pgy )
[5159]5
[5105]6  !  P. Le Van
[5159]7
[5105]8  !    ******************************************************************
9  ! .. calcul des composantes covariantes en x et y du gradient de g
[5159]10
[5105]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
[5159]14
15USE lmdz_dimensions, ONLY: iim, jjm, llm, ndm
16  USE lmdz_paramet
[5105]17  IMPLICIT NONE
18  !
[5159]19
20
[5105]21  INTEGER :: klevel
22  REAL :: pg( ip1jmp1,klevel )
23  REAL :: pgx( ip1jmp1,klevel ) , pgy( ip1jm,klevel )
24  INTEGER :: l,ij
[5159]25
26
[5105]27  DO l = 1,klevel
[5159]28
[5105]29  DO ij = 1, ip1jmp1 - 1
30  pgx( ij,l ) = pg( ij +1,l ) - pg( ij,l )
31  END DO
[5159]32
[5105]33  !    .... correction pour  pgx(ip1,j,l)  ....
34  !    ...    pgx(iip1,j,l)= pgx(1,j,l)  ....
35  !DIR$ IVDEP
36  DO ij = iip1, ip1jmp1, iip1
37  pgx( ij,l ) = pgx( ij -iim,l )
38  END DO
[5159]39
[5105]40  DO ij = 1,ip1jm
41  pgy( ij,l ) = pg( ij,l ) - pg( ij +iip1,l )
42  END DO
[5159]43
[5105]44  END DO
45  RETURN
46END SUBROUTINE grad
Note: See TracBrowser for help on using the repository browser.