source: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/psextbar.f90 @ 5209

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