source: LMDZ5/trunk/libf/dyn3dmem/tourpot_loc.F @ 1907

Last change on this file since 1907 was 1907, checked in by lguez, 10 years ago

Added a copyright property to every file of the distribution, except
for the fcm files (which have their own copyright). Use svn propget on
a file to see the copyright. For instance:

$ svn propget copyright libf/phylmd/physiq.F90
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

Also added the files defining the CeCILL version 2 license, in French
and English, at the top of the LMDZ tree.

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