source: LMDZ6/trunk/libf/dyn3dmem/dudv2_loc.F @ 3803

Last change on this file since 3803 was 2600, checked in by Ehouarn Millour, 8 years ago

Cleanup in the dynamics: turn comvert.h into module comvert_mod.F90
EM

  • 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
File size: 1.9 KB
Line 
1      SUBROUTINE dudv2_loc ( teta, pkf, bern, du, dv  )
2      USE parallel_lmdz
3      IMPLICIT NONE
4c
5c=======================================================================
6c
7c   Auteur:  P. Le Van
8c   -------
9c
10c   Objet:
11c   ------
12c
13c   *****************************************************************
14c   ..... calcul du terme de pression (gradient de p/densite )   et
15c          du terme de ( -gradient de la fonction de Bernouilli ) ...
16c   *****************************************************************
17c          Ces termes sont ajoutes a  d(ucov)/dt et a d(vcov)/dt  ..
18c
19c
20c    teta , pkf, bern  sont des arguments d'entree  pour le s-pg  ....
21c    du et dv          sont des arguments de sortie pour le s-pg  ....
22c
23c=======================================================================
24c
25      include "dimensions.h"
26      include "paramet.h"
27
28      REAL teta( ijb_u:ije_u,llm ),pkf( ijb_u:ije_u,llm )
29      REAL bern( ijb_u:ije_u,llm )
30      REAL du( ijb_u:ije_u,llm ),  dv( ijb_v:ije_v,llm )
31      INTEGER  l,ij,ijb,ije
32c
33c
34c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
35      DO 5 l = 1,llm
36c
37      ijb=ij_begin
38      ije=ij_end
39      if (pole_nord) ijb=ijb+iip1
40      if (pole_sud)  ije=ije-iip1
41
42      DO 2  ij  = ijb, ije - 1
43       du(ij,l) = du(ij,l) + 0.5* ( teta( ij,l ) + teta( ij+1,l ) ) *
44     * ( pkf( ij,l ) - pkf(ij+1,l) )  + bern(ij,l) - bern(ij+1,l)
45   2  CONTINUE
46c
47c
48c    .....  correction  pour du(iip1,j,l),  j=2,jjm   ......
49c    ...          du(iip1,j,l) = du(1,j,l)                 ...
50c
51CDIR$ IVDEP
52      DO 3 ij = ijb+iip1-1, ije, iip1
53      du( ij,l ) = du( ij - iim,l )
54   3  CONTINUE
55c
56c
57      if (pole_nord) ijb=ijb-iip1
58
59      DO 4 ij  = ijb,ije
60      dv( ij,l) = dv(ij,l) + 0.5 * ( teta(ij,l) + teta( ij+iip1,l ) ) *
61     *                             ( pkf(ij+iip1,l) - pkf(  ij,l  ) )
62     *                           +   bern( ij+iip1,l ) - bern( ij  ,l )
63   4  CONTINUE
64c
65   5  CONTINUE
66c$OMP END DO NOWAIT
67c
68      RETURN
69      END
Note: See TracBrowser for help on using the repository browser.