source: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/divgrad2.f90 @ 5441

Last change on this file since 5441 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
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 KB
RevLine 
[524]1! $Header$
[5099]2
[5119]3SUBROUTINE divgrad2(klevel, h, deltapres, lh, divgra)
[5159]4
[5105]5  ! P. Le Van
[5159]6
[5105]7  !   ***************************************************************
[5159]8
[5105]9  ! .....   calcul de  (div( grad ))   de (  pext * h ) .....
10  !   ****************************************************************
11  !   h ,klevel,lh et pext  sont des arguments  d'entree pour le s-prg
12  !     divgra     est  un argument  de sortie pour le s-prg
[5159]13
[5119]14  USE lmdz_ssum_scopy, ONLY: scopy
[5134]15  USE lmdz_comdissipn, ONLY: tetaudiv, tetaurot, tetah, cdivu, crot, cdivh
[5136]16  USE lmdz_comgeom2
[5119]17
[5159]18USE lmdz_dimensions, ONLY: iim, jjm, llm, ndm
19  USE lmdz_paramet
[5105]20  IMPLICIT NONE
21  !
[524]22
[5159]23
24
[5105]25  !    .......    variables en arguments   .......
[5159]26
[5105]27  INTEGER :: klevel
[5119]28  REAL :: h(ip1jmp1, klevel), deltapres(ip1jmp1, klevel)
29  REAL :: divgra(ip1jmp1, klevel)
[5159]30
[5105]31  !    .......    variables  locales    ..........
[5159]32
[5119]33  REAL :: signe, nudivgrs, sqrtps(ip1jmp1, llm)
34  INTEGER :: l, ij, iter, lh
[5105]35  !    ...................................................................
[524]36
[5159]37
[5119]38  signe = (-1.)**lh
[5105]39  nudivgrs = signe * cdivh
[524]40
[5119]41  CALL SCOPY (ip1jmp1 * klevel, h, 1, divgra, 1)
[524]42
[5159]43
[5119]44  CALL laplacien(klevel, divgra, divgra)
[524]45
[5105]46  DO l = 1, klevel
[5119]47    DO ij = 1, ip1jmp1
48      sqrtps(ij, l) = SQRT(deltapres(ij, l))
49    ENDDO
[5105]50  ENDDO
[5159]51
[5105]52  DO l = 1, klevel
53    DO ij = 1, ip1jmp1
[5119]54      divgra(ij, l) = divgra(ij, l) * sqrtps(ij, l)
[5105]55    ENDDO
56  ENDDO
57
58  !    ........    Iteration de l'operateur  laplacien_gam    ........
[5159]59
[5105]60  DO  iter = 1, lh - 2
[5119]61    CALL laplacien_gam (klevel, cuvscvgam2, cvuscugam2, unsair_gam2, &
62            unsapolnga2, unsapolsga2, divgra, divgra)
[5105]63  ENDDO
[5159]64
[5105]65  !    ...............................................................
66
67  DO l = 1, klevel
68    DO ij = 1, ip1jmp1
[5119]69      divgra(ij, l) = divgra(ij, l) * sqrtps(ij, l)
[5105]70    ENDDO
71  ENDDO
[5159]72
[5119]73  CALL laplacien (klevel, divgra, divgra)
[5159]74
[5119]75  DO l = 1, klevel
76    DO ij = 1, ip1jmp1
77      divgra(ij, l) = nudivgrs * divgra(ij, l) / deltapres(ij, l)
78    ENDDO
[5105]79  ENDDO
80
81  RETURN
82END SUBROUTINE divgrad2
Note: See TracBrowser for help on using the repository browser.