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