source: LMDZ5/trunk/libf/dyn3dpar/massbar_p.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
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.1 KB
Line 
1      SUBROUTINE massbar_p(  masse, massebx, masseby )
2     
3c
4c **********************************************************************
5c
6c  Calcule les moyennes en x et  y de la masse d'air dans chaque maille.
7c **********************************************************************
8c    Auteurs : P. Le Van , Fr. Hourdin  .
9c   ..........
10c
11c  ..  masse                 est  un argum. d'entree  pour le s-pg ...
12c  ..  massebx,masseby      sont des argum. de sortie pour le s-pg ...
13c     
14c
15      USE parallel_lmdz
16      IMPLICIT NONE
17c
18#include "dimensions.h"
19#include "paramet.h"
20#include "comconst.h"
21#include "comgeom.h"
22c
23      REAL    masse( ip1jmp1,llm ), massebx( ip1jmp1,llm )  ,
24     *      masseby(   ip1jm,llm )
25      INTEGER ij,l,ijb,ije
26c
27c
28c   Methode pour calculer massebx et masseby .
29c   ----------------------------------------
30c
31c    A chaque point scalaire P (i,j) est affecte 4 coefficients d'aires
32c       alpha1(i,j)  calcule  au point ( i+1/4,j-1/4 )
33c       alpha2(i,j)  calcule  au point ( i+1/4,j+1/4 )
34c       alpha3(i,j)  calcule  au point ( i-1/4,j+1/4 )
35c       alpha4(i,j)  calcule  au point ( i-1/4,j-1/4 )
36c
37c    Avec  alpha1(i,j) = aire(i+1/4,j-1/4)/ aire(i,j)       
38c
39c    N.B .  Pour plus de details, voir s-pg  ...  iniconst ...
40c
41c
42c
43c   alpha4 .         . alpha1    . alpha4
44c    (i,j)             (i,j)       (i+1,j)
45c
46c             P .        U .          . P
47c           (i,j)       (i,j)         (i+1,j)
48c
49c   alpha3 .         . alpha2    .alpha3
50c    (i,j)              (i,j)     (i+1,j)
51c
52c             V .        Z .          . V
53c           (i,j)
54c
55c   alpha4 .         . alpha1    .alpha4
56c   (i,j+1)            (i,j+1)   (i+1,j+1)
57c
58c             P .        U .          . P
59c          (i,j+1)                    (i+1,j+1)
60c
61c
62c
63c                       On  a :
64c
65c    massebx(i,j) = masse(i  ,j) * ( alpha1(i  ,j) + alpha2(i,j))   +
66c                   masse(i+1,j) * ( alpha3(i+1,j) + alpha4(i+1,j) )
67c     localise  au point  ... U (i,j) ...
68c
69c    masseby(i,j) = masse(i,j  ) * ( alpha2(i,j  ) + alpha3(i,j  )  +
70c                   masse(i,j+1) * ( alpha1(i,j+1) + alpha4(i,j+1) 
71c     localise  au point  ... V (i,j) ...
72c
73c
74c=======================================================================
75     
76     
77     
78c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 
79      DO   100    l = 1 , llm
80c
81        ijb=ij_begin
82        ije=ij_end+iip1
83        if (pole_sud) ije=ije-iip1
84       
85        DO  ij = ijb, ije - 1
86         massebx(ij,l) =  masse( ij, l) * alpha1p2( ij  )     +
87     *                   masse(ij+1, l) * alpha3p4(ij+1 )
88        ENDDO
89
90c    .... correction pour massebx( iip1,j) .....
91c    ...    massebx(iip1,j)= massebx(1,j) ...
92c
93CDIR$ IVDEP
94
95       
96
97        DO  ij = ijb+iim, ije+iim, iip1
98         massebx( ij,l ) = massebx( ij - iim,l )
99        ENDDO
100
101
102     
103        ijb=ij_begin-iip1
104        ije=ij_end+iip1
105        if (pole_nord) ijb=ij_begin
106        if (pole_sud) ije=ij_end-iip1
107
108         DO  ij = ijb,ije
109         masseby( ij,l ) = masse(  ij   , l ) * alpha2p3(   ij    )  +
110     *                     masse(ij+iip1, l ) * alpha1p4( ij+iip1 )
111         ENDDO
112
113100   CONTINUE
114c$OMP END DO NOWAIT
115c
116      RETURN
117      END
Note: See TracBrowser for help on using the repository browser.