source: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/massdair_loc.f90 @ 5153

Last change on this file since 5153 was 5136, checked in by abarral, 8 weeks ago

Put comgeom.h, comgeom2.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
File size: 3.1 KB
Line 
1SUBROUTINE massdair_loc( p, masse )
2  USE parallel_lmdz
3  USE lmdz_comgeom
4
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  IMPLICIT NONE
19  !
20  INCLUDE "dimensions.h"
21  INCLUDE "paramet.h"
22  !
23  !  .....   arguments  ....
24  !
25  REAL :: p(ijb_u:ije_u,llmp1), masse(ijb_u:ije_u,llm)
26
27  !   ....  Variables locales  .....
28
29  INTEGER :: l,ij
30  INTEGER :: ijb,ije
31  REAL :: massemoyn, massemoys
32
33  !
34  !
35  !   Methode pour calculer massebx et masseby .
36  !   ----------------------------------------
37  !
38  !    A chaque point scalaire P (i,j) est affecte 4 coefficients d'aires
39  !   alpha1(i,j)  calcule  au point ( i+1/4,j-1/4 )
40  !   alpha2(i,j)  calcule  au point ( i+1/4,j+1/4 )
41  !   alpha3(i,j)  calcule  au point ( i-1/4,j+1/4 )
42  !   alpha4(i,j)  calcule  au point ( i-1/4,j-1/4 )
43  !
44  !    Avec  alpha1(i,j) = aire(i+1/4,j-1/4)/ aire(i,j)
45  !
46  !    N.B .  Pour plus de details, voir s-pg  ...  iniconst ...
47  !
48  !
49  !
50  !   alpha4 .         . alpha1    . alpha4
51  !    (i,j)             (i,j)       (i+1,j)
52  !
53  !         P .        U .          . P
54  !       (i,j)       (i,j)         (i+1,j)
55  !
56  !   alpha3 .         . alpha2    .alpha3
57  !    (i,j)              (i,j)     (i+1,j)
58  !
59  !         V .        Z .          . V
60  !       (i,j)
61  !
62  !   alpha4 .         . alpha1    .alpha4
63  !   (i,j+1)            (i,j+1)   (i+1,j+1)
64  !
65  !         P .        U .          . P
66  !      (i,j+1)                    (i+1,j+1)
67  !
68  !
69  !
70  !                   On  a :
71  !
72  !    massebx(i,j) = masse(i  ,j) * ( alpha1(i  ,j) + alpha2(i,j))   +
73  !               masse(i+1,j) * ( alpha3(i+1,j) + alpha4(i+1,j) )
74  ! localise  au point  ... U (i,j) ...
75  !
76  !    masseby(i,j) = masse(i,j  ) * ( alpha2(i,j  ) + alpha3(i,j  )  +
77  !               masse(i,j+1) * ( alpha1(i,j+1) + alpha4(i,j+1)
78  ! localise  au point  ... V (i,j) ...
79  !
80  !
81  !=======================================================================
82
83
84
85
86  ijb=ij_begin-iip1
87  ije=ij_end+2*iip1
88
89  IF (pole_nord) ijb=ij_begin
90  IF (pole_sud)  ije=ij_end
91
92!$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
93  DO   l = 1 , llm
94  !
95    DO    ij     = ijb, ije
96     masse(ij,l) = airesurg(ij) * ( p(ij,l) - p(ij,l+1) )
97    ENDDO
98  !
99    DO   ij = ijb, ije,iip1
100     masse(ij+ iim,l) = masse(ij,l)
101    ENDDO
102  !
103  !   DO    ij     = 1,  iim
104  !    masse(   ij   ,l) = masse(   ij   ,l) * aire(  ij    )
105  !    masse(ij+ip1jm,l) = masse(ij+ip1jm,l) * aire(ij+ip1jm)
106  !   ENDDO
107  !    massemoyn         = SSUM(iim,masse(   1   ,l),1)/ apoln
108  !    massemoys         = SSUM(iim,masse(ip1jm+1,l),1)/ apols
109  !   DO    ij     = 1, iip1
110  !    masse(   ij   ,l )    = massemoyn
111  !    masse(ij+ip1jm,l )    = massemoys
112  !   ENDDO
113
114  END DO
115!$OMP END DO NOWAIT
116  !
117
118END SUBROUTINE massdair_loc
Note: See TracBrowser for help on using the repository browser.