source: LMDZ6/trunk/libf/dyn3d_common/psextbar.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: 2.9 KB
Line 
1!
2! $Header$
3!
4SUBROUTINE psextbar ( ps, psexbarxy )
5  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
6  USE paramet_mod_h, ONLY: iip1, iip2, iip3, jjp1, llmp1, llmp2, llmm1, kftd, ip1jm, ip1jmp1, &
7          ip1jmi1, ijp1llm, ijmllm, mvar, jcfil, jcfllm
8IMPLICIT NONE
9
10  !=======================================================================
11  !
12  !   Auteur:  P. Le Van
13  !   -------
14  !
15  !   Objet:
16  !   ------
17  !
18  ! **********************************************************************
19  ! calcul des moyennes en x et en y de (pression au sol*aire variable) ..
20  ! **********************************************************************
21  !
22  !     ps          est un  argum. d'entree  pour le s-pg ..
23  !     psexbarxy   est un  argum. de sortie pour le s-pg ..
24  !
25  !   Methode:
26  !   --------
27  !
28  !    A chaque point scalaire P (i,j) est affecte 4 coefficients d'aires
29  !   alpha1(i,j)  calcule  au point ( i+1/4,j-1/4 )
30  !   alpha2(i,j)  calcule  au point ( i+1/4,j+1/4 )
31  !   alpha3(i,j)  calcule  au point ( i-1/4,j+1/4 )
32  !   alpha4(i,j)  calcule  au point ( i-1/4,j-1/4 )
33  !
34  !    Avec  alpha1(i,j) = aire(i+1/4,j-1/4)/ aire(i,j)
35  !
36  !    N.B .  Pour plus de details, voir s-pg  ...  iniconst ...
37  !
38  !
39  !
40  !   alpha4 .         . alpha1    . alpha4
41  !    (i,j)             (i,j)       (i+1,j)
42  !
43  !         P .        U .          . P
44  !       (i,j)       (i,j)         (i+1,j)
45  !
46  !   alpha3 .         . alpha2    .alpha3
47  !    (i,j)              (i,j)     (i+1,j)
48  !
49  !         V .        Z .          . V
50  !       (i,j)
51  !
52  !   alpha4 .         . alpha1    .alpha4
53  !   (i,j+1)            (i,j+1)   (i+1,j+1)
54  !
55  !         P .        U .          . P
56  !      (i,j+1)                    (i+1,j+1)
57  !
58  !
59  !
60  !
61  !                   On  a :
62  !
63  !    pbarx(i,j) = Pext(i  ,j) * ( alpha1(i  ,j) + alpha2(i,j))      +
64  !             Pext(i+1,j) * ( alpha3(i+1,j) + alpha4(i+1,j) )
65  ! localise  au point  ... U (i,j) ...
66  !
67  !    pbary(i,j) = Pext(i,j  ) * ( alpha2(i,j  ) + alpha3(i,j  )     +
68  !             Pext(i,j+1) * ( alpha1(i,j+1) + alpha4(i,j+1)
69  ! localise  au point  ... V (i,j) ...
70  !
71  !  pbarxy(i,j)= Pext(i,j) *alpha2(i,j) + Pext(i+1,j) *alpha3(i+1,j) +
72  !           Pext(i,j+1)*alpha1(i,j+1)+ Pext(i+1,j+1)*alpha4(i+1,j+1)
73  ! localise  au point  ... Z (i,j) ...
74  !
75  !
76  !
77  !=======================================================================
78  INCLUDE "comgeom.h"
79
80  REAL :: ps( ip1jmp1 ), psexbarxy ( ip1jm ), pext( ip1jmp1 )
81
82  INTEGER :: l, ij
83  !
84
85  DO ij = 1, ip1jmp1
86   pext(ij) = ps(ij) * aire(ij)
87  ENDDO
88
89
90  DO     ij = 1, ip1jm - 1
91  psexbarxy( ij ) = pext(ij)*alpha2(ij) + pext(ij+1)*alpha3(ij+1) + &
92        pext(ij+iip1)*alpha1(ij+iip1) + pext(ij+iip2)*alpha4(ij+iip2)
93  END DO
94
95
96  !    ....  correction pour     psexbarxy( iip1,j )  ........
97
98  !DIR$ IVDEP
99
100  DO ij = iip1, ip1jm, iip1
101  psexbarxy( ij ) = psexbarxy( ij - iim )
102  END DO
103
104
105  RETURN
106END SUBROUTINE psextbar
Note: See TracBrowser for help on using the repository browser.