source: LMDZ6/branches/DYNAMICO-conv/libf/dyn3dmem/massbar_loc.F90 @ 5452

Last change on this file since 5452 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
File size: 2.7 KB
Line 
1SUBROUTINE massbar_loc(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 parallel_lmdz
9  IMPLICIT NONE
10  include "dimensions.h"
11  include "paramet.h"
12  include "comgeom.h"
13!===============================================================================
14! Arguments:
15  REAL, INTENT(IN)  :: masse  (ijb_u:ije_u,llm)
16  REAL, INTENT(OUT) :: massebx(ijb_u:ije_u,llm)
17  REAL, INTENT(OUT) :: masseby(ijb_v:ije_v,llm)
18!-------------------------------------------------------------------------------
19! Method used. Each scalar point is associated to 4 area coefficients:
20!    * alpha1(i,j) at point ( i+1/4,j-1/4 )
21!    * alpha2(i,j) at point ( i+1/4,j+1/4 )
22!    * alpha3(i,j) at point ( i-1/4,j+1/4 )
23!    * alpha4(i,j) at point ( i-1/4,j-1/4 )
24! where alpha1(i,j) = aire(i+1/4,j-1/4)/ aire(i,j)
25!
26!   alpha4 .         . alpha1    . alpha4
27!    (i,j)             (i,j)       (i+1,j)
28!
29!             P .        U .          . P
30!           (i,j)       (i,j)         (i+1,j)
31!
32!   alpha3 .         . alpha2    .alpha3
33!    (i,j)              (i,j)     (i+1,j)
34!
35!             V .        Z .          . V
36!           (i,j)
37!
38!   alpha4 .         . alpha1    .alpha4
39!   (i,j+1)            (i,j+1)   (i+1,j+1)
40!
41!             P .        U .          . P
42!          (i,j+1)                    (i+1,j+1)
43!
44!
45!    massebx(i,j) = masse(i  ,j) * ( alpha1(i  ,j) + alpha2(i,j))   +
46!                   masse(i+1,j) * ( alpha3(i+1,j) + alpha4(i+1,j) )
47!     localized at point  ... U (i,j) ...
48!
49!    masseby(i,j) = masse(i,j  ) * ( alpha2(i,j  ) + alpha3(i,j  )  +
50!                   masse(i,j+1) * ( alpha1(i,j+1) + alpha4(i,j+1) 
51!     localized at point  ... V (i,j) ...
52!===============================================================================
53! Local variables:
54  INTEGER :: ij, l, ijb, ije
55!===============================================================================
56!$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 
57  DO l=1,llm
58    ijb=ij_begin
59    ije=ij_end+iip1
60    IF(pole_sud) ije=ije-iip1
61    DO ij=ijb,ije-1
62      massebx(ij,l)=masse(ij,l)*alpha1p2(ij)+masse(ij+1   ,l)*alpha3p4(ij+1)
63    END DO
64    DO ij=ijb+iim,ije+iim,iip1; massebx(ij,l)=massebx(ij-iim,l); END DO
65    ijb=ij_begin-iip1
66    ije=ij_end+iip1
67    IF(pole_nord) ijb=ij_begin
68    IF(pole_sud) ije=ij_end-iip1
69    DO ij=ijb,ije
70      masseby(ij,l)=masse(ij,l)*alpha2p3(ij)+masse(ij+iip1,l)*alpha1p4(ij+iip1)
71    END DO
72  END DO
73!$OMP END DO NOWAIT
74
75END SUBROUTINE massbar_loc
76
Note: See TracBrowser for help on using the repository browser.