[1987] | 1 | ! $Id: dissip.F90 5113 2024-07-24 11:17:08Z 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 | REAL :: SSUM |
---|
[524] | 57 | |
---|
[5103] | 58 | !----------------------------------------------------------------------- |
---|
| 59 | ! initialisations: |
---|
| 60 | ! ---------------- |
---|
[524] | 61 | |
---|
[5103] | 62 | DO l = 1, llm |
---|
| 63 | te1dt(l) = tetaudiv(l) * dtdiss |
---|
| 64 | te2dt(l) = tetaurot(l) * dtdiss |
---|
| 65 | te3dt(l) = tetah(l) * dtdiss |
---|
| 66 | ENDDO |
---|
| 67 | du = 0. |
---|
| 68 | dv = 0. |
---|
| 69 | dh = 0. |
---|
[524] | 70 | |
---|
[5103] | 71 | !----------------------------------------------------------------------- |
---|
| 72 | ! Calcul de la dissipation: |
---|
| 73 | ! ------------------------- |
---|
[524] | 74 | |
---|
[5103] | 75 | ! Calcul de la partie grad ( div ) : |
---|
| 76 | ! ------------------------------------- |
---|
[524] | 77 | |
---|
[5103] | 78 | IF(lstardis) THEN |
---|
| 79 | CALL gradiv2(llm, ucov, vcov, nitergdiv, gdx, gdy) |
---|
| 80 | ELSE |
---|
| 81 | CALL gradiv (llm, ucov, vcov, nitergdiv, gdx, gdy) |
---|
| 82 | ENDIF |
---|
[524] | 83 | |
---|
[5103] | 84 | DO l = 1, llm |
---|
[524] | 85 | |
---|
[5103] | 86 | DO ij = 1, iip1 |
---|
| 87 | gdx(ij, l) = 0. |
---|
| 88 | gdx(ij + ip1jm, l) = 0. |
---|
| 89 | ENDDO |
---|
[524] | 90 | |
---|
[5103] | 91 | DO ij = iip2, ip1jm |
---|
| 92 | du(ij, l) = du(ij, l) - te1dt(l) * gdx(ij, l) |
---|
| 93 | ENDDO |
---|
| 94 | DO ij = 1, ip1jm |
---|
| 95 | dv(ij, l) = dv(ij, l) - te1dt(l) * gdy(ij, l) |
---|
| 96 | ENDDO |
---|
[524] | 97 | |
---|
[5103] | 98 | ENDDO |
---|
[524] | 99 | |
---|
[5103] | 100 | ! calcul de la partie n X grad ( rot ): |
---|
| 101 | ! --------------------------------------- |
---|
[524] | 102 | |
---|
[5103] | 103 | IF(lstardis) THEN |
---|
| 104 | CALL nxgraro2(llm, ucov, vcov, nitergrot, grx, gry) |
---|
| 105 | ELSE |
---|
| 106 | CALL nxgrarot(llm, ucov, vcov, nitergrot, grx, gry) |
---|
| 107 | ENDIF |
---|
[524] | 108 | |
---|
[5103] | 109 | DO l = 1, llm |
---|
| 110 | DO ij = 1, iip1 |
---|
| 111 | grx(ij, l) = 0. |
---|
| 112 | ENDDO |
---|
[524] | 113 | |
---|
[5103] | 114 | DO ij = iip2, ip1jm |
---|
| 115 | du(ij, l) = du(ij, l) - te2dt(l) * grx(ij, l) |
---|
| 116 | ENDDO |
---|
| 117 | DO ij = 1, ip1jm |
---|
| 118 | dv(ij, l) = dv(ij, l) - te2dt(l) * gry(ij, l) |
---|
| 119 | ENDDO |
---|
| 120 | ENDDO |
---|
[524] | 121 | |
---|
[5103] | 122 | ! calcul de la partie div ( grad ): |
---|
| 123 | ! ----------------------------------- |
---|
[524] | 124 | |
---|
[5103] | 125 | IF(lstardis) THEN |
---|
[524] | 126 | |
---|
[5103] | 127 | DO l = 1, llm |
---|
| 128 | DO ij = 1, ip1jmp1 |
---|
| 129 | deltapres(ij, l) = AMAX1(0., p(ij, l) - p(ij, l + 1)) |
---|
| 130 | ENDDO |
---|
| 131 | ENDDO |
---|
[524] | 132 | |
---|
[5103] | 133 | CALL divgrad2(llm, teta, deltapres, niterh, gdx) |
---|
| 134 | ELSE |
---|
| 135 | CALL divgrad (llm, teta, niterh, gdx) |
---|
| 136 | ENDIF |
---|
[524] | 137 | |
---|
[5103] | 138 | DO l = 1, llm |
---|
| 139 | DO ij = 1, ip1jmp1 |
---|
| 140 | dh(ij, l) = dh(ij, l) - te3dt(l) * gdx(ij, l) |
---|
| 141 | ENDDO |
---|
| 142 | ENDDO |
---|
[524] | 143 | |
---|
[5105] | 144 | |
---|
[5103] | 145 | END SUBROUTINE dissip |
---|