source: LMDZ5/trunk/libf/dyn3dmem/nxgrad.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.2 KB
Line 
1!
2! $Header$
3!
4      SUBROUTINE nxgrad (klevel, rot, x, y )
5c
6c     P. Le Van
7c
8c   ********************************************************************
9c      calcul du gradient tourne de pi/2 du rotationnel du vect.v
10c   ********************************************************************
11c       rot          est un argument  d'entree pour le s-prog
12c       x  et y    sont des arguments de sortie pour le s-prog
13c
14      IMPLICIT NONE
15c
16#include "dimensions.h"
17#include "paramet.h"
18#include "comgeom.h"
19      INTEGER klevel
20      REAL rot( ip1jm,klevel ),x( ip1jmp1,klevel ),y(ip1jm,klevel )
21      INTEGER   l,ij
22c
23c
24      DO 10 l = 1,klevel
25c
26      DO 1  ij = 2, ip1jm
27      y( ij,l ) = (  rot( ij,l ) - rot( ij-1,l )  ) * cvsurcuv( ij )
28   1  CONTINUE
29c
30c    ..... correction pour  y ( 1,j,l )  ......
31c
32c    ....    y(1,j,l)= y(iip1,j,l) ....
33CDIR$ IVDEP
34      DO 2  ij = 1, ip1jm, iip1
35      y( ij,l ) = y( ij +iim,l )
36   2  CONTINUE
37c
38      DO 4  ij = iip2,ip1jm
39      x( ij,l ) = (  rot( ij,l ) - rot( ij -iip1,l )  ) * cusurcvu( ij )
40   4  CONTINUE
41      DO 6 ij = 1,iip1
42      x(    ij    ,l ) = 0.
43      x( ij +ip1jm,l ) = 0.
44   6  CONTINUE
45c
46  10  CONTINUE
47      RETURN
48      END
Note: See TracBrowser for help on using the repository browser.