1 |
|
module rotatf_m |
2 |
|
|
3 |
! $Header: /home/cvsroot/LMDZ4/libf/dyn3d/rotatf.F,v 1.1.1.1 2004/05/19 |
IMPLICIT NONE |
|
! 12:53:05 lmdzadmin Exp $ |
|
4 |
|
|
5 |
SUBROUTINE rotatf(klevel, x, y, rot) |
contains |
6 |
|
|
7 |
! Auteur : P.Le Van |
SUBROUTINE rotatf(klevel, x, y, rot) |
|
! ************************************************************** |
|
|
! . calcule le rotationnel |
|
|
! a tous les niveaux d'1 vecteur de comp. x et y .. |
|
|
! x et y etant des composantes covariantes ... |
|
|
! ******************************************************************** |
|
|
! klevel, x et y sont des arguments d'entree pour le s-prog |
|
|
! rot est un argument de sortie pour le s-prog |
|
|
|
|
|
USE dimens_m |
|
|
USE paramet_m |
|
|
USE comgeom |
|
|
USE filtreg_m, ONLY: filtreg |
|
|
IMPLICIT NONE |
|
8 |
|
|
9 |
|
! From LMDZ4/libf/dyn3d/rotatf.F, version 1.1.1.1 2004/05/19 12:53:05 |
10 |
|
|
11 |
! ..... variables en arguments ...... |
! Author: P.Le Van |
12 |
|
|
13 |
INTEGER, INTENT (IN) :: klevel |
! Calcule le rotationnel à tous les niveaux d'un vecteur de |
14 |
REAL rot(ip1jm, klevel) |
! composantes covariantes x et y. |
|
REAL, INTENT (IN) :: x(ip1jmp1, klevel), y(ip1jm, klevel) |
|
15 |
|
|
16 |
! ... variables locales ... |
USE dimens_m |
17 |
|
USE paramet_m |
18 |
|
USE comgeom |
19 |
|
USE filtreg_m, ONLY: filtreg |
20 |
|
|
|
INTEGER l, ij |
|
21 |
|
|
22 |
|
! ..... variables en arguments ...... |
23 |
|
|
24 |
DO l = 1, klevel |
INTEGER, INTENT (IN) :: klevel |
25 |
|
! klevel, x et y sont des arguments d'entree pour le s-prog |
26 |
|
! rot est un argument de sortie pour le s-prog |
27 |
|
|
28 |
DO ij = 1, ip1jm - 1 |
REAL rot(iim + 1, jjm, klevel) |
29 |
rot(ij, l) = y(ij+1, l) - y(ij, l) + x(ij+iip1, l) - x(ij, l) |
REAL, INTENT (IN) :: x(iim + 1, jjm + 1, klevel), y(iim + 1, jjm, klevel) |
|
END DO |
|
30 |
|
|
31 |
! .... correction pour rot( iip1,j,l) .... |
! ... variables locales ... |
|
! .... rot(iip1,j,l)= rot(1,j,l) ... |
|
|
! DIR$ IVDEP |
|
|
DO ij = iip1, ip1jm, iip1 |
|
|
rot(ij, l) = rot(ij-iim, l) |
|
|
END DO |
|
32 |
|
|
33 |
END DO |
INTEGER l, i, j |
34 |
|
|
35 |
|
|
36 |
|
DO l = 1, klevel |
37 |
|
forall (i = 1:iim, j = 1:jjm) rot(i, j, l) = y(i + 1, j, l) & |
38 |
|
- y(i, j, l) + x(i, j + 1, l) - x(i, j, l) |
39 |
|
rot(iim + 1, :, l) = rot(1, :, l) |
40 |
|
END DO |
41 |
|
|
42 |
CALL filtreg(rot, jjm, klevel, 2, 2, .FALSE.) |
CALL filtreg(rot, direct = .true., intensive = .false.) |
43 |
|
|
44 |
DO l = 1, klevel |
DO l = 1, klevel |
45 |
DO ij = 1, ip1jm |
rot(:, :, l) = rot(:, :, l)*unsairez_2d |
|
rot(ij, l) = rot(ij, l)*unsairez(ij) |
|
46 |
END DO |
END DO |
|
END DO |
|
47 |
|
|
48 |
|
END SUBROUTINE rotatf |
49 |
|
|
50 |
RETURN |
end module rotatf_m |
|
END SUBROUTINE rotatf |
|