source: LMDZ5/trunk/libf/dyn3dmem/massbar.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: 2.8 KB
Line 
1!
2! $Header$
3!
4      SUBROUTINE massbar(  masse, massebx, masseby )
5c
6c **********************************************************************
7c
8c  Calcule les moyennes en x et  y de la masse d'air dans chaque maille.
9c **********************************************************************
10c    Auteurs : P. Le Van , Fr. Hourdin  .
11c   ..........
12c
13c  ..  masse                 est  un argum. d'entree  pour le s-pg ...
14c  ..  massebx,masseby      sont des argum. de sortie pour le s-pg ...
15c     
16c
17c     IMPLICIT NONE
18c
19#include "dimensions.h"
20#include "paramet.h"
21#include "comconst.h"
22#include "comgeom.h"
23c
24      REAL    masse( ip1jmp1,llm ), massebx( ip1jmp1,llm )  ,
25     *      masseby(   ip1jm,llm )
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      DO   100    l = 1 , llm
77c
78        DO  ij = 1, ip1jmp1 - 1
79         massebx(ij,l) =  masse( ij, l) * alpha1p2( ij  )     +
80     *                   masse(ij+1, l) * alpha3p4(ij+1 )
81        ENDDO
82
83c    .... correction pour massebx( iip1,j) .....
84c    ...    massebx(iip1,j)= massebx(1,j) ...
85c
86CDIR$ IVDEP
87        DO  ij = iip1, ip1jmp1, iip1
88         massebx( ij,l ) = massebx( ij - iim,l )
89        ENDDO
90
91
92         DO  ij = 1,ip1jm
93         masseby( ij,l ) = masse(  ij   , l ) * alpha2p3(   ij    )  +
94     *                     masse(ij+iip1, l ) * alpha1p4( ij+iip1 )
95         ENDDO
96
97100   CONTINUE
98c
99      RETURN
100      END
Note: See TracBrowser for help on using the repository browser.