source: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/massdair.f90 @ 5214

Last change on this file since 5214 was 5159, checked in by abarral, 7 weeks ago

Put dimensions.h and paramet.h into modules

  • 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: 2.9 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 lmdz_comgeom
19
20USE lmdz_dimensions, ONLY: iim, jjm, llm, ndm
21  USE lmdz_paramet
22  IMPLICIT NONE
23  !
24
25
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
37
38  !   Methode pour calculer massebx et masseby .
39  !   ----------------------------------------
40
41  !    A chaque point scalaire P (i,j) est affecte 4 coefficients d'aires
42  !   alpha1(i,j)  calcule  au point ( i+1/4,j-1/4 )
43  !   alpha2(i,j)  calcule  au point ( i+1/4,j+1/4 )
44  !   alpha3(i,j)  calcule  au point ( i-1/4,j+1/4 )
45  !   alpha4(i,j)  calcule  au point ( i-1/4,j-1/4 )
46
47  !    Avec  alpha1(i,j) = aire(i+1/4,j-1/4)/ aire(i,j)
48
49  !    N.B .  Pour plus de details, voir s-pg  ...  iniconst ...
50
51
52
53  !   alpha4 .         . alpha1    . alpha4
54  !    (i,j)             (i,j)       (i+1,j)
55
56  !         P .        U .          . P
57  !       (i,j)       (i,j)         (i+1,j)
58
59  !   alpha3 .         . alpha2    .alpha3
60  !    (i,j)              (i,j)     (i+1,j)
61
62  !         V .        Z .          . V
63  !       (i,j)
64
65  !   alpha4 .         . alpha1    .alpha4
66  !   (i,j+1)            (i,j+1)   (i+1,j+1)
67
68  !         P .        U .          . P
69  !      (i,j+1)                    (i+1,j+1)
70
71
72
73  !                   On  a :
74
75  !    massebx(i,j) = masse(i  ,j) * ( alpha1(i  ,j) + alpha2(i,j))   +
76  !               masse(i+1,j) * ( alpha3(i+1,j) + alpha4(i+1,j) )
77  ! localise  au point  ... U (i,j) ...
78
79  !    masseby(i,j) = masse(i,j  ) * ( alpha2(i,j  ) + alpha3(i,j  )  +
80  !               masse(i,j+1) * ( alpha1(i,j+1) + alpha4(i,j+1)
81  ! localise  au point  ... V (i,j) ...
82
83
84  !=======================================================================
85
86  DO   l = 1 , llm
87
88    DO    ij     = 1, ip1jmp1
89     masse(ij,l) = airesurg(ij) * ( p(ij,l) - p(ij,l+1) )
90    ENDDO
91
92    DO   ij = 1, ip1jmp1,iip1
93     masse(ij+ iim,l) = masse(ij,l)
94    ENDDO
95
96  !   DO    ij     = 1,  iim
97  !    masse(   ij   ,l) = masse(   ij   ,l) * aire(  ij    )
98  !    masse(ij+ip1jm,l) = masse(ij+ip1jm,l) * aire(ij+ip1jm)
99  !   ENDDO
100  !    massemoyn         = SSUM(iim,masse(   1   ,l),1)/ apoln
101  !    massemoys         = SSUM(iim,masse(ip1jm+1,l),1)/ apols
102  !   DO    ij     = 1, iip1
103  !    masse(   ij   ,l )    = massemoyn
104  !    masse(ij+ip1jm,l )    = massemoys
105  !   ENDDO
106
107  END DO
108
109  RETURN
110END SUBROUTINE massdair
Note: See TracBrowser for help on using the repository browser.