1 |
! |
module nxgrad_m |
2 |
! $Header: /home/cvsroot/LMDZ4/libf/dyn3d/nxgrad.F,v 1.1.1.1 2004/05/19 12:53:05 lmdzadmin Exp $ |
|
3 |
! |
IMPLICIT NONE |
4 |
SUBROUTINE nxgrad (klevel, rot, x, y ) |
|
5 |
c |
contains |
6 |
c P. Le Van |
|
7 |
c |
SUBROUTINE nxgrad(klevel, rot, x, y) |
8 |
c ******************************************************************** |
|
9 |
c calcul du gradient tourne de pi/2 du rotationnel du vect.v |
! From LMDZ4/libf/dyn3d/nxgrad.F, version 1.1.1.1, 2004/05/19 12:53:05 |
10 |
c ******************************************************************** |
! P. Le Van |
11 |
c rot est un argument d'entree pour le s-prog |
|
12 |
c x et y sont des arguments de sortie pour le s-prog |
! calcul du gradient tourne de pi/2 du rotationnel du vect.v |
13 |
c |
|
14 |
use dimens_m |
! rot est un argument d'entree pour le s-prog |
15 |
use paramet_m |
! x et y sont des arguments de sortie pour le s-prog |
16 |
use comgeom |
|
17 |
IMPLICIT NONE |
USE dimensions |
18 |
c |
USE paramet_m |
19 |
INTEGER klevel |
USE comgeom |
20 |
REAL rot( ip1jm,klevel ),x( ip1jmp1,klevel ),y(ip1jm,klevel ) |
|
21 |
INTEGER l,ij |
INTEGER, INTENT (IN) :: klevel |
22 |
c |
REAL rot(ip1jm, klevel), x(ip1jmp1, klevel), y(ip1jm, klevel) |
23 |
c |
INTEGER l, ij |
24 |
DO 10 l = 1,klevel |
|
25 |
c |
!--------------------------------------------------------------------- |
26 |
DO 1 ij = 2, ip1jm |
|
27 |
y( ij,l ) = ( rot( ij,l ) - rot( ij-1,l ) ) * cvsurcuv( ij ) |
DO l = 1, klevel |
28 |
1 CONTINUE |
|
29 |
c |
DO ij = 2, ip1jm |
30 |
c ..... correction pour y ( 1,j,l ) ...... |
y(ij, l) = (rot(ij, l)-rot(ij-1, l))*cvsurcuv(ij) |
31 |
c |
END DO |
32 |
c .... y(1,j,l)= y(iip1,j,l) .... |
|
33 |
CDIR$ IVDEP |
! correction pour y (1, j, l) |
34 |
DO 2 ij = 1, ip1jm, iip1 |
|
35 |
y( ij,l ) = y( ij +iim,l ) |
! y(1, j, l)= y(iip1, j, l) |
36 |
2 CONTINUE |
! DIR$ IVDEP |
37 |
c |
DO ij = 1, ip1jm, iip1 |
38 |
DO 4 ij = iip2,ip1jm |
y(ij, l) = y(ij+iim, l) |
39 |
x( ij,l ) = ( rot( ij,l ) - rot( ij -iip1,l ) ) * cusurcvu( ij ) |
END DO |
40 |
4 CONTINUE |
|
41 |
DO 6 ij = 1,iip1 |
DO ij = iip2, ip1jm |
42 |
x( ij ,l ) = 0. |
x(ij, l) = (rot(ij, l)-rot(ij-iip1, l))*cusurcvu(ij) |
43 |
x( ij +ip1jm,l ) = 0. |
END DO |
44 |
6 CONTINUE |
DO ij = 1, iip1 |
45 |
c |
x(ij, l) = 0. |
46 |
10 CONTINUE |
x(ij+ip1jm, l) = 0. |
47 |
RETURN |
END DO |
48 |
END |
|
49 |
|
END DO |
50 |
|
RETURN |
51 |
|
END SUBROUTINE nxgrad |
52 |
|
|
53 |
|
end module nxgrad_m |