source: LMDZ6/branches/Amaury_dev/libf/dyn3d/lmdz_dudv2.f90 @ 5214

Last change on this file since 5214 was 5186, checked in by abarral, 12 days ago

Encapsulate files in 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.8 KB
RevLine 
[5186]1MODULE lmdz_dudv2
2  IMPLICIT NONE; PRIVATE
3  PUBLIC dudv2
[5099]4
[5186]5CONTAINS
[524]6
[5186]7  SUBROUTINE dudv2(teta, pkf, bern, du, dv)
[5159]8
[5186]9    USE lmdz_dimensions, ONLY: iim, jjm, llm, ndm
10    USE lmdz_paramet
11    IMPLICIT NONE
[5159]12
[5186]13    !=======================================================================
[5159]14
[5186]15    !   Auteur:  P. Le Van
16    !   -------
[5159]17
[5186]18    !   Objet:
19    !   ------
[5159]20
[5186]21    !   *****************************************************************
22    !   ..... calcul du terme de pression (gradient de p/densite )   et
23    !      du terme de ( -gradient de la fonction de Bernouilli ) ...
24    !   *****************************************************************
25    !      Ces termes sont ajoutes a  d(ucov)/dt et a d(vcov)/dt  ..
[5159]26
27
[5186]28    !    teta , pkf, bern  sont des arguments d'entree  pour le s-pg  ....
29    !    du et dv          sont des arguments de sortie pour le s-pg  ....
[524]30
[5186]31    !=======================================================================
32    !
[5159]33
[5186]34    REAL :: teta(ip1jmp1, llm), pkf(ip1jmp1, llm), bern(ip1jmp1, llm), &
35            du(ip1jmp1, llm), dv(ip1jm, llm)
36    INTEGER :: l, ij
[5159]37
[5186]38    DO l = 1, llm
[5159]39
[5186]40      DO ij = iip2, ip1jm - 1
41        du(ij, l) = du(ij, l) + 0.5 * (teta(ij, l) + teta(ij + 1, l)) * &
42                (pkf(ij, l) - pkf(ij + 1, l)) + bern(ij, l) - bern(ij + 1, l)
43      END DO
[5159]44
45
[5186]46      !    .....  correction  pour du(iip1,j,l),  j=2,jjm   ......
47      !    ...          du(iip1,j,l) = du(1,j,l)                 ...
[5159]48
[5186]49      !DIR$ IVDEP
50      DO ij = iip1 + iip1, ip1jm, iip1
51        du(ij, l) = du(ij - iim, l)
52      END DO
[5159]53
[5186]54      DO ij = 1, ip1jm
55        dv(ij, l) = dv(ij, l) + 0.5 * (teta(ij, l) + teta(ij + iip1, l)) * &
56                (pkf(ij + iip1, l) - pkf(ij, l)) &
57                + bern(ij + iip1, l) - bern(ij, l)
58      END DO
[5159]59
[5103]60    END DO
[5186]61    !
[5159]62
[5186]63  END SUBROUTINE dudv2
[5159]64
65
[5186]66END MODULE lmdz_dudv2
Note: See TracBrowser for help on using the repository browser.