source: LMDZ5/branches/IPSLCM6.0.11/libf/dyn3d_common/massbar.F90 @ 5426

Last change on this file since 5426 was 2336, checked in by dcugnet, 9 years ago
  • Add parallel capability for ce0l.
  • Small bug in grid_noro fixed (smoothed topography was used instead of unsmoothed one for geopotential computation at north pole).
  • Removed average of mass at poles in etat0dyn_netcdf after start_init_dyn => different results in the zoomed grid case.
  • ok_etat0=n and ok_limit=y combination now works fine (if no initial state is needed, but only limit.nc file). This required:
    • to move grid_noro0 and start_init_noro0 subroutines from etat0dyn_netcdf.F90 to limit_netcdf.F90
    • to create init_ssrf_m.F90 file, so that sub-surfaces can be initialized from limit_netcdf.F90 without any etat0*_netcdf routines call).
  • Simplified somehow the corresponding code, in particular: 1) removed obsolete flags "oldice". 2) removed flag "ibar": barycentric interpolation is used everywhere (except in start_init_subsurf, still calling grille_m - to be changed soon). 3) removed useless CPP_PHY precompilation directives, considering the possibility to run ce0l without physics is useless (ce0l is dedicated to Earth physics).
  • 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  IMPLICIT NONE
9  include "dimensions.h"
10  include "paramet.h"
11  include "comgeom.h"
12!===============================================================================
13! Arguments:
14  REAL, INTENT(IN)  :: masse  (ip1jmp1,llm)
15  REAL, INTENT(OUT) :: massebx(ip1jmp1,llm)
16  REAL, INTENT(OUT) :: masseby(ip1jm  ,llm)
17!-------------------------------------------------------------------------------
18! Method used. Each scalar point is associated to 4 area coefficients:
19!    * alpha1(i,j) at point ( i+1/4,j-1/4 )
20!    * alpha2(i,j) at point ( i+1/4,j+1/4 )
21!    * alpha3(i,j) at point ( i-1/4,j+1/4 )
22!    * alpha4(i,j) at point ( i-1/4,j-1/4 )
23! where alpha1(i,j) = aire(i+1/4,j-1/4)/ aire(i,j)
24!
25!   alpha4 .         . alpha1    . alpha4
26!    (i,j)             (i,j)       (i+1,j)
27!
28!             P .        U .          . P
29!           (i,j)       (i,j)         (i+1,j)
30!
31!   alpha3 .         . alpha2    .alpha3
32!    (i,j)              (i,j)     (i+1,j)
33!
34!             V .        Z .          . V
35!           (i,j)
36!
37!   alpha4 .         . alpha1    .alpha4
38!   (i,j+1)            (i,j+1)   (i+1,j+1)
39!
40!             P .        U .          . P
41!          (i,j+1)                    (i+1,j+1)
42!
43!
44!    massebx(i,j) = masse(i  ,j) * ( alpha1(i  ,j) + alpha2(i,j))   +
45!                   masse(i+1,j) * ( alpha3(i+1,j) + alpha4(i+1,j) )
46!     localized at point  ... U (i,j) ...
47!
48!    masseby(i,j) = masse(i,j  ) * ( alpha2(i,j  ) + alpha3(i,j  )  +
49!                   masse(i,j+1) * ( alpha1(i,j+1) + alpha4(i,j+1) 
50!     localized at point  ... V (i,j) ...
51!===============================================================================
52! Local variables:
53  INTEGER :: ij, l
54!===============================================================================
55  DO l=1,llm
56    DO ij=1,ip1jmp1-1
57      massebx(ij,l)=masse(ij,l)*alpha1p2(ij)+masse(ij+1   ,l)*alpha3p4(ij+1)
58    END DO
59    DO ij=iip1,ip1jmp1,iip1; massebx(ij,l)=massebx(ij-iim,l); END DO
60    DO ij=1,ip1jm
61      masseby(ij,l)=masse(ij,l)*alpha2p3(ij)+masse(ij+iip1,l)*alpha1p4(ij+iip1)
62    END DO
63  END DO
64
65END SUBROUTINE massbar
66
Note: See TracBrowser for help on using the repository browser.