source: LMDZ5/trunk/libf/dyn3dpar/massdair.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.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 "comconst.h"
23#include "comgeom.h"
24c
25c  .....   arguments  ....
26c
27      REAL p(ip1jmp1,llmp1), masse(ip1jmp1,llm)
28
29c   ....  Variables locales  .....
30
31      INTEGER l,ij
32      REAL massemoyn, massemoys
33
34      REAL SSUM
35c
36c
37c   Methode pour calculer massebx et masseby .
38c   ----------------------------------------
39c
40c    A chaque point scalaire P (i,j) est affecte 4 coefficients d'aires
41c       alpha1(i,j)  calcule  au point ( i+1/4,j-1/4 )
42c       alpha2(i,j)  calcule  au point ( i+1/4,j+1/4 )
43c       alpha3(i,j)  calcule  au point ( i-1/4,j+1/4 )
44c       alpha4(i,j)  calcule  au point ( i-1/4,j-1/4 )
45c
46c    Avec  alpha1(i,j) = aire(i+1/4,j-1/4)/ aire(i,j)       
47c
48c    N.B .  Pour plus de details, voir s-pg  ...  iniconst ...
49c
50c
51c
52c   alpha4 .         . alpha1    . alpha4
53c    (i,j)             (i,j)       (i+1,j)
54c
55c             P .        U .          . P
56c           (i,j)       (i,j)         (i+1,j)
57c
58c   alpha3 .         . alpha2    .alpha3
59c    (i,j)              (i,j)     (i+1,j)
60c
61c             V .        Z .          . V
62c           (i,j)
63c
64c   alpha4 .         . alpha1    .alpha4
65c   (i,j+1)            (i,j+1)   (i+1,j+1)
66c
67c             P .        U .          . P
68c          (i,j+1)                    (i+1,j+1)
69c
70c
71c
72c                       On  a :
73c
74c    massebx(i,j) = masse(i  ,j) * ( alpha1(i  ,j) + alpha2(i,j))   +
75c                   masse(i+1,j) * ( alpha3(i+1,j) + alpha4(i+1,j) )
76c     localise  au point  ... U (i,j) ...
77c
78c    masseby(i,j) = masse(i,j  ) * ( alpha2(i,j  ) + alpha3(i,j  )  +
79c                   masse(i,j+1) * ( alpha1(i,j+1) + alpha4(i,j+1) 
80c     localise  au point  ... V (i,j) ...
81c
82c
83c=======================================================================
84
85      DO   100    l = 1 , llm
86c
87        DO    ij     = 1, ip1jmp1
88         masse(ij,l) = airesurg(ij) * ( p(ij,l) - p(ij,l+1) )
89        ENDDO
90c
91        DO   ij = 1, ip1jmp1,iip1
92         masse(ij+ iim,l) = masse(ij,l)
93        ENDDO
94c
95c       DO    ij     = 1,  iim
96c        masse(   ij   ,l) = masse(   ij   ,l) * aire(  ij    )
97c        masse(ij+ip1jm,l) = masse(ij+ip1jm,l) * aire(ij+ip1jm)
98c       ENDDO
99c        massemoyn         = SSUM(iim,masse(   1   ,l),1)/ apoln
100c        massemoys         = SSUM(iim,masse(ip1jm+1,l),1)/ apols
101c       DO    ij     = 1, iip1
102c        masse(   ij   ,l )    = massemoyn
103c        masse(ij+ip1jm,l )    = massemoys
104c       ENDDO
105       
106100   CONTINUE
107c
108      RETURN
109      END
Note: See TracBrowser for help on using the repository browser.