source: LMDZ5/branches/LMDZ5-DOFOCO/libf/dyn3dmem/massdair.F @ 2087

Last change on this file since 2087 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: 3.0 KB
Line 
1!
2! $Header$
3!
4      SUBROUTINE massdair( p, masse )
5c
6c *********************************************************************
7c       ....  Calcule la masse d'air  dans chaque maille   ....
8c *********************************************************************
9c
10c    Auteurs : P. Le Van , Fr. Hourdin  .
11c   ..........
12c
13c  ..    p                      est  un argum. d'entree pour le s-pg ...
14c  ..  masse                    est un  argum.de sortie pour le s-pg ...
15c     
16c  ....  p est defini aux interfaces des llm couches   .....
17c
18      IMPLICIT NONE
19c
20#include "dimensions.h"
21#include "paramet.h"
22#include "comconst.h"
23#include "comgeom.h"
24c
25c  .....   arguments  ....
26c
27      REAL p(ip1jmp1,llmp1), masse(ip1jmp1,llm)
28
29c   ....  Variables locales  .....
30
31      INTEGER l,ij
32      REAL massemoyn, massemoys
33
34      REAL SSUM
35c
36c
37c   Methode pour calculer massebx et masseby .
38c   ----------------------------------------
39c
40c    A chaque point scalaire P (i,j) est affecte 4 coefficients d'aires
41c       alpha1(i,j)  calcule  au point ( i+1/4,j-1/4 )
42c       alpha2(i,j)  calcule  au point ( i+1/4,j+1/4 )
43c       alpha3(i,j)  calcule  au point ( i-1/4,j+1/4 )
44c       alpha4(i,j)  calcule  au point ( i-1/4,j-1/4 )
45c
46c    Avec  alpha1(i,j) = aire(i+1/4,j-1/4)/ aire(i,j)       
47c
48c    N.B .  Pour plus de details, voir s-pg  ...  iniconst ...
49c
50c
51c
52c   alpha4 .         . alpha1    . alpha4
53c    (i,j)             (i,j)       (i+1,j)
54c
55c             P .        U .          . P
56c           (i,j)       (i,j)         (i+1,j)
57c
58c   alpha3 .         . alpha2    .alpha3
59c    (i,j)              (i,j)     (i+1,j)
60c
61c             V .        Z .          . V
62c           (i,j)
63c
64c   alpha4 .         . alpha1    .alpha4
65c   (i,j+1)            (i,j+1)   (i+1,j+1)
66c
67c             P .        U .          . P
68c          (i,j+1)                    (i+1,j+1)
69c
70c
71c
72c                       On  a :
73c
74c    massebx(i,j) = masse(i  ,j) * ( alpha1(i  ,j) + alpha2(i,j))   +
75c                   masse(i+1,j) * ( alpha3(i+1,j) + alpha4(i+1,j) )
76c     localise  au point  ... U (i,j) ...
77c
78c    masseby(i,j) = masse(i,j  ) * ( alpha2(i,j  ) + alpha3(i,j  )  +
79c                   masse(i,j+1) * ( alpha1(i,j+1) + alpha4(i,j+1) 
80c     localise  au point  ... V (i,j) ...
81c
82c
83c=======================================================================
84
85      DO   100    l = 1 , llm
86c
87        DO    ij     = 1, ip1jmp1
88         masse(ij,l) = airesurg(ij) * ( p(ij,l) - p(ij,l+1) )
89        ENDDO
90c
91        DO   ij = 1, ip1jmp1,iip1
92         masse(ij+ iim,l) = masse(ij,l)
93        ENDDO
94c
95c       DO    ij     = 1,  iim
96c        masse(   ij   ,l) = masse(   ij   ,l) * aire(  ij    )
97c        masse(ij+ip1jm,l) = masse(ij+ip1jm,l) * aire(ij+ip1jm)
98c       ENDDO
99c        massemoyn         = SSUM(iim,masse(   1   ,l),1)/ apoln
100c        massemoys         = SSUM(iim,masse(ip1jm+1,l),1)/ apols
101c       DO    ij     = 1, iip1
102c        masse(   ij   ,l )    = massemoyn
103c        masse(ij+ip1jm,l )    = massemoys
104c       ENDDO
105       
106100   CONTINUE
107c
108      RETURN
109      END
Note: See TracBrowser for help on using the repository browser.