source: LMDZ5/trunk/libf/dyn3dmem/dudv1_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: 1.7 KB
Line 
1      SUBROUTINE dudv1_loc ( vorpot, pbaru, pbarv, du, dv )
2      USE parallel
3      IMPLICIT NONE
4c
5c-----------------------------------------------------------------------
6c
7c   Auteur:   P. Le Van
8c   -------
9c
10c   Objet:
11c   ------
12c   calcul du terme de  rotation
13c   ce terme est ajoute a  d(ucov)/dt et a d(vcov)/dt  ..
14c   vorpot, pbaru et pbarv sont des arguments d'entree  pour le s-pg ..
15c   du  et dv              sont des arguments de sortie pour le s-pg ..
16c
17c-----------------------------------------------------------------------
18
19#include "dimensions.h"
20#include "paramet.h"
21
22      REAL vorpot( ijb_v:ije_v,llm ) ,pbaru( ijb_u:ije_u,llm ) ,
23     *     pbarv( ijb_v:ije_v,llm )
24      REAL du( ijb_u:ije_u,llm ) ,dv( ijb_v:ije_v,llm )
25      INTEGER  l,ij,ijb,ije
26c
27c
28     
29c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)       
30      DO 10 l = 1,llm
31c
32      ijb=ij_begin
33      ije=ij_end
34     
35      if (pole_nord) ijb=ij_begin+iip1
36      if (pole_sud)  ije=ij_end-iip1
37     
38      DO 2  ij = ijb, ije-1
39      du( ij,l ) = 0.125 *(  vorpot(ij-iip1, l) + vorpot( ij, l)  ) *
40     *                    (   pbarv(ij-iip1, l) + pbarv(ij-iim,  l) +
41     *                        pbarv(   ij  , l) + pbarv(ij+ 1 ,  l)   )
42   2  CONTINUE
43   
44 
45c
46      if (pole_nord) ijb=ij_begin
47     
48      DO 3 ij = ijb, ije-1
49      dv( ij+1,l ) = - 0.125 *(  vorpot(ij, l)  + vorpot(ij+1, l)  ) *
50     *                        (   pbaru(ij, l)  +  pbaru(ij+1   , l) +
51     *                       pbaru(ij+iip1, l)  +  pbaru(ij+iip2, l)  )
52   3  CONTINUE
53c
54c    .... correction  pour  dv( 1,j,l )  .....
55c    ....   dv(1,j,l)= dv(iip1,j,l) ....
56c
57CDIR$ IVDEP
58      DO 4 ij = ijb, ije, iip1
59      dv( ij,l ) = dv( ij + iim, l )
60   4  CONTINUE
61c
62  10  CONTINUE
63c$OMP END DO NOWAIT
64      RETURN
65      END
Note: See TracBrowser for help on using the repository browser.