source: LMDZ5/trunk/libf/dyn3dmem/psextbar.F @ 1632

Last change on this file since 1632 was 1632, checked in by Laurent Fairhead, 12 years ago

Import initial du répertoire dyn3dmem

Attention! ceci n'est qu'une version préliminaire du code "basse mémoire":
le code contenu dans ce répertoire est basé sur la r1320 et a donc besoin
d'être mis à jour par rapport à la dynamique parallèle d'aujourd'hui.
Ce code est toutefois mis à disposition pour circonvenir à des problèmes
de mémoire que certaines configurations du modèle pourraient rencontrer.
Dans l'état, il compile et tourne sur vargas et au CCRT


Initial import of dyn3dmem

Warning! this is just a preliminary version of the memory light code:
it is based on r1320 of the code and thus needs to be updated before
it can replace the present dyn3dpar code. It is nevertheless put at your
disposal to circumvent some memory problems some LMDZ configurations may
encounter. In its present state, it will compile and run on vargas and CCRT

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