source: LMDZ6/trunk/libf/dyn3dpar/tourpot_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.3 KB
Line 
1      SUBROUTINE tourpot_p ( vcov, ucov, massebxy, vorpot )
2      USE parallel_lmdz
3      IMPLICIT NONE
4
5c=======================================================================
6c
7c   Auteur:  P. Le Van
8c   -------
9c
10c   Objet:
11c   ------
12c
13c    *******************************************************************
14c    .........      calcul du tourbillon potentiel             .........
15c    *******************************************************************
16c
17c     vcov,ucov,fext et pbarxyfl sont des argum. d'entree pour le s-pg .
18c             vorpot            est  un argum.de sortie pour le s-pg .
19c
20c=======================================================================
21
22#include "dimensions.h"
23#include "paramet.h"
24#include "comgeom.h"
25
26      REAL  rot( ip1jm,llm )
27      REAL vcov( ip1jm,llm ),ucov( ip1jmp1,llm )
28      REAL massebxy( ip1jm,llm ),vorpot( ip1jm,llm )
29
30      INTEGER l, ij ,ije,ijb,jje,jjb
31
32
33      ijb=ij_begin-iip1
34      ije=ij_end
35     
36      if (pole_nord) ijb=ij_begin
37     
38     
39c  ... vorpot = ( Filtre( d(vcov)/dx - d(ucov)/dy ) + fext ) /psbarxy ..
40
41
42
43c    ........  Calcul du rotationnel du vent V  puis filtrage  ........
44c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
45      DO 5 l = 1,llm
46
47      if (pole_sud)  ije=ij_end-iip1-1
48      DO 2 ij = ijb, ije
49      rot( ij,l ) = vcov(ij+1,l)-vcov(ij,l)+ucov(ij+iip1,l)-ucov(ij,l)
50   2  CONTINUE
51
52c    ....  correction pour  rot( iip1,j,l )  .....
53c    ....     rot(iip1,j,l) = rot(1,j,l)    .....
54
55CDIR$ IVDEP
56
57      if (pole_sud)  ije=ij_end-iip1
58     
59      DO 3 ij = ijb+iip1-1, ije, iip1
60      rot( ij,l ) = rot( ij -iim, l )
61   3  CONTINUE
62
63   5  CONTINUE
64c$OMP END DO NOWAIT
65      jjb=jj_begin-1
66      jje=jj_end
67     
68      if (pole_nord) jjb=jjb+1
69      if (pole_sud)  jje=jje-1
70      CALL  filtreg_p( rot, jjb,jje,jjm, llm, 2, 1, .FALSE., 1 )
71
72c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)     
73      DO 10 l = 1, llm
74     
75      if (pole_sud)  ije=ij_end-iip1-1 
76     
77      DO 6 ij = ijb, ije
78      vorpot( ij,l ) = ( rot(ij,l) + fext(ij) ) / massebxy(ij,l)
79   6  CONTINUE
80
81c    ..... correction pour  vorpot( iip1,j,l)  .....
82c    ....   vorpot(iip1,j,l)= vorpot(1,j,l) ....
83CDIR$ IVDEP
84      if (pole_sud)  ije=ij_end-iip1
85      DO 8 ij = ijb+iip1-1, ije, iip1
86      vorpot( ij,l ) = vorpot( ij -iim,l )
87   8  CONTINUE
88
89  10  CONTINUE
90c$OMP END DO NOWAIT
91      RETURN
92      END
Note: See TracBrowser for help on using the repository browser.