1 |
! |
module massbar_m |
2 |
! $Header: /home/cvsroot/LMDZ4/libf/dyn3d/massbar.F,v 1.1.1.1 2004/05/19 12:53:05 lmdzadmin Exp $ |
|
3 |
! |
IMPLICIT NONE |
4 |
SUBROUTINE massbar( masse, massebx, masseby ) |
|
5 |
c |
contains |
6 |
c ********************************************************************** |
|
7 |
c |
SUBROUTINE massbar(masse, massebx, masseby) |
8 |
c Calcule les moyennes en x et y de la masse d'air dans chaque maille. |
|
9 |
c ********************************************************************** |
! From LMDZ4/libf/dyn3d/massbar.F, version 1.1.1.1, 2004/05/19 12:53:05 |
10 |
c Auteurs : P. Le Van , Fr. Hourdin . |
! Authors: P. Le Van, F. Hourdin. |
11 |
c .......... |
|
12 |
c |
! Calcule les moyennes en x et y de la masse d'air dans chaque |
13 |
c .. masse est un argum. d'entree pour le s-pg ... |
! maille. Cf. "inigeom.txt" et "massbar.txt". |
14 |
c .. massebx,masseby sont des argum. de sortie pour le s-pg ... |
|
15 |
c |
USE comgeom, ONLY: alpha1p2, alpha1p4, alpha2p3, alpha3p4 |
16 |
c |
USE dimens_m, ONLY: iim, llm |
17 |
c IMPLICIT NONE |
USE paramet_m, ONLY: iip1, ip1jm, ip1jmp1 |
18 |
c |
|
19 |
use dimens_m |
REAL, intent(in):: masse(ip1jmp1, llm) |
20 |
use paramet_m |
real, intent(out):: massebx(ip1jmp1, llm), masseby(ip1jm, llm) |
21 |
use comconst |
|
22 |
use comgeom |
! Local: |
23 |
c |
integer l, ij |
24 |
REAL masse( ip1jmp1,llm ), massebx( ip1jmp1,llm ) , |
|
25 |
* masseby( ip1jm,llm ) |
!-------------------------------------------------------------- |
26 |
c |
|
27 |
c |
DO l = 1, llm |
28 |
c Methode pour calculer massebx et masseby . |
DO ij = 1, ip1jmp1 - 1 |
29 |
c ---------------------------------------- |
massebx(ij, l) = masse(ij, l) * alpha1p2(ij) + & |
30 |
c |
masse(ij+1, l) * alpha3p4(ij+1) |
31 |
c A chaque point scalaire P (i,j) est affecte 4 coefficients d'aires |
ENDDO |
32 |
c alpha1(i,j) calcule au point ( i+1/4,j-1/4 ) |
|
33 |
c alpha2(i,j) calcule au point ( i+1/4,j+1/4 ) |
! correction pour massebx(iip1, j) |
34 |
c alpha3(i,j) calcule au point ( i-1/4,j+1/4 ) |
! massebx(iip1, j)= massebx(1, j) |
35 |
c alpha4(i,j) calcule au point ( i-1/4,j-1/4 ) |
DO ij = iip1, ip1jmp1, iip1 |
36 |
c |
massebx(ij, l) = massebx(ij - iim, l) |
37 |
c Avec alpha1(i,j) = aire(i+1/4,j-1/4)/ aire(i,j) |
ENDDO |
38 |
c |
|
39 |
c N.B . Pour plus de details, voir s-pg ... iniconst ... |
DO ij = 1, ip1jm |
40 |
c |
masseby(ij, l) = masse(ij, l) * alpha2p3(ij) + & |
41 |
c |
masse(ij+iip1, l) * alpha1p4(ij+iip1) |
42 |
c |
ENDDO |
43 |
c alpha4 . . alpha1 . alpha4 |
end DO |
44 |
c (i,j) (i,j) (i+1,j) |
|
45 |
c |
END SUBROUTINE massbar |
46 |
c P . U . . P |
|
47 |
c (i,j) (i,j) (i+1,j) |
end module massbar_m |
|
c |
|
|
c alpha3 . . alpha2 .alpha3 |
|
|
c (i,j) (i,j) (i+1,j) |
|
|
c |
|
|
c V . Z . . V |
|
|
c (i,j) |
|
|
c |
|
|
c alpha4 . . alpha1 .alpha4 |
|
|
c (i,j+1) (i,j+1) (i+1,j+1) |
|
|
c |
|
|
c P . U . . P |
|
|
c (i,j+1) (i+1,j+1) |
|
|
c |
|
|
c |
|
|
c |
|
|
c On a : |
|
|
c |
|
|
c massebx(i,j) = masse(i ,j) * ( alpha1(i ,j) + alpha2(i,j)) + |
|
|
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 |
|