[524] | 1 | ! |
---|
| 2 | ! $Header$ |
---|
| 3 | ! |
---|
[5246] | 4 | SUBROUTINE gradiv2(klevel, xcov, ycov, ld, gdx, gdy ) |
---|
| 5 | ! |
---|
| 6 | ! P. Le Van |
---|
| 7 | ! |
---|
| 8 | ! ********************************************************** |
---|
| 9 | ! ld |
---|
| 10 | ! calcul de (grad (div) ) du vect. v .... |
---|
| 11 | ! |
---|
| 12 | ! xcov et ycov etant les composant.covariantes de v |
---|
| 13 | ! ********************************************************** |
---|
| 14 | ! xcont , ycont et ld sont des arguments d'entree pour le s-prog |
---|
| 15 | ! gdx et gdy sont des arguments de sortie pour le s-prog |
---|
| 16 | ! |
---|
| 17 | ! |
---|
[5281] | 18 | USE comgeom_mod_h |
---|
[5280] | 19 | USE comdissipn_mod_h |
---|
[5271] | 20 | USE dimensions_mod, ONLY: iim, jjm, llm, ndm |
---|
[5272] | 21 | USE paramet_mod_h, ONLY: iip1, iip2, iip3, jjp1, llmp1, llmp2, llmm1, kftd, ip1jm, ip1jmp1, & |
---|
| 22 | ip1jmi1, ijp1llm, ijmllm, mvar, jcfil, jcfllm |
---|
[5271] | 23 | IMPLICIT NONE |
---|
[5246] | 24 | ! |
---|
[5271] | 25 | |
---|
[5272] | 26 | |
---|
[5246] | 27 | ! |
---|
| 28 | ! ........ variables en arguments ........ |
---|
[524] | 29 | |
---|
[5246] | 30 | INTEGER :: klevel |
---|
| 31 | REAL :: xcov( ip1jmp1,klevel ), ycov( ip1jm,klevel ) |
---|
| 32 | REAL :: gdx( ip1jmp1,klevel ), gdy( ip1jm,klevel ) |
---|
| 33 | ! |
---|
| 34 | ! ........ variables locales ......... |
---|
| 35 | ! |
---|
| 36 | REAL :: div(ip1jmp1,llm) |
---|
| 37 | REAL :: signe, nugrads |
---|
| 38 | INTEGER :: l,ij,iter,ld |
---|
[524] | 39 | |
---|
[5246] | 40 | ! ........................................................ |
---|
| 41 | ! |
---|
| 42 | ! |
---|
| 43 | CALL SCOPY( ip1jmp1 * klevel, xcov, 1, gdx, 1 ) |
---|
| 44 | CALL SCOPY( ip1jm * klevel, ycov, 1, gdy, 1 ) |
---|
| 45 | ! |
---|
| 46 | ! |
---|
| 47 | signe = (-1.)**ld |
---|
| 48 | nugrads = signe * cdivu |
---|
| 49 | ! |
---|
[524] | 50 | |
---|
| 51 | |
---|
[5246] | 52 | CALL divergf( klevel, gdx, gdy , div ) |
---|
[524] | 53 | |
---|
[5246] | 54 | IF( ld.GT.1 ) THEN |
---|
[524] | 55 | |
---|
[5246] | 56 | CALL laplacien ( klevel, div, div ) |
---|
[524] | 57 | |
---|
[5246] | 58 | ! ...... Iteration de l'operateur laplacien_gam ....... |
---|
[524] | 59 | |
---|
[5246] | 60 | DO iter = 1, ld -2 |
---|
| 61 | CALL laplacien_gam ( klevel,cuvscvgam1,cvuscugam1,unsair_gam1, & |
---|
| 62 | unsapolnga1, unsapolsga1, div, div ) |
---|
| 63 | ENDDO |
---|
[524] | 64 | |
---|
[5246] | 65 | ENDIF |
---|
[524] | 66 | |
---|
| 67 | |
---|
[5246] | 68 | CALL filtreg( div , jjp1, klevel, 2, 1, .TRUE., 1 ) |
---|
| 69 | CALL grad ( klevel, div, gdx, gdy ) |
---|
| 70 | |
---|
| 71 | ! |
---|
| 72 | DO l = 1, klevel |
---|
| 73 | DO ij = 1, ip1jmp1 |
---|
| 74 | gdx( ij,l ) = gdx( ij,l ) * nugrads |
---|
| 75 | ENDDO |
---|
| 76 | DO ij = 1, ip1jm |
---|
| 77 | gdy( ij,l ) = gdy( ij,l ) * nugrads |
---|
| 78 | ENDDO |
---|
| 79 | ENDDO |
---|
| 80 | ! |
---|
| 81 | RETURN |
---|
| 82 | END SUBROUTINE gradiv2 |
---|