[1987] | 1 | ! $Id: dissip.F90 5123 2024-07-25 06:45:50Z abarral $ |
---|
[5099] | 2 | |
---|
[5103] | 3 | SUBROUTINE dissip(vcov, ucov, teta, p, dv, du, dh) |
---|
| 4 | ! |
---|
| 5 | USE comconst_mod, ONLY: dtdiss |
---|
[524] | 6 | |
---|
[5103] | 7 | IMPLICIT NONE |
---|
[524] | 8 | |
---|
| 9 | |
---|
[5103] | 10 | ! .. Avec nouveaux operateurs star : gradiv2 , divgrad2, nxgraro2 ... |
---|
| 11 | ! ( 10/01/98 ) |
---|
[524] | 12 | |
---|
[5103] | 13 | !======================================================================= |
---|
| 14 | ! |
---|
| 15 | ! Auteur: P. Le Van |
---|
| 16 | ! ------- |
---|
| 17 | ! |
---|
| 18 | ! Objet: |
---|
| 19 | ! ------ |
---|
| 20 | ! |
---|
| 21 | ! Dissipation horizontale |
---|
| 22 | ! |
---|
| 23 | !======================================================================= |
---|
| 24 | !----------------------------------------------------------------------- |
---|
| 25 | ! Declarations: |
---|
| 26 | ! ------------- |
---|
[524] | 27 | |
---|
[5103] | 28 | include "dimensions.h" |
---|
| 29 | include "paramet.h" |
---|
| 30 | include "comgeom.h" |
---|
| 31 | include "comdissnew.h" |
---|
| 32 | include "comdissipn.h" |
---|
[524] | 33 | |
---|
[5103] | 34 | ! Arguments: |
---|
| 35 | ! ---------- |
---|
[524] | 36 | |
---|
[5103] | 37 | REAL, INTENT(IN) :: vcov(ip1jm, llm) ! covariant meridional wind |
---|
| 38 | REAL, INTENT(IN) :: ucov(ip1jmp1, llm) ! covariant zonal wind |
---|
| 39 | REAL, INTENT(IN) :: teta(ip1jmp1, llm) ! potential temperature |
---|
| 40 | REAL, INTENT(IN) :: p(ip1jmp1, llmp1) ! pressure |
---|
[5113] | 41 | ! tendencies (.../s) on covariant winds and potential temperature |
---|
[5103] | 42 | REAL, INTENT(OUT) :: dv(ip1jm, llm) |
---|
| 43 | REAL, INTENT(OUT) :: du(ip1jmp1, llm) |
---|
| 44 | REAL, INTENT(OUT) :: dh(ip1jmp1, llm) |
---|
[524] | 45 | |
---|
[5103] | 46 | ! Local: |
---|
| 47 | ! ------ |
---|
[524] | 48 | |
---|
[5103] | 49 | REAL :: gdx(ip1jmp1, llm), gdy(ip1jm, llm) |
---|
| 50 | REAL :: grx(ip1jmp1, llm), gry(ip1jm, llm) |
---|
| 51 | REAL :: te1dt(llm), te2dt(llm), te3dt(llm) |
---|
| 52 | REAL :: deltapres(ip1jmp1, llm) |
---|
[524] | 53 | |
---|
[5103] | 54 | INTEGER :: l, ij |
---|
[524] | 55 | |
---|
[5103] | 56 | !----------------------------------------------------------------------- |
---|
| 57 | ! initialisations: |
---|
| 58 | ! ---------------- |
---|
[524] | 59 | |
---|
[5103] | 60 | DO l = 1, llm |
---|
| 61 | te1dt(l) = tetaudiv(l) * dtdiss |
---|
| 62 | te2dt(l) = tetaurot(l) * dtdiss |
---|
| 63 | te3dt(l) = tetah(l) * dtdiss |
---|
| 64 | ENDDO |
---|
| 65 | du = 0. |
---|
| 66 | dv = 0. |
---|
| 67 | dh = 0. |
---|
[524] | 68 | |
---|
[5103] | 69 | !----------------------------------------------------------------------- |
---|
| 70 | ! Calcul de la dissipation: |
---|
| 71 | ! ------------------------- |
---|
[524] | 72 | |
---|
[5103] | 73 | ! Calcul de la partie grad ( div ) : |
---|
| 74 | ! ------------------------------------- |
---|
[524] | 75 | |
---|
[5103] | 76 | IF(lstardis) THEN |
---|
| 77 | CALL gradiv2(llm, ucov, vcov, nitergdiv, gdx, gdy) |
---|
| 78 | ELSE |
---|
| 79 | CALL gradiv (llm, ucov, vcov, nitergdiv, gdx, gdy) |
---|
| 80 | ENDIF |
---|
[524] | 81 | |
---|
[5103] | 82 | DO l = 1, llm |
---|
[524] | 83 | |
---|
[5103] | 84 | DO ij = 1, iip1 |
---|
| 85 | gdx(ij, l) = 0. |
---|
| 86 | gdx(ij + ip1jm, l) = 0. |
---|
| 87 | ENDDO |
---|
[524] | 88 | |
---|
[5103] | 89 | DO ij = iip2, ip1jm |
---|
| 90 | du(ij, l) = du(ij, l) - te1dt(l) * gdx(ij, l) |
---|
| 91 | ENDDO |
---|
| 92 | DO ij = 1, ip1jm |
---|
| 93 | dv(ij, l) = dv(ij, l) - te1dt(l) * gdy(ij, l) |
---|
| 94 | ENDDO |
---|
[524] | 95 | |
---|
[5103] | 96 | ENDDO |
---|
[524] | 97 | |
---|
[5103] | 98 | ! calcul de la partie n X grad ( rot ): |
---|
| 99 | ! --------------------------------------- |
---|
[524] | 100 | |
---|
[5103] | 101 | IF(lstardis) THEN |
---|
| 102 | CALL nxgraro2(llm, ucov, vcov, nitergrot, grx, gry) |
---|
| 103 | ELSE |
---|
| 104 | CALL nxgrarot(llm, ucov, vcov, nitergrot, grx, gry) |
---|
| 105 | ENDIF |
---|
[524] | 106 | |
---|
[5103] | 107 | DO l = 1, llm |
---|
| 108 | DO ij = 1, iip1 |
---|
| 109 | grx(ij, l) = 0. |
---|
| 110 | ENDDO |
---|
[524] | 111 | |
---|
[5103] | 112 | DO ij = iip2, ip1jm |
---|
| 113 | du(ij, l) = du(ij, l) - te2dt(l) * grx(ij, l) |
---|
| 114 | ENDDO |
---|
| 115 | DO ij = 1, ip1jm |
---|
| 116 | dv(ij, l) = dv(ij, l) - te2dt(l) * gry(ij, l) |
---|
| 117 | ENDDO |
---|
| 118 | ENDDO |
---|
[524] | 119 | |
---|
[5103] | 120 | ! calcul de la partie div ( grad ): |
---|
| 121 | ! ----------------------------------- |
---|
[524] | 122 | |
---|
[5103] | 123 | IF(lstardis) THEN |
---|
[524] | 124 | |
---|
[5103] | 125 | DO l = 1, llm |
---|
| 126 | DO ij = 1, ip1jmp1 |
---|
| 127 | deltapres(ij, l) = AMAX1(0., p(ij, l) - p(ij, l + 1)) |
---|
| 128 | ENDDO |
---|
| 129 | ENDDO |
---|
[524] | 130 | |
---|
[5103] | 131 | CALL divgrad2(llm, teta, deltapres, niterh, gdx) |
---|
| 132 | ELSE |
---|
| 133 | CALL divgrad (llm, teta, niterh, gdx) |
---|
| 134 | ENDIF |
---|
[524] | 135 | |
---|
[5103] | 136 | DO l = 1, llm |
---|
| 137 | DO ij = 1, ip1jmp1 |
---|
| 138 | dh(ij, l) = dh(ij, l) - te3dt(l) * gdx(ij, l) |
---|
| 139 | ENDDO |
---|
| 140 | ENDDO |
---|
[524] | 141 | |
---|
[5105] | 142 | |
---|
[5103] | 143 | END SUBROUTINE dissip |
---|