My Project
 All Classes Files Functions Variables Macros
bernoui_loc.F
Go to the documentation of this file.
1  SUBROUTINE bernoui_loc (ngrid,nlay,pphi,pecin,pbern)
2  USE parallel
3  USE mod_filtreg_p
4  IMPLICIT NONE
5 
6 c=======================================================================
7 c
8 c Auteur: P. Le Van
9 c -------
10 c
11 c Objet:
12 c ------
13 c calcul de la fonction de Bernouilli aux niveaux s .....
14 c phi et ecin sont des arguments d'entree pour le s-pg .......
15 c bern est un argument de sortie pour le s-pg ......
16 c
17 c fonction de Bernouilli = bern = filtre de( geopotentiel +
18 c energ.cinet.)
19 c
20 c=======================================================================
21 c
22 c-----------------------------------------------------------------------
23 c Decalrations:
24 c -------------
25 c
26 #include "dimensions.h"
27 #include "paramet.h"
28 #include "logic.h"
29 c
30 c Arguments:
31 c ----------
32 c
33  INTEGER nlay,ngrid
34  REAL pphi(ijb_u:ije_u,nlay),pecin(ijb_u:ije_u,nlay)
35  REAL pbern(ijb_u:ije_u,nlay)
36 c
37 c Local:
38 c ------
39 c
40  INTEGER ij,l,ijb,ije,jjb,jje
41 c
42 c-----------------------------------------------------------------------
43 c calcul de Bernouilli:
44 c ---------------------
45 c
46  ijb=ij_begin
47  ije=ij_end+iip1
48  if (pole_sud) ije=ij_end
49 
50  jjb=jj_begin
51  jje=jj_end+1
52  if (pole_sud) jje=jj_end
53 
54 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
55  DO l=1,llm
56 
57  DO 4 ij = ijb,ije
58  pbern( ij,l ) = pphi( ij,l ) + pecin( ij,l )
59  4 CONTINUE
60 
61  ENDDO
62 c$OMP END DO NOWAIT
63 c
64 c-----------------------------------------------------------------------
65 c filtre:
66 c -------
67 c
68 
69 
70  CALL filtreg_p( pbern,jjb_u,jje_u,jjb,jje, jjp1, llm,
71  & 2,1, .true., 1 )
72 c
73 c-----------------------------------------------------------------------
74 
75 
76  RETURN
77  END