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

Last change on this file since 5209 was 5186, checked in by abarral, 9 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
Line 
1MODULE lmdz_dudv2
2  IMPLICIT NONE; PRIVATE
3  PUBLIC dudv2
4
5CONTAINS
6
7  SUBROUTINE dudv2(teta, pkf, bern, du, dv)
8
9    USE lmdz_dimensions, ONLY: iim, jjm, llm, ndm
10    USE lmdz_paramet
11    IMPLICIT NONE
12
13    !=======================================================================
14
15    !   Auteur:  P. Le Van
16    !   -------
17
18    !   Objet:
19    !   ------
20
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  ..
26
27
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  ....
30
31    !=======================================================================
32    !
33
34    REAL :: teta(ip1jmp1, llm), pkf(ip1jmp1, llm), bern(ip1jmp1, llm), &
35            du(ip1jmp1, llm), dv(ip1jm, llm)
36    INTEGER :: l, ij
37
38    DO l = 1, llm
39
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
44
45
46      !    .....  correction  pour du(iip1,j,l),  j=2,jjm   ......
47      !    ...          du(iip1,j,l) = du(1,j,l)                 ...
48
49      !DIR$ IVDEP
50      DO ij = iip1 + iip1, ip1jm, iip1
51        du(ij, l) = du(ij - iim, l)
52      END DO
53
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
59
60    END DO
61    !
62
63  END SUBROUTINE dudv2
64
65
66END MODULE lmdz_dudv2
Note: See TracBrowser for help on using the repository browser.