source: LMDZ6/trunk/libf/dyn3dmem/dteta1_loc.F @ 3982

Last change on this file since 3982 was 2603, checked in by Ehouarn Millour, 8 years ago

Cleanup in the dynamics: turn logic.h into module logic_mod.F90
EM

  • 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.3 KB
Line 
1      SUBROUTINE dteta1_loc ( teta, pbaru, pbarv, dteta)
2      USE parallel_lmdz
3      USE write_field_p
4      USE mod_filtreg_p
5      IMPLICIT NONE
6
7c=======================================================================
8c
9c   Auteur:  P. Le Van
10c   -------
11c Modif F.Forget 03/94 (on retire q et dq  pour construire dteta1)
12c
13c   ********************************************************************
14c   ... calcul du terme de convergence horizontale du flux d'enthalpie
15c        potentielle   ......
16c   ********************************************************************
17c  .. teta,pbaru et pbarv sont des arguments d'entree  pour le s-pg ....
18c     dteta               sont des arguments de sortie pour le s-pg ....
19c
20c=======================================================================
21
22
23      include "dimensions.h"
24      include "paramet.h"
25
26      REAL teta( ijb_u:ije_u,llm )
27      REAL pbaru( ijb_u:ije_u,llm ),pbarv( ijb_v:ije_v,llm)
28      REAL dteta( ijb_u:ije_u,llm )
29      INTEGER   l,ij
30
31      REAL hbyv( ijb_v:ije_v,llm ), hbxu( ijb_u:ije_u,llm )
32
33c
34      INTEGER ijb,ije,jjb,jje
35
36     
37      jjb=jj_begin
38      jje=jj_end
39
40c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)   
41      DO 5 l = 1,llm
42     
43      ijb=ij_begin
44      ije=ij_end
45     
46      if (pole_nord) ijb=ij_begin+iip1
47      if (pole_sud)  ije=ij_end-iip1
48     
49      DO 1  ij = ijb, ije - 1
50        hbxu(ij,l) = pbaru(ij,l) * 0.5 * ( teta(ij,l)+teta(ij+1,l) )
51   1  CONTINUE
52
53c    .... correction pour  hbxu(iip1,j,l)  .....
54c    ....   hbxu(iip1,j,l)= hbxu(1,j,l) ....
55
56CDIR$ IVDEP
57      DO 2 ij = ijb+iip1-1, ije, iip1
58        hbxu( ij, l ) = hbxu( ij - iim, l )
59   2  CONTINUE
60
61      ijb=ij_begin-iip1
62      if (pole_nord) ijb=ij_begin
63     
64      DO 3 ij = ijb,ije
65        hbyv(ij,l)= pbarv(ij, l)* 0.5 * ( teta(ij, l)+teta(ij+iip1,l) )
66   3  CONTINUE
67
68       if (.not. pole_sud) then
69          hbxu(ije+1:ije+iip1,l) = 0
70          hbyv(ije+1:ije+iip1,l) = 0
71        endif
72       
73   5  CONTINUE
74c$OMP END DO NOWAIT
75       
76       
77        CALL  convflu_loc ( hbxu, hbyv, llm, dteta )
78
79
80c    stockage dans  dh de la convergence horizont. filtree' du  flux
81c                  ....                           ...........
82c           d'enthalpie potentielle .
83     
84     
85      CALL filtreg_p( dteta,jjb_u,jje_u,jjb,jje,jjp1, llm,
86     &                2, 2, .true., 1)
87     
88     
89      RETURN
90      END
Note: See TracBrowser for help on using the repository browser.