[2336] | 1 | SUBROUTINE massbar(masse,massebx,masseby) |
---|
[524] | 2 | ! |
---|
[2336] | 3 | !------------------------------------------------------------------------------- |
---|
| 4 | ! Authors: P. Le Van , Fr. Hourdin. |
---|
| 5 | !------------------------------------------------------------------------------- |
---|
| 6 | ! Purpose: Compute air mass mean along X and Y in each cell. |
---|
| 7 | ! See iniconst for more details. |
---|
[5281] | 8 | USE comgeom_mod_h |
---|
[5271] | 9 | USE dimensions_mod, ONLY: iim, jjm, llm, ndm |
---|
[5285] | 10 | USE paramet_mod_h |
---|
[5271] | 11 | IMPLICIT NONE |
---|
| 12 | |
---|
[5272] | 13 | |
---|
[2336] | 14 | !=============================================================================== |
---|
| 15 | ! Arguments: |
---|
| 16 | REAL, INTENT(IN) :: masse (ip1jmp1,llm) |
---|
| 17 | REAL, INTENT(OUT) :: massebx(ip1jmp1,llm) |
---|
| 18 | REAL, INTENT(OUT) :: masseby(ip1jm ,llm) |
---|
| 19 | !------------------------------------------------------------------------------- |
---|
| 20 | ! Method used. Each scalar point is associated to 4 area coefficients: |
---|
| 21 | ! * alpha1(i,j) at point ( i+1/4,j-1/4 ) |
---|
| 22 | ! * alpha2(i,j) at point ( i+1/4,j+1/4 ) |
---|
| 23 | ! * alpha3(i,j) at point ( i-1/4,j+1/4 ) |
---|
| 24 | ! * alpha4(i,j) at point ( i-1/4,j-1/4 ) |
---|
| 25 | ! where alpha1(i,j) = aire(i+1/4,j-1/4)/ aire(i,j) |
---|
[524] | 26 | ! |
---|
[2336] | 27 | ! alpha4 . . alpha1 . alpha4 |
---|
| 28 | ! (i,j) (i,j) (i+1,j) |
---|
| 29 | ! |
---|
| 30 | ! P . U . . P |
---|
| 31 | ! (i,j) (i,j) (i+1,j) |
---|
| 32 | ! |
---|
| 33 | ! alpha3 . . alpha2 .alpha3 |
---|
| 34 | ! (i,j) (i,j) (i+1,j) |
---|
| 35 | ! |
---|
| 36 | ! V . Z . . V |
---|
| 37 | ! (i,j) |
---|
| 38 | ! |
---|
| 39 | ! alpha4 . . alpha1 .alpha4 |
---|
| 40 | ! (i,j+1) (i,j+1) (i+1,j+1) |
---|
| 41 | ! |
---|
| 42 | ! P . U . . P |
---|
| 43 | ! (i,j+1) (i+1,j+1) |
---|
| 44 | ! |
---|
| 45 | ! |
---|
| 46 | ! massebx(i,j) = masse(i ,j) * ( alpha1(i ,j) + alpha2(i,j)) + |
---|
| 47 | ! masse(i+1,j) * ( alpha3(i+1,j) + alpha4(i+1,j) ) |
---|
| 48 | ! localized at point ... U (i,j) ... |
---|
| 49 | ! |
---|
| 50 | ! masseby(i,j) = masse(i,j ) * ( alpha2(i,j ) + alpha3(i,j ) + |
---|
| 51 | ! masse(i,j+1) * ( alpha1(i,j+1) + alpha4(i,j+1) |
---|
| 52 | ! localized at point ... V (i,j) ... |
---|
| 53 | !=============================================================================== |
---|
| 54 | ! Local variables: |
---|
| 55 | INTEGER :: ij, l |
---|
| 56 | !=============================================================================== |
---|
| 57 | DO l=1,llm |
---|
| 58 | DO ij=1,ip1jmp1-1 |
---|
| 59 | massebx(ij,l)=masse(ij,l)*alpha1p2(ij)+masse(ij+1 ,l)*alpha3p4(ij+1) |
---|
| 60 | END DO |
---|
| 61 | DO ij=iip1,ip1jmp1,iip1; massebx(ij,l)=massebx(ij-iim,l); END DO |
---|
| 62 | DO ij=1,ip1jm |
---|
| 63 | masseby(ij,l)=masse(ij,l)*alpha2p3(ij)+masse(ij+iip1,l)*alpha1p4(ij+iip1) |
---|
| 64 | END DO |
---|
| 65 | END DO |
---|
[524] | 66 | |
---|
[2336] | 67 | END SUBROUTINE massbar |
---|
[524] | 68 | |
---|