source: LMDZ6/branches/contrails/libf/dyn3d_common/massbar.f90 @ 5445

Last change on this file since 5445 was 5285, checked in by abarral, 8 weeks ago

As discussed internally, remove generic ONLY: ... for new _mod_h modules

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.4 KB
Line 
1SUBROUTINE massbar(masse,massebx,masseby)
2!
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.
8  USE comgeom_mod_h
9  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
10USE paramet_mod_h
11IMPLICIT NONE
12
13
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)
26!
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
66
67END SUBROUTINE massbar
68
Note: See TracBrowser for help on using the repository browser.