source: LMDZ5/trunk/libf/dyn3dmem/dudv2_loc.F @ 1907

Last change on this file since 1907 was 1907, checked in by lguez, 10 years ago

Added a copyright property to every file of the distribution, except
for the fcm files (which have their own copyright). Use svn propget on
a file to see the copyright. For instance:

$ svn propget copyright libf/phylmd/physiq.F90
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

Also added the files defining the CeCILL version 2 license, in French
and English, at the top of the LMDZ tree.

  • 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#include "comvert.h"
28
29      REAL teta( ijb_u:ije_u,llm ),pkf( ijb_u:ije_u,llm )
30      REAL bern( ijb_u:ije_u,llm )
31      REAL du( ijb_u:ije_u,llm ),  dv( ijb_v:ije_v,llm )
32      INTEGER  l,ij,ijb,ije
33c
34c
35c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
36      DO 5 l = 1,llm
37c
38      ijb=ij_begin
39      ije=ij_end
40      if (pole_nord) ijb=ijb+iip1
41      if (pole_sud)  ije=ije-iip1
42
43      DO 2  ij  = ijb, ije - 1
44       du(ij,l) = du(ij,l) + 0.5* ( teta( ij,l ) + teta( ij+1,l ) ) *
45     * ( pkf( ij,l ) - pkf(ij+1,l) )  + bern(ij,l) - bern(ij+1,l)
46   2  CONTINUE
47c
48c
49c    .....  correction  pour du(iip1,j,l),  j=2,jjm   ......
50c    ...          du(iip1,j,l) = du(1,j,l)                 ...
51c
52CDIR$ IVDEP
53      DO 3 ij = ijb+iip1-1, ije, iip1
54      du( ij,l ) = du( ij - iim,l )
55   3  CONTINUE
56c
57c
58      if (pole_nord) ijb=ijb-iip1
59
60      DO 4 ij  = ijb,ije
61      dv( ij,l) = dv(ij,l) + 0.5 * ( teta(ij,l) + teta( ij+iip1,l ) ) *
62     *                             ( pkf(ij+iip1,l) - pkf(  ij,l  ) )
63     *                           +   bern( ij+iip1,l ) - bern( ij  ,l )
64   4  CONTINUE
65c
66   5  CONTINUE
67c$OMP END DO NOWAIT
68c
69      RETURN
70      END
Note: See TracBrowser for help on using the repository browser.