source: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/pbar.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
  • 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 pbar( pext, pbarx, pbary, pbarxy )
5  USE lmdz_comgeom
6
7  IMPLICIT NONE
8
9  !=======================================================================
10  !
11  !   Auteur:  P. Le Van
12  !   -------
13  !
14  !   Objet:
15  !   ------
16  !
17  ! **********************************************************************
18  ! calcul des moyennes en x et en y de (pression au sol*aire variable) ..
19  ! *********************************************************************
20  !
21  !      pext               est  un argum. d'entree  pour le s-pg ..
22  ! pbarx,pbary et pbarxy  sont des argum. de sortie pour le s-pg ..
23  !
24  !   Methode:
25  !   --------
26  !
27  !    A chaque point scalaire P (i,j) est affecte 4 coefficients d'aires
28  !   alpha1(i,j)  calcule  au point ( i+1/4,j-1/4 )
29  !   alpha2(i,j)  calcule  au point ( i+1/4,j+1/4 )
30  !   alpha3(i,j)  calcule  au point ( i-1/4,j+1/4 )
31  !   alpha4(i,j)  calcule  au point ( i-1/4,j-1/4 )
32  !
33  !    Avec  alpha1(i,j) = aire(i+1/4,j-1/4)/ aire(i,j)
34  !
35  !    N.B .  Pour plus de details, voir s-pg  ...  iniconst ...
36  !
37  !
38  !
39  !   alpha4 .         . alpha1    . alpha4
40  !    (i,j)             (i,j)       (i+1,j)
41  !
42  !         P .        U .          . P
43  !       (i,j)       (i,j)         (i+1,j)
44  !
45  !   alpha3 .         . alpha2    .alpha3
46  !    (i,j)              (i,j)     (i+1,j)
47  !
48  !         V .        Z .          . V
49  !       (i,j)
50  !
51  !   alpha4 .         . alpha1    .alpha4
52  !   (i,j+1)            (i,j+1)   (i+1,j+1)
53  !
54  !         P .        U .          . P
55  !      (i,j+1)                    (i+1,j+1)
56  !
57  !
58  !
59  !
60  !                   On  a :
61  !
62  !    pbarx(i,j) = Pext(i  ,j) * ( alpha1(i  ,j) + alpha2(i,j))      +
63  !             Pext(i+1,j) * ( alpha3(i+1,j) + alpha4(i+1,j) )
64  ! localise  au point  ... U (i,j) ...
65  !
66  !    pbary(i,j) = Pext(i,j  ) * ( alpha2(i,j  ) + alpha3(i,j  )     +
67  !             Pext(i,j+1) * ( alpha1(i,j+1) + alpha4(i,j+1)
68  ! localise  au point  ... V (i,j) ...
69  !
70  !  pbarxy(i,j)= Pext(i,j) *alpha2(i,j) + Pext(i+1,j) *alpha3(i+1,j) +
71  !           Pext(i,j+1)*alpha1(i,j+1)+ Pext(i+1,j+1)*alpha4(i+1,j+1)
72  ! localise  au point  ... Z (i,j) ...
73  !
74  !
75  !
76  !=======================================================================
77
78
79  INCLUDE "dimensions.h"
80  INCLUDE "paramet.h"
81
82  REAL :: pext( ip1jmp1 ),  pbarx ( ip1jmp1 )
83  REAL :: pbary(  ip1jm  ),  pbarxy(  ip1jm  )
84
85  INTEGER :: ij
86
87
88
89  DO ij = 1, ip1jmp1 - 1
90  pbarx( ij ) = pext(ij) * alpha1p2(ij) + pext(ij+1)*alpha3p4(ij+1)
91  END DO
92
93  !    .... correction pour pbarx( iip1,j) .....
94
95  !    ...    pbarx(iip1,j)= pbarx(1,j) ...
96  !DIR$ IVDEP
97  DO ij = iip1, ip1jmp1, iip1
98  pbarx( ij ) = pbarx( ij - iim )
99  END DO
100
101
102  DO ij = 1,ip1jm
103  pbary( ij ) = pext(   ij  )   * alpha2p3(   ij   )     + &
104        pext( ij+iip1 ) * alpha1p4( ij+iip1 )
105  END DO
106
107
108  DO ij = 1, ip1jm - 1
109  pbarxy( ij ) = pext(ij)*alpha2(ij) + pext(ij+1)*alpha3(ij+1) + &
110        pext(ij+iip1)*alpha1(ij+iip1) + pext(ij+iip2)*alpha4(ij+iip2)
111  END DO
112
113
114  !    ....  correction pour     pbarxy( iip1,j )  ........
115
116  !DIR$ IVDEP
117
118  DO ij = iip1, ip1jm, iip1
119  pbarxy( ij ) = pbarxy( ij - iim )
120  END DO
121
122
123  RETURN
124END SUBROUTINE pbar
Note: See TracBrowser for help on using the repository browser.