source: LMDZ6/trunk/libf/dyn3d_common/massdair.f90 @ 5272

Last change on this file since 5272 was 5272, checked in by abarral, 23 hours ago

Turn paramet.h into a module

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