source: LMDZ6/trunk/libf/dyn3d_common/pbar.f90 @ 5248

Last change on this file since 5248 was 5246, checked in by abarral, 20 hours ago

Convert fixed-form to free-form sources .F -> .{f,F}90
(WIP: some .F remain, will be handled in subsequent commits)

  • 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  IMPLICIT NONE
6
7  !=======================================================================
8  !
9  !   Auteur:  P. Le Van
10  !   -------
11  !
12  !   Objet:
13  !   ------
14  !
15  ! **********************************************************************
16  ! calcul des moyennes en x et en y de (pression au sol*aire variable) ..
17  ! *********************************************************************
18  !
19  !      pext               est  un argum. d'entree  pour le s-pg ..
20  ! pbarx,pbary et pbarxy  sont des argum. de sortie pour le s-pg ..
21  !
22  !   Methode:
23  !   --------
24  !
25  !    A chaque point scalaire P (i,j) est affecte 4 coefficients d'aires
26  !   alpha1(i,j)  calcule  au point ( i+1/4,j-1/4 )
27  !   alpha2(i,j)  calcule  au point ( i+1/4,j+1/4 )
28  !   alpha3(i,j)  calcule  au point ( i-1/4,j+1/4 )
29  !   alpha4(i,j)  calcule  au point ( i-1/4,j-1/4 )
30  !
31  !    Avec  alpha1(i,j) = aire(i+1/4,j-1/4)/ aire(i,j)
32  !
33  !    N.B .  Pour plus de details, voir s-pg  ...  iniconst ...
34  !
35  !
36  !
37  !   alpha4 .         . alpha1    . alpha4
38  !    (i,j)             (i,j)       (i+1,j)
39  !
40  !         P .        U .          . P
41  !       (i,j)       (i,j)         (i+1,j)
42  !
43  !   alpha3 .         . alpha2    .alpha3
44  !    (i,j)              (i,j)     (i+1,j)
45  !
46  !         V .        Z .          . V
47  !       (i,j)
48  !
49  !   alpha4 .         . alpha1    .alpha4
50  !   (i,j+1)            (i,j+1)   (i+1,j+1)
51  !
52  !         P .        U .          . P
53  !      (i,j+1)                    (i+1,j+1)
54  !
55  !
56  !
57  !
58  !                   On  a :
59  !
60  !    pbarx(i,j) = Pext(i  ,j) * ( alpha1(i  ,j) + alpha2(i,j))      +
61  !             Pext(i+1,j) * ( alpha3(i+1,j) + alpha4(i+1,j) )
62  ! localise  au point  ... U (i,j) ...
63  !
64  !    pbary(i,j) = Pext(i,j  ) * ( alpha2(i,j  ) + alpha3(i,j  )     +
65  !             Pext(i,j+1) * ( alpha1(i,j+1) + alpha4(i,j+1)
66  ! localise  au point  ... V (i,j) ...
67  !
68  !  pbarxy(i,j)= Pext(i,j) *alpha2(i,j) + Pext(i+1,j) *alpha3(i+1,j) +
69  !           Pext(i,j+1)*alpha1(i,j+1)+ Pext(i+1,j+1)*alpha4(i+1,j+1)
70  ! localise  au point  ... Z (i,j) ...
71  !
72  !
73  !
74  !=======================================================================
75
76
77  INCLUDE "dimensions.h"
78  INCLUDE "paramet.h"
79
80  INCLUDE "comgeom.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.