source: LMDZ6/trunk/libf/dyn3dpar/dteta1_p.F @ 3981

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