source: LMDZ6/trunk/libf/dyn3d_common/massdair.F @ 3803

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

Cleanup in the dynamics: get rid of comconst.h, make it a module comconst_mod.
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
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 KB
Line 
1!
2! $Header$
3!
4      SUBROUTINE massdair( p, masse )
5c
6c *********************************************************************
7c       ....  Calcule la masse d'air  dans chaque maille   ....
8c *********************************************************************
9c
10c    Auteurs : P. Le Van , Fr. Hourdin  .
11c   ..........
12c
13c  ..    p                      est  un argum. d'entree pour le s-pg ...
14c  ..  masse                    est un  argum.de sortie pour le s-pg ...
15c     
16c  ....  p est defini aux interfaces des llm couches   .....
17c
18      IMPLICIT NONE
19c
20      include "dimensions.h"
21      include "paramet.h"
22      include "comgeom.h"
23c
24c  .....   arguments  ....
25c
26      REAL p(ip1jmp1,llmp1), masse(ip1jmp1,llm)
27
28c   ....  Variables locales  .....
29
30      INTEGER l,ij
31      REAL massemoyn, massemoys
32
33      REAL SSUM
34c
35c
36c   Methode pour calculer massebx et masseby .
37c   ----------------------------------------
38c
39c    A chaque point scalaire P (i,j) est affecte 4 coefficients d'aires
40c       alpha1(i,j)  calcule  au point ( i+1/4,j-1/4 )
41c       alpha2(i,j)  calcule  au point ( i+1/4,j+1/4 )
42c       alpha3(i,j)  calcule  au point ( i-1/4,j+1/4 )
43c       alpha4(i,j)  calcule  au point ( i-1/4,j-1/4 )
44c
45c    Avec  alpha1(i,j) = aire(i+1/4,j-1/4)/ aire(i,j)       
46c
47c    N.B .  Pour plus de details, voir s-pg  ...  iniconst ...
48c
49c
50c
51c   alpha4 .         . alpha1    . alpha4
52c    (i,j)             (i,j)       (i+1,j)
53c
54c             P .        U .          . P
55c           (i,j)       (i,j)         (i+1,j)
56c
57c   alpha3 .         . alpha2    .alpha3
58c    (i,j)              (i,j)     (i+1,j)
59c
60c             V .        Z .          . V
61c           (i,j)
62c
63c   alpha4 .         . alpha1    .alpha4
64c   (i,j+1)            (i,j+1)   (i+1,j+1)
65c
66c             P .        U .          . P
67c          (i,j+1)                    (i+1,j+1)
68c
69c
70c
71c                       On  a :
72c
73c    massebx(i,j) = masse(i  ,j) * ( alpha1(i  ,j) + alpha2(i,j))   +
74c                   masse(i+1,j) * ( alpha3(i+1,j) + alpha4(i+1,j) )
75c     localise  au point  ... U (i,j) ...
76c
77c    masseby(i,j) = masse(i,j  ) * ( alpha2(i,j  ) + alpha3(i,j  )  +
78c                   masse(i,j+1) * ( alpha1(i,j+1) + alpha4(i,j+1) 
79c     localise  au point  ... V (i,j) ...
80c
81c
82c=======================================================================
83
84      DO   100    l = 1 , llm
85c
86        DO    ij     = 1, ip1jmp1
87         masse(ij,l) = airesurg(ij) * ( p(ij,l) - p(ij,l+1) )
88        ENDDO
89c
90        DO   ij = 1, ip1jmp1,iip1
91         masse(ij+ iim,l) = masse(ij,l)
92        ENDDO
93c
94c       DO    ij     = 1,  iim
95c        masse(   ij   ,l) = masse(   ij   ,l) * aire(  ij    )
96c        masse(ij+ip1jm,l) = masse(ij+ip1jm,l) * aire(ij+ip1jm)
97c       ENDDO
98c        massemoyn         = SSUM(iim,masse(   1   ,l),1)/ apoln
99c        massemoys         = SSUM(iim,masse(ip1jm+1,l),1)/ apols
100c       DO    ij     = 1, iip1
101c        masse(   ij   ,l )    = massemoyn
102c        masse(ij+ip1jm,l )    = massemoys
103c       ENDDO
104       
105100   CONTINUE
106c
107      RETURN
108      END
Note: See TracBrowser for help on using the repository browser.