1 |
! |
SUBROUTINE massbar( masse, massebx, masseby ) |
2 |
! $Header: /home/cvsroot/LMDZ4/libf/dyn3d/massbar.F,v 1.1.1.1 2004/05/19 12:53:05 lmdzadmin Exp $ |
|
3 |
! |
! From LMDZ4/libf/dyn3d/massbar.F,v 1.1.1.1 2004/05/19 12:53:05 |
4 |
SUBROUTINE massbar( masse, massebx, masseby ) |
|
5 |
c |
! |
6 |
c ********************************************************************** |
! ********************************************************************** |
7 |
c |
! |
8 |
c Calcule les moyennes en x et y de la masse d'air dans chaque maille. |
! Calcule les moyennes en x et y de la masse d'air dans chaque maille. |
9 |
c ********************************************************************** |
! ********************************************************************** |
10 |
c Auteurs : P. Le Van , Fr. Hourdin . |
! Auteurs : P. Le Van , Fr. Hourdin . |
11 |
c .......... |
! .......... |
12 |
c |
! |
13 |
c .. masse est un argum. d'entree pour le s-pg ... |
! .. masse est un argum. d'entree pour le s-pg ... |
14 |
c .. massebx,masseby sont des argum. de sortie pour le s-pg ... |
! .. massebx,masseby sont des argum. de sortie pour le s-pg ... |
15 |
c |
! |
16 |
c |
! |
17 |
c IMPLICIT NONE |
! IMPLICIT NONE |
18 |
c |
! |
19 |
use dimens_m |
use dimens_m |
20 |
use paramet_m |
use paramet_m |
21 |
use comconst |
use comconst |
22 |
use comgeom |
use comgeom |
23 |
c |
! |
24 |
REAL masse( ip1jmp1,llm ), massebx( ip1jmp1,llm ) , |
REAL masse( ip1jmp1,llm ), massebx( ip1jmp1,llm ) , & |
25 |
* masseby( ip1jm,llm ) |
masseby( ip1jm,llm ) |
26 |
c |
! |
27 |
c |
! |
28 |
c Methode pour calculer massebx et masseby . |
! Méthode pour calculer massebx et masseby. A chaque point scalaire |
29 |
c ---------------------------------------- |
! P(i, j) sont affectés quatre coefficients d'aire. |
30 |
c |
|
31 |
c A chaque point scalaire P (i,j) est affecte 4 coefficients d'aires |
! alpha1(i, j) calculé au point (i + 1/4, j - 1/4) |
32 |
c alpha1(i,j) calcule au point ( i+1/4,j-1/4 ) |
! alpha2(i, j) calculé au point (i + 1/4, j + 1/4) |
33 |
c alpha2(i,j) calcule au point ( i+1/4,j+1/4 ) |
! alpha3(i, j) calculé au point (i - 1/4, j + 1/4) |
34 |
c alpha3(i,j) calcule au point ( i-1/4,j+1/4 ) |
! alpha4(i, j) calculé au point (i - 1/4, j - 1/4) |
35 |
c alpha4(i,j) calcule au point ( i-1/4,j-1/4 ) |
|
36 |
c |
! Avec alpha1(i, j) = aire(i + 1/4, j - 1/4)/ aire(i, j) |
37 |
c Avec alpha1(i,j) = aire(i+1/4,j-1/4)/ aire(i,j) |
|
38 |
c |
! Pour plus de détails, voir sous-programme "iniconst" et |
39 |
c N.B . Pour plus de details, voir s-pg ... iniconst ... |
! "massbar.txt". |
40 |
c |
|
41 |
c |
|
42 |
c |
DO l = 1 , llm |
43 |
c alpha4 . . alpha1 . alpha4 |
! |
44 |
c (i,j) (i,j) (i+1,j) |
DO ij = 1, ip1jmp1 - 1 |
45 |
c |
massebx(ij,l) = masse( ij, l) * alpha1p2( ij ) + & |
46 |
c P . U . . P |
masse(ij+1, l) * alpha3p4(ij+1 ) |
47 |
c (i,j) (i,j) (i+1,j) |
ENDDO |
48 |
c |
|
49 |
c alpha3 . . alpha2 .alpha3 |
! .... correction pour massebx( iip1,j) ..... |
50 |
c (i,j) (i,j) (i+1,j) |
! ... massebx(iip1,j)= massebx(1,j) ... |
51 |
c |
! |
52 |
c V . Z . . V |
!DIR$ IVDEP |
53 |
c (i,j) |
DO ij = iip1, ip1jmp1, iip1 |
54 |
c |
massebx( ij,l ) = massebx( ij - iim,l ) |
55 |
c alpha4 . . alpha1 .alpha4 |
ENDDO |
56 |
c (i,j+1) (i,j+1) (i+1,j+1) |
|
57 |
c |
|
58 |
c P . U . . P |
DO ij = 1,ip1jm |
59 |
c (i,j+1) (i+1,j+1) |
masseby( ij,l ) = masse( ij , l ) * alpha2p3( ij ) + & |
60 |
c |
masse(ij+iip1, l ) * alpha1p4( ij+iip1 ) |
61 |
c |
ENDDO |
62 |
c |
|
63 |
c On a : |
end DO |
64 |
c |
|
65 |
c massebx(i,j) = masse(i ,j) * ( alpha1(i ,j) + alpha2(i,j)) + |
END SUBROUTINE massbar |
|
c masse(i+1,j) * ( alpha3(i+1,j) + alpha4(i+1,j) ) |
|
|
c localise au point ... U (i,j) ... |
|
|
c |
|
|
c masseby(i,j) = masse(i,j ) * ( alpha2(i,j ) + alpha3(i,j ) + |
|
|
c masse(i,j+1) * ( alpha1(i,j+1) + alpha4(i,j+1) |
|
|
c localise au point ... V (i,j) ... |
|
|
c |
|
|
c |
|
|
c======================================================================= |
|
|
|
|
|
DO 100 l = 1 , llm |
|
|
c |
|
|
DO ij = 1, ip1jmp1 - 1 |
|
|
massebx(ij,l) = masse( ij, l) * alpha1p2( ij ) + |
|
|
* masse(ij+1, l) * alpha3p4(ij+1 ) |
|
|
ENDDO |
|
|
|
|
|
c .... correction pour massebx( iip1,j) ..... |
|
|
c ... massebx(iip1,j)= massebx(1,j) ... |
|
|
c |
|
|
CDIR$ IVDEP |
|
|
DO ij = iip1, ip1jmp1, iip1 |
|
|
massebx( ij,l ) = massebx( ij - iim,l ) |
|
|
ENDDO |
|
|
|
|
|
|
|
|
DO ij = 1,ip1jm |
|
|
masseby( ij,l ) = masse( ij , l ) * alpha2p3( ij ) + |
|
|
* masse(ij+iip1, l ) * alpha1p4( ij+iip1 ) |
|
|
ENDDO |
|
|
|
|
|
100 CONTINUE |
|
|
c |
|
|
RETURN |
|
|
END |
|