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

Last change on this file since 1632 was 1632, checked in by Laurent Fairhead, 12 years ago

Import initial du répertoire dyn3dmem

Attention! ceci n'est qu'une version préliminaire du code "basse mémoire":
le code contenu dans ce répertoire est basé sur la r1320 et a donc besoin
d'être mis à jour par rapport à la dynamique parallèle d'aujourd'hui.
Ce code est toutefois mis à disposition pour circonvenir à des problèmes
de mémoire que certaines configurations du modèle pourraient rencontrer.
Dans l'état, il compile et tourne sur vargas et au CCRT


Initial import of dyn3dmem

Warning! this is just a preliminary version of the memory light code:
it is based on r1320 of the code and thus needs to be updated before
it can replace the present dyn3dpar code. It is nevertheless put at your
disposal to circumvent some memory problems some LMDZ configurations may
encounter. In its present state, it will compile and run on vargas and CCRT

File size: 2.4 KB
Line 
1      SUBROUTINE tourpot_loc ( vcov, ucov, massebxy, vorpot )
2      USE parallel
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.