[524] | 1 | ! $Header$ |
---|
[5099] | 2 | |
---|
[5119] | 3 | SUBROUTINE gradiv(klevel, xcov, ycov, ld, gdx, gdy) |
---|
[5159] | 4 | |
---|
[5105] | 5 | ! Auteur : P. Le Van |
---|
[5159] | 6 | |
---|
[5105] | 7 | ! *************************************************************** |
---|
[5159] | 8 | |
---|
[5105] | 9 | ! ld |
---|
| 10 | ! calcul de (grad (div) ) du vect. v .... |
---|
[5159] | 11 | |
---|
[5105] | 12 | ! xcov et ycov etant les composant.covariantes de v |
---|
| 13 | ! **************************************************************** |
---|
| 14 | ! xcov , ycov et ld sont des arguments d'entree pour le s-prog |
---|
| 15 | ! gdx et gdy sont des arguments de sortie pour le s-prog |
---|
[5159] | 16 | |
---|
| 17 | |
---|
[5106] | 18 | USE lmdz_filtreg, ONLY: filtreg |
---|
[5119] | 19 | USE lmdz_ssum_scopy, ONLY: scopy |
---|
[5134] | 20 | USE lmdz_comdissipn, ONLY: tetaudiv, tetaurot, tetah, cdivu, crot, cdivh |
---|
[5119] | 21 | |
---|
[5159] | 22 | USE lmdz_dimensions, ONLY: iim, jjm, llm, ndm |
---|
| 23 | USE lmdz_paramet |
---|
[5105] | 24 | IMPLICIT NONE |
---|
| 25 | ! |
---|
[524] | 26 | |
---|
[5159] | 27 | |
---|
| 28 | |
---|
[5105] | 29 | INTEGER :: klevel |
---|
[5159] | 30 | |
---|
[5119] | 31 | REAL :: xcov(ip1jmp1, klevel), ycov(ip1jm, klevel) |
---|
| 32 | REAL :: gdx(ip1jmp1, klevel), gdy(ip1jm, klevel) |
---|
[524] | 33 | |
---|
[5119] | 34 | REAL :: div(ip1jmp1, llm) |
---|
[524] | 35 | |
---|
[5119] | 36 | INTEGER :: l, ij, iter, ld |
---|
[5159] | 37 | |
---|
| 38 | |
---|
| 39 | |
---|
[5119] | 40 | CALL SCOPY(ip1jmp1 * klevel, xcov, 1, gdx, 1) |
---|
| 41 | CALL SCOPY(ip1jm * klevel, ycov, 1, gdy, 1) |
---|
[5159] | 42 | |
---|
[5119] | 43 | DO iter = 1, ld |
---|
[5159] | 44 | |
---|
[5119] | 45 | CALL diverg(klevel, gdx, gdy, div) |
---|
| 46 | CALL filtreg(div, jjp1, klevel, 2, 1, .TRUE., 2) |
---|
| 47 | CALL grad(klevel, div, gdx, gdy) |
---|
[5159] | 48 | |
---|
[5119] | 49 | DO l = 1, klevel |
---|
| 50 | DO ij = 1, ip1jmp1 |
---|
| 51 | gdx(ij, l) = - gdx(ij, l) * cdivu |
---|
| 52 | END DO |
---|
| 53 | DO ij = 1, ip1jm |
---|
| 54 | gdy(ij, l) = - gdy(ij, l) * cdivu |
---|
| 55 | END DO |
---|
| 56 | END DO |
---|
[5159] | 57 | |
---|
[5105] | 58 | END DO |
---|
| 59 | RETURN |
---|
| 60 | END SUBROUTINE gradiv |
---|