[524] | 1 | ! $Header$ |
---|
[5099] | 2 | |
---|
[5119] | 3 | SUBROUTINE gradiv2(klevel, xcov, ycov, ld, gdx, gdy) |
---|
[5105] | 4 | ! |
---|
| 5 | ! P. Le Van |
---|
| 6 | ! |
---|
| 7 | ! ********************************************************** |
---|
| 8 | ! ld |
---|
| 9 | ! calcul de (grad (div) ) du vect. v .... |
---|
| 10 | ! |
---|
| 11 | ! xcov et ycov etant les composant.covariantes de v |
---|
| 12 | ! ********************************************************** |
---|
| 13 | ! xcont , ycont et ld sont des arguments d'entree pour le s-prog |
---|
| 14 | ! gdx et gdy sont des arguments de sortie pour le s-prog |
---|
| 15 | ! |
---|
| 16 | ! |
---|
[5106] | 17 | USE lmdz_filtreg, ONLY: filtreg |
---|
[5119] | 18 | USE lmdz_ssum_scopy, ONLY: scopy |
---|
[5134] | 19 | USE lmdz_comdissipn, ONLY: tetaudiv, tetaurot, tetah, cdivu, crot, cdivh |
---|
[5119] | 20 | |
---|
[5105] | 21 | IMPLICIT NONE |
---|
| 22 | ! |
---|
| 23 | INCLUDE "dimensions.h" |
---|
| 24 | INCLUDE "paramet.h" |
---|
| 25 | INCLUDE "comgeom.h" |
---|
| 26 | ! |
---|
| 27 | ! ........ variables en arguments ........ |
---|
[524] | 28 | |
---|
[5105] | 29 | INTEGER :: klevel |
---|
[5119] | 30 | REAL :: xcov(ip1jmp1, klevel), ycov(ip1jm, klevel) |
---|
| 31 | REAL :: gdx(ip1jmp1, klevel), gdy(ip1jm, klevel) |
---|
[5105] | 32 | ! |
---|
| 33 | ! ........ variables locales ......... |
---|
| 34 | ! |
---|
[5119] | 35 | REAL :: div(ip1jmp1, llm) |
---|
[5105] | 36 | REAL :: signe, nugrads |
---|
[5119] | 37 | INTEGER :: l, ij, iter, ld |
---|
[524] | 38 | |
---|
[5105] | 39 | ! ........................................................ |
---|
| 40 | ! |
---|
| 41 | ! |
---|
[5119] | 42 | CALL SCOPY(ip1jmp1 * klevel, xcov, 1, gdx, 1) |
---|
| 43 | CALL SCOPY(ip1jm * klevel, ycov, 1, gdy, 1) |
---|
[5105] | 44 | ! |
---|
| 45 | ! |
---|
[5119] | 46 | signe = (-1.)**ld |
---|
[5105] | 47 | nugrads = signe * cdivu |
---|
| 48 | ! |
---|
[524] | 49 | |
---|
[5119] | 50 | CALL divergf(klevel, gdx, gdy, div) |
---|
[524] | 51 | |
---|
[5119] | 52 | IF(ld>1) THEN |
---|
[524] | 53 | |
---|
[5119] | 54 | CALL laplacien (klevel, div, div) |
---|
[524] | 55 | |
---|
[5119] | 56 | ! ...... Iteration de l'operateur laplacien_gam ....... |
---|
[524] | 57 | |
---|
[5119] | 58 | DO iter = 1, ld - 2 |
---|
| 59 | CALL laplacien_gam (klevel, cuvscvgam1, cvuscugam1, unsair_gam1, & |
---|
| 60 | unsapolnga1, unsapolsga1, div, div) |
---|
[5105] | 61 | ENDDO |
---|
[524] | 62 | |
---|
[5105] | 63 | ENDIF |
---|
[524] | 64 | |
---|
[5119] | 65 | CALL filtreg(div, jjp1, klevel, 2, 1, .TRUE., 1) |
---|
| 66 | CALL grad (klevel, div, gdx, gdy) |
---|
[524] | 67 | |
---|
[5105] | 68 | ! |
---|
[5119] | 69 | DO l = 1, klevel |
---|
| 70 | DO ij = 1, ip1jmp1 |
---|
| 71 | gdx(ij, l) = gdx(ij, l) * nugrads |
---|
| 72 | ENDDO |
---|
| 73 | DO ij = 1, ip1jm |
---|
| 74 | gdy(ij, l) = gdy(ij, l) * nugrads |
---|
| 75 | ENDDO |
---|
| 76 | ENDDO |
---|
[5105] | 77 | ! |
---|
[5119] | 78 | RETURN |
---|
[5105] | 79 | END SUBROUTINE gradiv2 |
---|